vscode怎样关闭eslint的语法检查

2023-06-26,,

这篇文章将为大家详细讲解有关vscode怎样关闭eslint的语法检查,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。

VS Code              

在文件->首选项->设置中添加"eslint.enable": false配置即可

右侧用户设置会自动覆盖左侧的默认设置

vue工程中

在webpack.base.conf.js配置文件中删除有关loader: 'eslint-loader',的配置,如下:

const createLintingRule = () => ({
  test: /\.(js|vue)$/,
  loader: 'eslint-loader',
  enforce: 'pre',
  include: [resolve('src'), resolve('test')],
  options: {
    formatter: require('eslint-friendly-formatter'),
    emitWarning: !config.dev.showEslintErrorsInOverlay  }})

关于vscode怎样关闭eslint的语法检查就分享到这里了,希望以上内容可以对大家有一定的帮助,可以学到更多知识。如果觉得文章不错,可以把它分享出去让更多的人看到。

《vscode怎样关闭eslint的语法检查.doc》

下载本文的Word格式文档,以方便收藏与打印。