-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
56 lines (56 loc) · 1.95 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 = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json'
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended'
],
plugins: [
'@typescript-eslint'
],
env: {
node: true
},
rules: {
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-unused-vars': ['error', { 'args': 'none' }],
'@typescript-eslint/prefer-nullish-coalescing': ['error'],
'@typescript-eslint/prefer-optional-chain': ['error'],
'arrow-parens': ['error', 'always'],
'arrow-spacing': ['error', { 'before': true, 'after': true }],
'brace-style': ['error'],
'comma-dangle': ['error', 'never'],
'curly': ['error', 'all'],
'dot-notation': ['error'],
'eol-last': ['error'],
'indent': ['error', 2, { 'SwitchCase': 1 }],
'key-spacing': ['error', { 'mode': 'strict' }],
'keyword-spacing': ['error', { 'before': true, 'after': true }],
'no-console': ['error'],
'no-constant-condition': ['error', { 'checkLoops': false }],
'no-multiple-empty-lines': ['error', { 'max': 1, 'maxBOF': 0, 'maxEOF': 1 }],
'no-trailing-spaces': ['error'],
'no-unused-vars': 'off',
'object-shorthand': ['error', 'properties'],
'padded-blocks': ['error', 'never'],
'prefer-const': ['error', { 'destructuring': 'any' }],
'prefer-destructuring': ['error', { 'AssignmentExpression': { 'array': false, 'object': false }, 'VariableDeclarator': { 'array': false, 'object': true } }], // array suggests pointlessly replacing foo[0],
'prefer-template': ['error'],
'quote-props': ['error', 'as-needed'],
'quotes': ['error', 'single'],
'semi': ['error', 'always'],
'space-in-parens': ['error'],
'space-unary-ops': ['error'],
'template-curly-spacing': ['error', 'never']
},
globals: {
gc: false,
Map: false,
Promise: false,
Set: false
}
};