-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
executable file
·106 lines (105 loc) · 2.31 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
'use strict';
module.exports = {
env: {
browser: true,
es6: true
},
extends: [
'eslint:recommended',
'plugin:vue/recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:prettier/recommended'
],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly'
},
parser: 'vue-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser',
project: './tsconfig.json',
ecmaVersion: 2020,
sourceType: 'module',
extraFileExtensions: ['.vue']
},
plugins: [
'vue',
'@typescript-eslint',
'prettier'
],
rules: {
'vue/html-indent': ['warn', 2],
'vue/no-reserved-keys': ['warn'],
'vue/html-self-closing': [
'warn',
{
html: {
void: 'never',
normal: 'always',
component: 'always'
},
svg: 'always',
math: 'always'
}
],
'vue/html-quotes': [
'warn',
'double',
{ avoidEscape: true }
],
'vue/singleline-html-element-content-newline': [
'off'
],
// '@typescript-eslint/indent': ['warn', 2],
'@typescript-eslint/no-empty-interface': [
'off'
],
'@typescript-eslint/camelcase': ['off'],
'@typescript-eslint/restrict-plus-operands': [
'warn'
],
'@typescript-eslint/array-type': ['off'],
'@typescript-eslint/no-use-before-define': [
'off'
],
'@typescript-eslint/no-angle-bracket-type-assertion': [
'off'
],
'@typescript-eslint/interface-name-prefix': [
'off'
],
'@typescript-eslint/explicit-member-accessibility': [
'warn'
],
'@typescript-eslint/consistent-type-assertions': [
'warn'
],
'@typescript-eslint/no-inferrable-types': [
'warn'
],
'no-console': [
'error',
{ allow: ['warn', 'error', 'info'] }
],
semi: ['error', 'always'],
'prefer-spread': ['warn'],
'no-unused-vars': ['off'],
'no-extra-semi': ['warn'],
quotes: ['error', 'single'],
'linebreak-style': ['warn', 'unix'],
'prettier/prettier': [
'warn',
{
printWidth: 50,
tabWidth: 2,
singleQuote: true,
jsxSingleQuote: true,
semi: true,
trailingComma: 'none',
endOfLine: 'auto',
arrowParens: 'avoid',
rangeEnd: 0
}
]
}
};