-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy path.eslintrc.js
67 lines (67 loc) · 2.36 KB
/
.eslintrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
module.exports = {
root: true,
env: {
node: true,
},
extends: ['plugin:vue/essential', '@vue/standard'],
rules: {
// Require braces in arrow function body: disabled
"arrow-body-style": 'off',
// require trailing commas: always | multiline
'comma-dangle': ['error', 'always-multiline'],
// require return statements: disabled
'consistent-return': 'off',
// named function expressions: never
'func-names': ['error', 'never'],
// Disallow duplicate imports
'import/prefer-default-export': 'off',
// enforce a maximum line length: 120
'max-len': ['warn', {
code: 120,
ignoreComments: true,
ignoreRegExpLiterals: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
ignoreTrailingComments: true,
ignoreUrls: true,
tabWidth: 2,
}],
// require constructor names to begin with a capital letter
'new-cap': ['error', { capIsNew: false }],
// Disallow await inside of loops: disabled
'no-await-in-loop': 'off',
// disallow the use of console
'no-console': ['error', { allow: ['error', 'log', 'warn'] }],
// disallow the use of debugger in production
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
// Disallow multiple spaces
'no-multi-spaces': ['error', { ignoreEOLComments: true }],
// disallow multiple empty lines: Max is 1 empty line
'no-multiple-empty-lines': ['error', { max: 1 }],
// Disallow Reassignment of Function Parameters: disabled
'no-param-reassign': 'off',
// Disallow Undeclared Variables
'no-undef': 'error',
// disallow dangling underscores: disabled
'no-underscore-dangle': 'off',
// Disallow Unused Variables
'no-unused-vars': ['error', {
vars: 'all',
varsIgnorePattern: '^(_|_.+_)$',
argsIgnorePattern: '^(_|_.+_)$'
}],
// Disallow Early Use except functions
'no-use-before-define': ['error', { functions: false }],
// enforce consistent linebreak style for operators: disabled
'operator-linebreak': 'off',
// Padding within blocks: disabled
'padded-blocks': 'off',
// enforce the consistent use of either backticks, double, or single quotes
quotes: ['error', 'single', { allowTemplateLiterals: true }],
// require semicolons: always
semi: ['error', 'always'],
},
parserOptions: {
parser: 'babel-eslint',
},
};