-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
38 lines (37 loc) · 1.17 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
const isProd = process.env.NODE_ENV === 'production'
module.exports = {
parser: 'vue-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser',
sourceType: 'module'
},
root: true,
env: {
node: true,
browser: true
},
plugins: [
'@typescript-eslint'
],
extends: [
'plugin:@typescript-eslint/recommended',
'eslint:recommended'
],
rules: {
'no-console': isProd ? 'error' : 'off',
'no-debugger': isProd ? 'error' : 'off',
'@typescript-eslint/ban-ts-comment': [ 'error' ],
'@typescript-eslint/no-unused-vars': 'error',
'no-unused-vars': 'off',
semi: [ 'error', 'never' ],
quotes: [ 'error', 'single' ],
'object-curly-spacing': [ 'error', 'always' ],
'array-bracket-spacing': [ 'error', 'always' ],
'space-before-function-paren': [ 'error', 'always' ],
'@typescript-eslint/no-var-requires': 0,
indent: [ 'error', 4, { SwitchCase: 1 } ],
'quote-props': [ 'error', 'as-needed' ],
'object-property-newline': [ 'error' ],
'key-spacing': [ 'error', { afterColon: true } ]
}
}