git commit报错Error: All input files were ignored because of the ignore pattern.

113 阅读1分钟

今天在git commit的时候遇到如下报错

image.png

于是找到package.json文件中lint-staged下的stylelint,把他的--fix都修改成了--allow-empty-input

    "*.vue": [
      "prettier --write",
      "eslint --fix",
      "stylelint --allow-empty-input"
    ],
    "*.{scss,less,styl,html}": [
      "prettier --write",
      "stylelint --allow-empty-input"
    ],

完美解决