关闭eslint
module.exports = {
lintOnSave: false
}
创建项目的时候选择了Linter / Formatter,写代码的时候会有代码规范检查,怎么才能关闭eslint校验
module.exports = {
root: true,
env: {
node: true
},
'extends': [
'plugin:vue/essential',
'@vue/typescript'
],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
},
parserOptions: {
parser: '@typescript-eslint/parser'
}
}
关闭某个文件的eslint校验
some code
关闭某段代码的eslint校验
some code
some code
关闭某一行代码的eslint校验
some code
关闭下一行代码的eslint校验
some code
对指定规则的启用或者禁用警告
alert('foo');
console.log('bar');