visual-studio-code - 在 Visual Studio Code 上为 webpack.config.js 文件禁用 ESLint

标签 visual-studio-code eslint vscode-settings

我正在使用带有 vscode-eslint 扩展的 Visual Studio Code,但我收到了针对 webpack.config.js 文件本身的警告,如下所示。

enter image description here

如何在我自己的工作区中专门禁用此文件的 eslint 验证(也就是说,不向会影响其他开发人员的存储库添加 .eslintignore 文件)?

最佳答案

将这些行添加到 VSCode settings.json:

"eslint.options": {
    "ignorePattern": "webpack.config.js",
}

关于visual-studio-code - 在 Visual Studio Code 上为 webpack.config.js 文件禁用 ESLint,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57871821/

相关文章:

javascript - 为单个规则运行 eslint

javascript - "lines-between-class-members"声明类属性时ESLint错误

html - 如何使用 shift+alt+arrow-down 在 Visual Studio Code 中的选定行下方复制选定行

android - 导入 Dart 包

visual-studio-code - 有没有办法在 vscode 中开启 ES6/ES7 语法支持?

c++ - 编译时vscode找不到 header ,而Intellisense可以

visual-studio-code - 有没有办法使用 cursorWordPart*Select 命令而不捕获下划线?

visual-studio-code - vs 代码更漂亮 - 在 Angular 中的 @Input() 装饰器之后添加新行

javascript - 具有标准的 Flowtype 无法加载插件 flowtype--parser

node.js - VSCode 的 launch.json 中的 args 和 runtimeArgs 有什么区别?