简体   繁体   English

.eslintignore 没有忽略我的目录

[英].eslintignore is not ignoring my directory

I want ESLint to ignore my "views" folder and create an .eslintignore file in the project root directory for that.我希望 ESLint 忽略我的“views”文件夹并为此在项目根目录中创建一个 .eslintignore 文件。

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?).但它不起作用(是否需要在 package.json 中添加一些配置?)。

I don't want to use /* eslint-disable */ at the top of the file that needs to be ignored.我不想在需要忽略的文件顶部使用/* eslint-disable */

Here is how my project structure looks like:这是我的项目结构的样子: 项目结构

您的.eslintignore放在/views ,您需要将其移动到/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM