-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
99 lines (92 loc) · 2.56 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
module.exports = {
root: true,
env: {
node: true,
},
extends: [
'plugin:vue/essential',
'@vue/airbnb',
'@vue/typescript',
],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
semi: [
'error',
'never'
],
curly: [
'error',
'multi-or-nest'
],
'nonblock-statement-body-position': [
'error',
'below'
],
'no-multiple-empty-lines': [
'error',
{
max: 1
}
],
'func-names': 'off',
'implicit-arrow-linebreak': 'off',
'no-array-constructor': 'off',
'consistent-return': 'off',
'max-len': 'off', // TODO: on it rule
'import/prefer-default-export': 'off', // not work when have only export
'import/no-cycle': 'off', // cannot allow cycle interface imports
'no-use-before-define': 'off', // it rule not allow write readable code
'camelcase': 'off', // generated ts types from graphql not in camelcase
'no-return-assign': 'off',
'no-param-reassign': 'off',
'no-return-await': 'off',
'no-nested-ternary': 'off',
'default-case': 'off',
'class-methods-use-this': 'off',
'no-mixed-operators': 'off',
'vue/valid-v-model': 'off',
'vue/no-use-v-if-with-v-for': 'off',
'import/no-named-as-default': 'off',
'import/named': 'off', // have bugs
'no-multi-assign': 'off',
'no-restricted-syntax': 'off',
'no-continue': 'off',
'no-plusplus': 'off',
'no-unused-vars': 'off', // not properly work with classes
'padded-blocks': 'off',
'comma-dangle': ['error', 'never'],
'max-classes-per-file': 'off',
'arrow-parens': ['error', 'as-needed'],
// use @typescript-eslint/no-useless-constructor,
// by this issue https://github.com/typescript-eslint/typescript-eslint/issues/48
'no-useless-constructor': 'off',
'no-empty-function': 'off',
'function-paren-newline': 'off'
// 'graphql/template-strings': [
// 'error',
// {
// env: 'literal',
// projectName: 'app',
// schemaJsonFilepath: 'node_modules/.temp/graphql/schema.json'
// }
// ]
},
// plugins: [
// 'graphql'
// ]
parserOptions: {
parser: '@typescript-eslint/parser',
},
overrides: [
{
files: [
'**/__tests__/*.{j,t}s?(x)',
'**/tests/unit/**/*.spec.{j,t}s?(x)'
],
env: {
jest: true
}
}
]
}