更改.eslintrc.js文件,主要是修正linebreak-style的验证方式 module.exports = { extends: 'google', quotes: [2,..., globals: { SwaggerEditor: false }, env: { browser: true }, rules:{ "linebreak-style
module' }, plugins: ['vue', '@typescript-eslint'], rules: { indent: ['error', 'tab'], 'linebreak-style...module' }, plugins: ['vue', '@typescript-eslint'], rules: { indent: ['error', 'tab'], 'linebreak-style...2 : 0, indent: 0, 'linebreak-style': 0, 'no-trailing-spaces': 0, 'class-methods-use-this
": { // 缩进 "indent": [ "error", 4 //我的是编辑器自动格式化,不是使用tabs,而是四个空格 ], "linebreak-style
globals: {}, parserOptions: { ecmaVersion: 2018 }, rules: { indent: [ "error", "tab" ], "linebreak-style
"eslint:recommended",// 启用 eslint 的默认推荐规 "rules": { // 新增的一些规则 "indent": ["error", 4], "linebreak-style
no-console": 0, "no-unused-vars": "error", "no-use-before-define": "error", "linebreak-style..."linebreak-style":[2, "unix"] 强制使用一致的换行风格。 "quotes": ["error", "single"] 强制使用一致的单引号。
": "module" }, "rules": {"indent": [ "error", 4 ], "linebreak-style
module' }, 'rules': { 'indent': [ 'error', 4 ], 'linebreak-style
spaced-comment": 0, // 关闭禁止对 function 的参数进行重新赋值 "no-param-reassign": 0, // 强制使用一致的换行符风格 (linebreak-style...) "linebreak-style": ["error", "unix"], // 关闭全等 === 校验 "eqeqeq": "off", // 禁止使用拖尾逗号(即末尾不加逗号
关闭分号结尾 'no-unused-vars' 'warn', // 未使用变量,警告提示 'no-undef': 'error', // 未定义或隐式全局变量, 报错提示 'linebreak-style
17 "settings": { 18 "react": { 19 "version": "detect" 20 } 21 }, 22 "rules": { 23 "linebreak-style
paren-less arrow functions 'indent': [2, 2], // 两个空格的缩进 'quotes': [2, 'single'], // js必须使用单引号 'linebreak-style
"plugins": [ "flowtype" ], "rules": { "indent": ["error", 4, { "SwitchCase": 1 }], "linebreak-style
typescript-eslint" ], "rules": { "indent": [ "error", 4 ], "linebreak-style
"no-mixed-requires": [0, false],//声明时不能混用声明类型 "no-mixed-spaces-and-tabs": [2, false],//禁止混用tab和空格 "linebreak-style
parserOptions": { "ecmaVersion": 2018, "sourceType": "module" }, "rules": { "linebreak-style
'no-nested-ternary': 'off', 'import/no-unresolved': 'off', 'no-return-assign': 'warn', 'linebreak-style
规则名称>:[,],举个栗子: "rules": { // enable additional rules "indent": ["error", 4], "linebreak-style
“no-mixed-requires”: [0, false],//声明时不能混用声明类型 “no-mixed-spaces-and-tabs”: [2, false],//禁止混用tab和空格 “linebreak-style
领取专属 10元无门槛券
手把手带您无忧上云