diff options
Diffstat (limited to '.eslintrc.json')
-rw-r--r-- | .eslintrc.json | 148 |
1 files changed, 148 insertions, 0 deletions
diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..c0512ef --- /dev/null +++ b/.eslintrc.json | |||
@@ -0,0 +1,148 @@ | |||
1 | { | ||
2 | "root": true, | ||
3 | "env": { | ||
4 | "browser": true, | ||
5 | "es2021": true | ||
6 | }, | ||
7 | "extends": [ | ||
8 | "eslint:recommended", | ||
9 | "plugin:react/recommended", | ||
10 | "plugin:import/recommended", | ||
11 | "plugin:import/typescript", | ||
12 | "airbnb-typescript" | ||
13 | ], | ||
14 | "parser": "@typescript-eslint/parser", | ||
15 | "parserOptions": { | ||
16 | "ecmaFeatures": { | ||
17 | "jsx": true | ||
18 | }, | ||
19 | "ecmaVersion": 2021, | ||
20 | "project": "./tsconfig.json" | ||
21 | }, | ||
22 | "plugins": [ | ||
23 | "react", | ||
24 | "@typescript-eslint" | ||
25 | ], | ||
26 | "rules": { | ||
27 | "indent": [ | ||
28 | 2, | ||
29 | 2, | ||
30 | { | ||
31 | "SwitchCase": 1 | ||
32 | } | ||
33 | ], | ||
34 | "quotes": [ | ||
35 | 2, | ||
36 | "single" | ||
37 | ], | ||
38 | "linebreak-style": [ | ||
39 | 2, | ||
40 | "unix" | ||
41 | ], | ||
42 | "semi": [ | ||
43 | 2, | ||
44 | "always" | ||
45 | ], | ||
46 | // Best practices | ||
47 | "block-scoped-var": 1, | ||
48 | "complexity": [ | ||
49 | 1, | ||
50 | 4 | ||
51 | ], | ||
52 | "consistent-return": 1, | ||
53 | "curly": 1, | ||
54 | "default-case": 1, | ||
55 | "dot-location": [ | ||
56 | 1, "property" | ||
57 | ], | ||
58 | "dot-notation": 1, | ||
59 | "eqeqeq": 2, | ||
60 | "guard-for-in": 1, | ||
61 | "no-alert": 2, | ||
62 | "no-caller": 2, | ||
63 | "no-case-declarations": 2, | ||
64 | "no-console": 0, | ||
65 | "no-div-regex": 1, | ||
66 | "no-else-return": 0, | ||
67 | "no-empty": 0, | ||
68 | "no-empty-pattern": 2, | ||
69 | "no-eq-null": 2, | ||
70 | "no-eval": 2, | ||
71 | "no-extend-native": 1, | ||
72 | "no-extra-bind": 1, | ||
73 | "no-fallthrough": 1, | ||
74 | "no-floating-decimal": 1, | ||
75 | "no-implicit-coercion": 1, | ||
76 | "no-implied-eval": 1, | ||
77 | "no-invalid-this": 2, | ||
78 | "no-iterator": 2, | ||
79 | "no-labels": 1, | ||
80 | "no-lone-blocks": 1, | ||
81 | "no-loop-func": 2, | ||
82 | "no-magic-numbers": [ | ||
83 | 2, | ||
84 | { | ||
85 | "ignore": [ | ||
86 | -1, | ||
87 | 0, | ||
88 | 1, | ||
89 | 2, | ||
90 | 100, | ||
91 | 200, | ||
92 | 422, | ||
93 | 3600000, | ||
94 | 1453449120000, | ||
95 | 1453445460000 | ||
96 | ] | ||
97 | } | ||
98 | ], | ||
99 | "no-multi-spaces": 1, | ||
100 | "no-multi-str": 1, | ||
101 | "no-native-reassign": 1, | ||
102 | "no-new-func": 2, | ||
103 | "no-new-wrappers": 2, | ||
104 | "no-new": 1, | ||
105 | "no-octal-escape": 1, | ||
106 | "no-octal": 1, | ||
107 | "no-param-reassign": 1, | ||
108 | "no-process-env": 2, | ||
109 | "no-proto": 2, | ||
110 | "no-redeclare": 1, | ||
111 | "no-return-assign": 2, | ||
112 | "no-script-url": 2, | ||
113 | "no-self-compare": 1, | ||
114 | "no-sequences": 1, | ||
115 | "no-throw-literal": 2, | ||
116 | "no-unused-expressions": [ | ||
117 | 1, | ||
118 | { "allowTernary": true | ||
119 | } | ||
120 | ], | ||
121 | "no-useless-call": 2, | ||
122 | "no-useless-concat": 1, | ||
123 | "no-void": 2, | ||
124 | "no-warning-comments": 0, | ||
125 | "no-with": 2, | ||
126 | "radix": 1, | ||
127 | "vars-on-top": 0, | ||
128 | "wrap-iife": 2, | ||
129 | "yoda": 0, | ||
130 | // Strict mode | ||
131 | "strict": 1, | ||
132 | // Variables | ||
133 | "init-declarations": 0, | ||
134 | "no-catch-shadow": 2, | ||
135 | "no-delete-var": 2, | ||
136 | "no-label-var": 2, | ||
137 | "no-shadow-restricted-names": 2, | ||
138 | "no-shadow": 2, | ||
139 | "no-undef-init": 1, | ||
140 | "no-undef": 2, | ||
141 | "no-undefined": 0, | ||
142 | "no-unused-vars": 2, | ||
143 | "no-use-before-define": 2 | ||
144 | }, | ||
145 | "globals": { | ||
146 | "it": false | ||
147 | } | ||
148 | } | ||