-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
71 lines (71 loc) · 2.19 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
68
69
70
71
module.exports = {
root: true,
parserOptions: {
parser: '@babel/eslint-parser',
sourceType: 'module',
},
env: { browser: true },
extends: [
'airbnb-base',
'plugin:cypress/recommended',
'standard',
'plugin:vue/vue3-strongly-recommended',
'plugin:promise/recommended',
'plugin:n/recommended',
],
plugins: ['vue', 'cypress'],
globals: {
__statics: true,
'cypress/globals': true,
},
rules: {
quotes: ['error', 'single'],
semi: ['error', 'always'],
indent: ['error', 2, { SwitchCase: 1 }],
'linebreak-style': ['error', 'unix'],
'react/display-name': 'off',
'n/no-missing-import': 'off',
'max-len': ['error', { code: 120, tabWidth: 2 }],
'no-console': process.env.NODE_ENV === 'development'
? ['warn', { allow: ['error'] }]
: ['error', { allow: ['error'] }],
'no-trailing-spaces': 'error',
'vue/max-attributes-per-line': 0,
'vue/singleline-html-element-content-newline': 0,
'vue/html-indent': 0,
'vue/html-closing-bracket-newline': 0,
'arrow-parens': [2, 'as-needed', { requireForBlockBody: true }],
'vue/first-attribute-linebreak': 0,
'vue/multi-word-component-names': 0,
// Un-used AirBnb rules
'no-param-reassign': 0,
'import/no-extraneous-dependencies': 0,
'import/extensions': ['error', 'never', { html: 'always' }],
'import/prefer-default-export': 0,
'import/no-unresolved': 0,
'no-underscore-dangle': 0,
'no-use-before-define': 0,
'consistent-return': 0,
'func-names': 0,
'global-require': 0,
'no-plusplus': 0,
'default-case': 0,
'no-restricted-globals': 0,
'no-await-in-loop': 0,
'no-restricted-syntax': 0,
'no-continue': 0,
'comma-dangle': [
'error',
{
arrays: 'always-multiline',
objects: 'always-multiline',
imports: 'always-multiline',
exports: 'always-multiline',
functions: 'never',
},
],
'object-curly-newline': ['error', { consistent: true }],
'operator-linebreak': ['error', 'before', { overrides: { '&&': 'after', '||': 'after', '=': 'after' } }],
'prefer-destructuring': ['error', { VariableDeclarator: { object: true, array: false } }],
},
};