-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
68 lines (63 loc) · 1.47 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
module.exports = {
extends: [
'wikimedia',
'wikimedia/node',
'wikimedia/client',
'wikimedia/language/es6',
'wikimedia/language/es2017',
'plugin:vue/strongly-recommended',
'@wmde/wikimedia-typescript',
],
plugins: [
'filenames',
],
parser: 'vue-eslint-parser',
root: true,
rules: {
'function-paren-newline': [ 'error', 'consistent' ],
'filenames/match-exported': 'error',
'object-shorthand': [ 'error', 'always' ],
// problematic in TypeScript / ES6
'no-unused-vars': 'off',
'no-undef': 'error',
// diverging from Wikimedia rule set
'max-len': [ 'error', 120 ],
'comma-dangle': [ 'error', {
arrays: 'always-multiline',
objects: 'always-multiline',
imports: 'always-multiline',
exports: 'always-multiline',
functions: 'always-multiline',
} ],
'operator-linebreak': 'off',
'quote-props': 'off',
'valid-jsdoc': 'off',
'vue/html-indent': [ 'error', 'tab' ],
'vue/max-attributes-per-line': [ 'error', {
singleline: 3,
multiline: 1,
} ],
'vue/multi-word-component-names': 'off',
'no-restricted-properties': 'off',
},
overrides: [
{
files: [ '**/*.ts' ],
parser: 'vue-eslint-parser',
rules: {
'no-undef': 'off',
},
},
{
files: [ '*.js' ],
rules: {
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-member-accessibility': 'off',
'@typescript-eslint/no-var-requires': 'off',
},
},
],
parserOptions: {
parser: '@typescript-eslint/parser',
},
};