-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
56 lines (56 loc) · 1.51 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
module.exports = {
env: {
browser: true,
es2021: true
},
extends: [
'airbnb-base'
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 12,
sourceType: 'module'
},
plugins: [
'@typescript-eslint'
],
rules: {
indent: [ 'error', 'tab', { SwitchCase: 1 } ],
'no-tabs': 'off',
'comma-dangle': [ 'error', 'never' ],
'array-bracket-spacing': [ 'error', 'always' ],
'object-curly-spacing': [ 'error', 'always' ],
'linebreak-style': 'off',
'import/extensions': [ 'error', 'ignorePackages', { ts: 'never', js: 'never' } ],
'no-restricted-syntax': 'off',
'object-curly-newline': 'off',
'no-console': [ 'warn' ],
'max-len': [ 'warn', 150 ],
'import/prefer-default-export': 'off',
'no-nested-ternary': 'off',
'no-param-reassign': 'off',
'no-await-in-loop': 'off',
'arrow-body-style': 'off',
'no-else-return': 'warn',
'no-use-before-define': 'off',
'no-underscore-dangle': 'off',
'no-useless-constructor': 'off',
'no-empty-function': 'off',
'global-require': 'off',
'import/no-dynamic-require': 'off',
'arrow-parens': 'off',
// https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin
'@typescript-eslint/explicit-member-accessibility': [ 'error' ],
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': [ 'error' ],
'@typescript-eslint/no-useless-constructor': [ 'error' ],
'@typescript-eslint/no-empty-function': [ 'error' ]
},
settings: {
'import/resolver': {
node: {
extensions: [ '.ts' ]
}
}
}
};