最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - .eslintignore is not ignoring my directory - Stack Overflow

programmeradmin2浏览0评论

I want ESLint to ignore my "views" folder and create an .eslintignore file in the project root directory for that.

Inside, I've added the folder I want to ignore:

/views

But it is not working (should some configurations need to be added in package.json?).

I don't want to use /* eslint-disable */ at the top of the file that needs to be ignored.

Here is how my project structure looks like:

I want ESLint to ignore my "views" folder and create an .eslintignore file in the project root directory for that.

Inside, I've added the folder I want to ignore:

/views

But it is not working (should some configurations need to be added in package.json?).

I don't want to use /* eslint-disable */ at the top of the file that needs to be ignored.

Here is how my project structure looks like:

Share Improve this question asked Mar 23, 2019 at 15:03 LeoceteLeocete 3054 silver badges15 bronze badges 3
  • If you're using VS Code's built-in ESLint support, Did you try disabling and re-enabling ESLint for the project from the VS Code mand palette? – eritbh Commented Mar 23, 2019 at 15:25
  • Have you tried just plain views without the leading slash? – Patrick Hund Commented Mar 23, 2019 at 15:44
  • I've tried both variants - none of them worked – Leocete Commented Mar 23, 2019 at 15:47
Add a ment  | 

1 Answer 1

Reset to default 7

Your .eslintignore is placed inside /views, you need to move it into /.

发布评论

评论列表(0)

  1. 暂无评论