小编leo*_*ofu的帖子

加载规则“@typescript-eslint/dot-notation”时出错

今天我运行 eslint?two 脚本

 "lint-staged": "lint-staged",
 "eslint": "eslint --ext .tsx,.ts --fix ./src -c .eslintrc.js",

Run Code Online (Sandbox Code Playgroud)

当我运行时npm run eslint// 没关系 当我运行时npm run lint-staged// 它是错误的

lint-staged 的​​结果;

> lint-staged
  ? Running tasks for src/**/*.tsx
    ? eslint --fix [FAILED]
    ? git add
  
? eslint --fix :


Oops! Something went wrong! :(

ESLint: 7.10.0

Error: Error while loading rule '@typescript-eslint/dot-notation': You have used a rule which requires parserServices to be generated. You must therefore provide a value for the "parserOptions.project" property for …
Run Code Online (Sandbox Code Playgroud)

javascript eslint husky lint-staged

10
推荐指数
2
解决办法
9684
查看次数

标签 统计

eslint ×1

husky ×1

javascript ×1

lint-staged ×1