-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy path.eslintrc.js
106 lines (104 loc) · 3.24 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
module.exports = {
root: true,
extends: [
'@justeat/eslint-config-fozzie',
// https://github.com/vue-a11y/eslint-plugin-vuejs-accessibility/tree/master/docs
'plugin:vuejs-accessibility/recommended'
],
plugins: ['webdriverio'],
env: {
"webdriverio/wdio": true
},
rules: {
'class-methods-use-this': 'off', // can't use with getters in webdriver, which flag as errors
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'vue/html-quotes': 'off',
'vue/sort-keys': 'off',
'vue/multiline-html-element-content-newline': ['error', {
'ignores': [
'a',
'abbr',
'audio',
'b',
'bdi',
'bdo',
'canvas',
'cite',
'code',
'data',
'del',
'dfn',
'em',
'i',
'iframe',
'ins',
'kbd',
'label',
'map',
'mark',
'noscript',
'object',
'option',
'output',
'picture',
'pre',
'q',
'ruby',
's',
'samp',
'small',
'span',
'strong',
'sub',
'sup',
'svg',
'textarea',
'time',
'u',
'var',
'video']
}],
'import/no-extraneous-dependencies': 'off',
'import/no-unresolved': 'off',
'lines-between-class-members': [
'error',
'always',
{ 'exceptAfterSingleLine': true },
],
// Setting these to warn temporarily otherwise it breaks the dev experience
// and makes it hard to actually fix them.
// Once the existing issues are fixed we can remove the rules so they default back to error.
'vuejs-accessibility/alt-text': 'warn',
'vuejs-accessibility/anchor-has-content': 'off', // turned off, as reporting false positives
'vuejs-accessibility/click-events-have-key-events': 'off', // not relevant, false positives
'vuejs-accessibility/form-control-has-label': 'warn',
'vuejs-accessibility/no-onchange': 'off', // turned off, as only an issue in very old browsers
'vuejs-accessibility/label-has-for': [
'warn',
{
required: {
some: ['nesting', 'id']
}
}
]
},
parserOptions: {
parser: '@babel/eslint-parser',
ecmaVersion: 2017,
sourceType: 'module',
// Stops linting from failing on components that're built with Vite
requireConfigFile: false
},
settings: {
'import/resolver': {
webpack: {
config: require.resolve('@vue/cli-service/webpack.config.js')
}
}
},
globals: {
browser: 'readonly',
allure: 'readonly'
}
};