-
Notifications
You must be signed in to change notification settings - Fork 14
/
.eslintrc
87 lines (83 loc) · 2.17 KB
/
.eslintrc
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
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true,
"modules": true
},
"project": "./tsconfig.json"
},
"plugins": ["react", "@typescript-eslint/eslint-plugin"],
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
"prettier/@typescript-eslint",
"prettier/react"
],
"env": {
"browser": true,
"node": true,
"es6": true,
"jest": true
},
"rules": {
// Common js rules
"camelcase": 2,
"no-extend-native": 2,
"no-proto": 2,
"no-caller": 2,
"no-unused-vars": 0,
"new-cap": 2,
"max-depth": [2, 5],
"max-statements": [2, 60],
"no-eq-null": 2,
"wrap-iife": 2,
"spaced-comment": 2,
"no-cond-assign": ["error", "always"],
"no-alert": 2,
"no-console": 2,
// NodeJs rules
"block-scoped-var": 2,
"global-require": 2,
"no-mixed-requires": 2,
"no-new-require": 2,
// ES6 rules
"no-var": 2,
"prefer-const": 2,
// React
"react/prop-types": 0,
"react/no-danger": 2,
"react/no-deprecated": 2,
// override typescript-eslint rules
"@typescript-eslint/indent": 0,
"@typescript-eslint/member-delimiter-style": 0,
"@typescript-eslint/explicit-member-accessibility": 0,
"@typescript-eslint/no-require-imports": 2,
"@typescript-eslint/no-unnecessary-type-assertion": 2,
"@typescript-eslint/no-unused-vars": [2, { "vars": "all", "args": "none" }],
"@typescript-eslint/restrict-plus-operands": 2,
"@typescript-eslint/array-type": [2, { "default": "array-simple" }],
"@typescript-eslint/explicit-function-return-type": 0,
"@typescript-eslint/ban-types": [
2,
{
"types": {
"Function": "Use proper function definition with arguments and return type instead",
"String": "Use string instead",
"Number": "Use number instead",
"Boolean": "Use boolean instead"
}
}
]
},
"settings": {
"react": {
"version": "16.9.0"
}
}
}