当前位置: 首页 > Web前端 > CSS

错误:找不到匹配模式“-xxx-xxx-...”的文件

时间:2023-03-31 13:32:31 CSS

使用.stylelintignore添加忽略文件校验,lint-staged执行校验规范时报错?stylelint--fix:Error:Nofilesmatchingthepattern"/Users/lyc/Desktop/tal/monkey-wukong-wap/src/pages/reportActivity/assets/iconfont/iconfont.css”被发现。在/Users/lyc/Desktop/tal/monkey-wukong-wap/node_modules/stylelint/lib/standalone.js:212:12在processTicksAndRejections(internal/process/task_queues.js:97:5)解决方案:lint-stagedstylelint添加--allow-empty-input"lint-staged":{"*.{js,vue}":["vue-cli-servicelint"],"*.{less,vue}":["stylelint--allow-empty-input"]}final在https://github.com/stylelint/...找到解决方案,但仍然不清楚为什么以及何时添加这个--allow-empty-input属性。