-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.ts
157 lines (149 loc) · 3.65 KB
/
index.ts
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
export = {
env: {
browser: true,
es6: true,
node: true
},
parserOptions: {
ecmaVersion: 6,
sourceType: 'module'
},
plugins: ['@stylistic/js', 'node', 'import'],
extends: ['eslint:recommended', 'plugin:jsdoc/recommended'],
rules: {
// --- ES6
'arrow-body-style': ['error', 'as-needed'],
camelcase: [
'error',
{
properties: 'never'
}
],
complexity: 'off',
curly: 'error',
'default-case': 'off',
'dot-notation': 'error',
eqeqeq: 'error',
'guard-for-in': 'error',
'id-match': 'error',
'max-classes-per-file': 'off',
'no-bitwise': 'error',
'no-caller': 'error',
'no-case-declarations': 'off',
'no-console': 'error',
'no-eq-null': 'error',
'no-eval': 'error',
'no-extend-native': 'error',
'no-extra-bind': 'error',
'no-fallthrough': 'off',
'no-implicit-coercion': 'error',
'no-implicit-globals': 'error',
'no-invalid-this': 'off',
'no-irregular-whitespace': 'off',
'no-lone-blocks': 'error',
'no-native-reassign': 'error',
'no-nested-ternary': 'error',
'no-new-func': 'error',
'no-new-wrappers': 'error',
'no-param-reassign': 'error',
'no-shadow': [
'error',
{
hoist: 'all'
}
],
'no-script-url': 'error',
'no-throw-literal': 'error',
'no-undef-init': 'error',
'no-undefined': 'off',
'no-underscore-dangle': 'error',
'no-unused-expressions': [
'error',
{
allowTaggedTemplates: true
}
],
'no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
destructuredArrayIgnorePattern: '^_'
}
],
'no-useless-call': 'error',
'no-useless-concat': 'error',
'no-var': 'error',
'no-void': 'error',
'new-cap': [
'error',
{
newIsCap: true,
capIsNew: false
}
],
'object-shorthand': 'error',
'one-var': ['error', 'never'],
'prefer-arrow-callback': 'error',
'prefer-const': 'error',
'prefer-rest-params': 'error',
'prefer-spread': 'error',
'prefer-template': 'error',
radix: 'error',
'sort-keys': 'off',
'vars-on-top': 'error',
'valid-typeof': 'off',
// --- Stylistic
'@stylistic/js/spaced-comment': 'error',
'@stylistic/js/wrap-iife': ['error', 'inside'],
// --- Node
'node/global-require': 'error',
'node/no-unsupported-features/es-syntax': 'off',
// --- Import
'import/no-deprecated': 'error',
'import/order': [
'error',
{
groups: ['builtin', 'external', 'parent', ['sibling', 'index']],
pathGroups: [
{
pattern: '@/**',
group: 'external',
position: 'after'
},
{
pattern: './style.*',
group: 'index',
position: 'after'
},
{
pattern: './*.html',
group: 'index',
position: 'after'
}
],
pathGroupsExcludedImportTypes: ['builtin'],
alphabetize: {
order: 'asc'
}
}
],
// --- JSDoc
'jsdoc/check-tag-names': [
'error',
{
definedTags: ['jest-environment']
}
],
'jsdoc/no-multi-asterisks': 'off',
'jsdoc/require-jsdoc': 'off',
'jsdoc/require-param': 'off',
'jsdoc/require-param-description': 'off',
'jsdoc/require-param-name': 'off',
'jsdoc/require-param-type': 'off',
'jsdoc/require-returns': 'off',
'jsdoc/require-returns-check': 'off',
'jsdoc/require-returns-description': 'off',
'jsdoc/require-returns-type': 'off',
'jsdoc/tag-lines': ['warn', 'any', {startLines: 1}]
}
};