init
This commit is contained in:
67
.eslintrc.js
Normal file
67
.eslintrc.js
Normal file
@@ -0,0 +1,67 @@
|
||||
module.exports = {
|
||||
root: false,
|
||||
env: {
|
||||
node: true,
|
||||
},
|
||||
extends: [
|
||||
'plugin:vue/essential',
|
||||
'@vue/airbnb',
|
||||
],
|
||||
rules: {
|
||||
'indent': 'off',
|
||||
'no-tabs': 'off', // 禁用 no-tabs 规则
|
||||
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
|
||||
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
|
||||
'array-element-newline': ['error', 'consistent'],
|
||||
// 'indent': ['error',4,{ 'MemberExpression': 0, 'SwitchCase': 1 }],
|
||||
'quotes': ['error', 'single'],
|
||||
'comma-dangle': ['error', 'always-multiline'],
|
||||
'semi': ['error', 'never'],
|
||||
'object-curly-spacing': ['error', 'always'],
|
||||
'max-len': ['error', 140],
|
||||
'no-new': 'off',
|
||||
'linebreak-style': 'off',
|
||||
'import/extensions': 'off',
|
||||
'eol-last': 'off',
|
||||
'no-shadow': 'off',
|
||||
'no-unused-vars': 'warn',
|
||||
'import/no-cycle': 'off',
|
||||
'arrow-parens': 'off',
|
||||
'eqeqeq': 'off',
|
||||
'no-param-reassign': 'off',
|
||||
'import/prefer-default-export': 'off',
|
||||
'no-use-before-define': 'off',
|
||||
'no-continue': 'off',
|
||||
'prefer-destructuring': 'off',
|
||||
'no-plusplus': 'off',
|
||||
'prefer-const': 'off',
|
||||
'global-require': 'off',
|
||||
'no-prototype-builtins': 'off',
|
||||
'consistent-return': 'off',
|
||||
'vue/require-component-is': 'off',
|
||||
'prefer-template': 'off',
|
||||
'one-var-declaration-per-line': 'off',
|
||||
'one-var': 'off',
|
||||
'import/named': 'off',
|
||||
'object-curly-newline': 'off',
|
||||
'default-case': 'off',
|
||||
'import/no-dynamic-require': 'off',
|
||||
'vue/no-parsing-error': [2, {
|
||||
'x-invalid-end-tag': false
|
||||
}],
|
||||
},
|
||||
parserOptions: {
|
||||
parser: 'babel-eslint',
|
||||
},
|
||||
overrides: [
|
||||
{
|
||||
files: [
|
||||
'**/__tests__/*.{j,t}s?(x)',
|
||||
'**/tests/unit/**/*.spec.{j,t}s?(x)',
|
||||
],
|
||||
env: {
|
||||
jest: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
Reference in New Issue
Block a user