[英]Disable ESLint warnings on a file?
I have just started to use linters, and am currently using the linter-eslint
package to integrate javascript linting into atom (my IDE of choice.)我刚刚开始使用 linter,目前正在使用
linter-eslint
包将 javascript linter-eslint
集成到 atom(我选择的 IDE)中。
Now ESLint is giving me this warning for a .atom-build.js
file I have inside my current project directory:现在 ESLint 为我当前项目目录中的
.atom-build.js
文件发出了这个警告:
File ignored by default. Use a negated ignore pattern to override.
I want to suppress this warning, because it is bugging me that everything else is fine but there is still this red X in the bottom-left corner of atom.我想抑制这个警告,因为它让我觉得其他一切都很好,但原子的左下角仍然有这个红色的 X。
I tried adding the line:我尝试添加以下行:
/* eslint-disable */
to the top of my file, but it doesn't remove the warning.到我的文件顶部,但它不会删除警告。
(source: cubeupload.com ) (来源: cubeupload.com )
I believe you can just add the following line to your .eslintignore
file, essentially negating the default ignoring of the file.我相信您只需
.eslintignore
添加到您的.eslintignore
文件中,基本上可以.eslintignore
默认的文件忽略。
!.atom-build.js
Since the file is ignored by default, I don't believe a comment in the header with change anything.由于默认情况下会忽略该文件,因此我不相信标题中的注释会更改任何内容。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.