-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.eslintrc.js
57 lines (57 loc) · 1.59 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
module.exports = {
env: {
node: true,
browser: true,
},
parser: 'vue-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser',
ecmaVersion: 2020,
sourceType: 'module',
},
globals: {
chrome: true,
Vue: 'readonly',
},
plugins: [
'vue',
],
extends: [
'eslint:recommended',
'plugin:vue/essential',
],
rules: {
'array-bracket-spacing': [ 'warn', 'always' ],
'brace-style': [ 'warn', '1tbs' ],
'curly': ['warn', 'all'],
'eol-last': [ 'error', 'always' ],
'jsx-quotes': [ 'error', 'prefer-double' ],
'keyword-spacing': ['warn', { 'before': true, 'after': true }],
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-unused-vars': 'warn',
'object-curly-spacing': ['warn', 'always'],
'template-curly-spacing': [ 'warn', 'always' ],
'vue/max-attributes-per-line': [ 'error', { singleline: 2 } ],
'vue/no-unused-components': 'warn',
'vue/script-indent': [ 'error', 2, { baseIndent: 1 } ],
'vue/no-v-html': 'off',
'vue/no-v-text-v-html-on-component': 'off',
'vue/multi-word-component-names': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/camelcase': 'off',
},
overrides: [
{
files: ['*.ts', '*.tsx'],
parser: '@typescript-eslint/parser',
plugins: [
'@typescript-eslint',
],
extends: [
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
],
},
],
}