Ant-design-pro: 🐛 npm script lint-staged throws Parsing error

Created on 22 Jul 2020  ·  4Comments  ·  Source: ant-design/ant-design-pro

🐛 bug description

npm run lint-staged throws the error:

C:\Users\user\src\myApp.eslintrc.js
  0:0  error  Parsing error: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: .eslintrc.js.
The file must be included in at least one of the projects provided

📷 Steps to reproduce

  1. Create a new project with yarn create umi myApp and select the options:
  2. ant-design-pro
  3. Pro V4
  4. TypeScript
  5. simple
  6. go to myApp folder
  7. run npm run lint-staged

🏞 Expected results

npm run lint-staged runs with no errors

© Version Information

-Ant Design Pro version: 4.0.0
-Umi version: 3.2.0
-Windows 10

🛑 bug

Most helpful comment

在 tsconfig 中 include 一下 myApp.eslintrc.js

All 4 comments

在 tsconfig 中 include 一下 myApp.eslintrc.js

Solved by adding .eslintignore

/.

在 tsconfig 中 include 一下 myApp.eslintrc.js

在 tsconfig 中 include 之后,报错的文件更多了,怎么解决?

在 tsconfig 中 include 一下 myApp.eslintrc.js

我也没解决,报错更多了

Was this page helpful?
0 / 5 - 0 ratings

Related issues

2uncle-code picture 2uncle-code  ·  3Comments

yjz1004 picture yjz1004  ·  3Comments

RichardStark picture RichardStark  ·  3Comments

happier2 picture happier2  ·  3Comments

zhuanglong picture zhuanglong  ·  3Comments