-
Notifications
You must be signed in to change notification settings - Fork 36
/
.eslintrc.js
80 lines (78 loc) · 1.96 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
module.exports = {
"root": true,
"env": {
"es2021": true,
"node": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 12,
"sourceType": "module",
"project": ["./tsconfig.json"],
},
"plugins": [
"@typescript-eslint",
"import"
],
"extends": [
"airbnb",
"airbnb-typescript"
],
"rules": {
// React
"react/jsx-props-no-spreading": "off",
"react/prop-types": "off",
"react/function-component-definition": "off",
// Spaces
'semi': [
'error',
'always'
],
'no-trailing-spaces': [
'error', {
'ignoreComments': true
}
],
'space-before-function-paren': [
'error', {
'anonymous': 'always',
'named': 'never',
'asyncArrow': 'always'
}
],
'space-in-parens': [
'error', 'always'
],
'space-before-blocks': 'error',
'no-whitespace-before-property': 'error',
'newline-before-return': 'error',
'no-multi-spaces': 'error',
'arrow-parens': [ 'error', 'always' ],
'array-bracket-spacing': [ 'error', 'always' ],
'arrow-spacing': 'error',
'lines-between-class-members': [ 'error', 'always', { 'exceptAfterSingleLine': true } ],
'@typescript-eslint/lines-between-class-members': [ 'error', 'always', { 'exceptAfterSingleLine': true } ],
// Basics
'camelcase': 'error',
'no-var': 'error',
'prefer-const': 'error',
'eqeqeq': [ 'error', 'always' ],
'no-return-assign': 'error',
'no-return-await': 'error',
'no-throw-literal': 'error',
'new-cap': [ 'error', { 'newIsCap': true } ],
'no-unneeded-ternary': 'error',
'no-template-curly-in-string': 'error',
'template-curly-spacing': 'error',
'curly': [ 'error', 'all' ],
'padded-blocks': [ 'error', 'always' ],
'no-underscore-dangle': ["error", { "allowAfterThis": true }],
'import/extensions':'off',
'no-plusplus': 'off',
'import/prefer-default-export': 'off',
'no-mixed-operators': 'off',
'no-param-reassign': 'off',
'import/no-named-as-default': 'off',
'import/no-extraneous-dependencies': 'off',
}
};