-
Notifications
You must be signed in to change notification settings - Fork 24
/
.eslintrc.js
70 lines (70 loc) · 2.09 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
module.exports = {
root: true,
env: {
node: true,
},
globals: {
ENV_MOBILE_DEVICE: true,
},
ignorePatterns: ['dist', 'platforms', 'plugins', 'www'],
extends: [
'plugin:vue/recommended',
'plugin:@intlify/vue-i18n/recommended',
'@vue/airbnb',
],
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',
'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',
'@intlify/vue-i18n/no-dynamic-keys': 'error',
'@intlify/vue-i18n/no-unused-keys': 'error',
'vuejs-accessibility/click-events-have-key-events': 'off',
'vuejs-accessibility/label-has-for': 'off',
'vuejs-accessibility/form-control-has-label': 'off',
'vue/multi-word-component-names': 'off',
'vuejs-accessibility/no-autofocus': 'off',
'vuejs-accessibility/alt-text': 'off',
},
parserOptions: {
parser: '@babel/eslint-parser',
},
overrides: [{
files: '**/__tests__/*',
env: {
jest: true,
},
}, {
files: 'backend/**',
rules: {
'import/no-extraneous-dependencies': ['error', { packageDir: 'backend' }],
'import/extensions': ['error', 'ignorePackages'],
},
}],
settings: {
'vue-i18n': {
localeDir: './src/locales/*.json',
},
},
};