-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy path.eslintrc.js
64 lines (64 loc) · 1.77 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
module.exports = {
root: true,
env: {
node: true,
},
extends: [
'plugin:vue-i18n/recommended',
'plugin:vue/recommended',
'@vue/airbnb',
],
parserOptions: {
parser: 'babel-eslint',
},
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'vue/array-bracket-spacing': 'error',
'vue/arrow-spacing': 'error',
'vue/block-spacing': 'error',
'vue/brace-style': 'error',
'vue/camelcase': ['error', { properties: 'never' }],
'vue/comma-dangle': ['error', {
arrays: 'always-multiline',
objects: 'always-multiline',
imports: 'always-multiline',
exports: 'always-multiline',
functions: 'always-multiline',
}],
'vue/component-name-in-template-casing': ['error', 'PascalCase', {
registeredComponentsOnly: false,
ignores: ['i18n'],
}],
'vue/eqeqeq': 'error',
'vue/key-spacing': 'error',
'vue/match-component-file-name': 'error',
'vue/no-boolean-default': 'error',
'vue/no-restricted-syntax': 'error',
'vue/object-curly-spacing': ['error', 'always'],
'vue/require-direct-export': 'error',
'vue/space-infix-ops': 'error',
'vue/space-unary-ops': 'error',
'vue/v-on-function-call': 'error',
'vue-i18n/no-dynamic-keys': 'error',
'vue-i18n/no-unused-keys': 'error',
'vue-i18n/no-raw-text': 'off',
'vue-i18n/no-missing-keys': process.env.NODE_ENV === 'production' ? 'off' : 'warn',
},
overrides: [
{
files: [
'**/__tests__/*.{j,t}s?(x)',
'**/tests/unit/**/*.spec.{j,t}s?(x)',
],
env: {
jest: true,
},
},
],
settings: {
'vue-i18n': {
localeDir: './src/locales/*.json',
},
},
};