@paratco/eslint-config 0.5.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,249 +1,249 @@
1
- export default {
2
- // Enforce that class methods utilize this.
3
- // https://typescript-eslint.io/rules/class-methods-use-this
4
- // Note: you must disable the base rule as it can report incorrect errors
5
- "class-methods-use-this": "off",
6
- "@typescript-eslint/class-methods-use-this": [
7
- "error",
8
- {
9
- ignoreOverrideMethods: true,
10
- ignoreClassesThatImplementAnInterface: true
11
- }
12
- ],
13
-
14
- // Require return statements to either always or never specify values
15
- // https://typescript-eslint.io/rules/consistent-return/
16
- // Note: you must disable the base rule as it can report incorrect errors
17
- "consistent-return": "off",
18
- "@typescript-eslint/consistent-return": "off",
19
-
20
- // Enforce consistent usage of type exports.
21
- // https://typescript-eslint.io/rules/consistent-type-exports
22
- "@typescript-eslint/consistent-type-exports": [
23
- "error",
24
- {
25
- fixMixedExportsWithInlineTypeSpecifier: true
26
- }
27
- ],
28
-
29
- // Enforce consistent usage of type imports.
30
- // https://typescript-eslint.io/rules/consistent-type-imports
31
- "@typescript-eslint/consistent-type-imports": ["error"],
32
-
33
- // Enforce default parameters to be last.
34
- // https://typescript-eslint.io/rules/default-param-last
35
- // Note: you must disable the base rule as it can report incorrect errors
36
- "default-param-last": "off",
37
- "@typescript-eslint/default-param-last": ["error"],
38
-
39
- // Require explicit return types on functions and class methods.
40
- // https://typescript-eslint.io/rules/explicit-function-return-type
41
- "@typescript-eslint/explicit-function-return-type": [
42
- "error",
43
- {
44
- allowExpressions: true
45
- }
46
- ],
47
-
48
- // Require explicit accessibility modifiers on class properties and methods.
49
- // https://typescript-eslint.io/rules/explicit-member-accessibility
50
- "@typescript-eslint/explicit-member-accessibility": [
51
- "error",
52
- {
53
- accessibility: "no-public",
54
- overrides: {
55
- constructors: "off"
56
- }
57
- }
58
- ],
59
-
60
- // Require explicit return and argument types on exported functions' and classes' public class methods.
61
- // https://typescript-eslint.io/rules/explicit-module-boundary-types
62
- "@typescript-eslint/explicit-module-boundary-types": ["error"],
63
-
64
- // Require or disallow initialization in variable declarations.
65
- // https://typescript-eslint.io/rules/init-declarations
66
- // Note: you must disable the base rule as it can report incorrect errors
67
- "init-declarations": "off",
68
- "@typescript-eslint/init-declarations": ["off"],
69
-
70
- // Enforce a maximum number of parameters in function definitions.
71
- // https://typescript-eslint.io/rules/max-params
72
- // Note: you must disable the base rule as it can report incorrect errors
73
- "max-params": "off",
74
- "@typescript-eslint/max-params": ["off"],
75
-
76
- // Require a consistent member declaration order.
77
- // https://typescript-eslint.io/rules/member-ordering
78
- "@typescript-eslint/member-ordering": [
79
- "error",
80
- { default: ["constructor", "field", "static-method", "method", "signature"] }
81
- ],
82
-
83
- // Enforce using a particular method signature syntax.
84
- // https://typescript-eslint.io/rules/method-signature-style
85
- "@typescript-eslint/method-signature-style": ["error"],
86
-
87
- // Enforce naming conventions for everything across a codebase.
88
- // https://typescript-eslint.io/rules/naming-convention
89
- // TODO: We can split this rule. for components it enforces PascalCase and functions camelCase
90
- "@typescript-eslint/naming-convention": [
91
- "error",
92
- {
93
- selector: "function",
94
- format: ["PascalCase", "camelCase"]
95
- }
96
- ],
97
-
98
- // Disallow duplicate class members.
99
- // https://typescript-eslint.io/rules/no-dupe-class-members
100
- // Note: you must disable the base rule as it can report incorrect errors
101
- "no-dupe-class-members": "error",
102
- "@typescript-eslint/no-dupe-class-members": ["error"],
103
-
104
- // Enforce the use of top-level import type qualifier when an import only has specifiers with inline type qualifiers.
105
- // https://typescript-eslint.io/rules/no-import-type-side-effects
106
- "@typescript-eslint/no-import-type-side-effects": ["error"],
107
-
108
- // Disallow this keywords outside of classes or class-like objects.
109
- // https://typescript-eslint.io/rules/no-invalid-this
110
- // Note: you must disable the base rule as it can report incorrect errors
111
- "no-invalid-this": "off",
112
- "@typescript-eslint/no-invalid-this": ["error"],
113
-
114
- // Disallow function declarations that contain unsafe references inside loop statements.
115
- // https://typescript-eslint.io/rules/no-loop-func
116
- // Note: you must disable the base rule as it can report incorrect errors
117
- "no-loop-func": "off",
118
- "@typescript-eslint/no-loop-func": ["error"],
119
-
120
- // Disallow magic numbers.
121
- // https://typescript-eslint.io/rules/no-magic-numbers
122
- // Note: you must disable the base rule as it can report incorrect errors
123
- "no-magic-numbers": "off",
124
- "@typescript-eslint/no-magic-numbers": ["off"],
125
-
126
- // Disallow variable redeclaration.
127
- // https://typescript-eslint.io/rules/no-redeclare
128
- // Note: you must disable the base rule as it can report incorrect errors
129
- "no-redeclare": "off",
130
- "@typescript-eslint/no-redeclare": ["off"],
131
-
132
- // Disallow invocation of require().
133
- // https://typescript-eslint.io/rules/no-require-imports
134
- "@typescript-eslint/no-require-imports": ["error"],
135
-
136
- // Disallow specified modules when loaded by import.
137
- // https://typescript-eslint.io/rules/no-restricted-imports
138
- // Note: you must disable the base rule as it can report incorrect errors
139
- "no-restricted-imports": "off",
140
- "@typescript-eslint/no-restricted-imports": ["off"],
141
-
142
- // Disallow variable declarations from shadowing variables declared in the outer scope.
143
- // https://typescript-eslint.io/rules/no-shadow
144
- // Note: you must disable the base rule as it can report incorrect errors
145
- "no-shadow": "off",
146
- "@typescript-eslint/no-shadow": ["error"],
147
-
148
- // Disallow unnecessary namespace qualifiers.
149
- // https://typescript-eslint.io/rules/no-unnecessary-qualifier
150
- "@typescript-eslint/no-unnecessary-qualifier": ["warn"],
151
-
152
- // Require unary negation to take a number.
153
- // https://typescript-eslint.io/rules/no-unsafe-unary-minus
154
- "@typescript-eslint/no-unsafe-unary-minus": ["error"],
155
-
156
- // Disallow unused expressions.
157
- // https://typescript-eslint.io/rules/no-unused-expressions
158
- // Note: you must disable the base rule as it can report incorrect errors
159
- "no-unused-expressions": "off",
160
- "@typescript-eslint/no-unused-expressions": ["off"],
161
-
162
- // Disallow the use of variables before they are defined.
163
- // https://typescript-eslint.io/rules/no-use-before-define
164
- // Note: you must disable the base rule as it can report incorrect errors
165
- "no-use-before-define": "off",
166
- "@typescript-eslint/no-use-before-define": ["error"],
167
-
168
- // Disallow empty exports that don't change anything in a module file.
169
- // https://typescript-eslint.io/rules/no-useless-empty-export
170
- "@typescript-eslint/no-useless-empty-export": ["warn"],
171
-
172
- // Require or disallow parameter properties in class constructors.
173
- // https://typescript-eslint.io/rules/parameter-properties
174
- "@typescript-eslint/parameter-properties": ["error"],
175
-
176
- // Require destructuring from arrays and/or objects.
177
- // https://typescript-eslint.io/rules/prefer-destructuring
178
- // Note: you must disable the base rule as it can report incorrect errors
179
- "prefer-destructuring": "off",
180
- "@typescript-eslint/prefer-destructuring": ["off"],
181
-
182
- // Require each enum member value to be explicitly initialized.
183
- // https://typescript-eslint.io/rules/prefer-enum-initializers
184
- "@typescript-eslint/prefer-enum-initializers": ["off"],
185
-
186
- // Enforce the use of Array.prototype.find() over Array.prototype.filter() followed by [0] when looking for a single result.
187
- // https://typescript-eslint.io/rules/prefer-find
188
- "@typescript-eslint/prefer-find": ["warn"],
189
-
190
- // Require private members to be marked as readonly if they're never modified outside the constructor.
191
- // https://typescript-eslint.io/rules/prefer-readonly
192
- "@typescript-eslint/prefer-readonly": ["warn"],
193
-
194
- // Require function parameters to be typed as readonly to prevent accidental mutation of inputs.
195
- // https://typescript-eslint.io/rules/prefer-readonly-parameter-types
196
- "@typescript-eslint/prefer-readonly-parameter-types": ["off"],
197
-
198
- // Enforce RegExp#exec over String#match if no global flag is provided.
199
- // https://typescript-eslint.io/rules/prefer-regexp-exec
200
- "@typescript-eslint/prefer-regexp-exec": ["warn"],
201
-
202
- // Require any function or method that returns a Promise to be marked async.
203
- // https://typescript-eslint.io/rules/promise-function-async
204
- "@typescript-eslint/promise-function-async": ["error"],
205
-
206
- // Require Array#sort and Array#toSorted calls to always provide a compareFunction.
207
- // https://typescript-eslint.io/rules/require-array-sort-compare
208
- "@typescript-eslint/require-array-sort-compare": ["error"],
209
-
210
- // Enforce consistent returning of awaited values.
211
- // https://typescript-eslint.io/rules/return-await
212
- // Note: you must disable the base rule as it can report incorrect errors
213
- "no-return-await": "off",
214
- "@typescript-eslint/return-await": ["off"],
215
-
216
- // Enforce constituents of a type union/intersection to be sorted alphabetically.
217
- // https://typescript-eslint.io/rules/sort-type-constituents
218
- "@typescript-eslint/sort-type-constituents": ["warn"],
219
-
220
- // Disallow certain types in boolean expressions.
221
- // https://typescript-eslint.io/rules/strict-boolean-expressions
222
- "@typescript-eslint/strict-boolean-expressions": [
223
- "error",
224
- {
225
- allowString: false,
226
- allowNumber: false,
227
- allowNullableObject: false
228
- }
229
- ],
230
-
231
- // Require switch-case statements to be exhaustive.
232
- // https://typescript-eslint.io/rules/switch-exhaustiveness-check
233
- "@typescript-eslint/switch-exhaustiveness-check": ["error"],
234
-
235
- // Require type annotations in certain places.
236
- // https://typescript-eslint.io/rules/typedef
237
- "@typescript-eslint/typedef": ["off"],
238
-
239
- // Enforce template literal expressions to be of string type.
240
- // https://typescript-eslint.io/rules/restrict-template-expressions
241
- "@typescript-eslint/restrict-template-expressions": [
242
- "error",
243
- {
244
- allowBoolean: true,
245
- allowNumber: true,
246
- allowRegExp: true
247
- }
248
- ]
249
- };
1
+ export default {
2
+ // Enforce that class methods utilize this.
3
+ // https://typescript-eslint.io/rules/class-methods-use-this
4
+ // Note: you must disable the base rule as it can report incorrect errors
5
+ "class-methods-use-this": "off",
6
+ "@typescript-eslint/class-methods-use-this": [
7
+ "error",
8
+ {
9
+ ignoreOverrideMethods: true,
10
+ ignoreClassesThatImplementAnInterface: true
11
+ }
12
+ ],
13
+
14
+ // Require return statements to either always or never specify values
15
+ // https://typescript-eslint.io/rules/consistent-return/
16
+ // Note: you must disable the base rule as it can report incorrect errors
17
+ "consistent-return": "off",
18
+ "@typescript-eslint/consistent-return": "off",
19
+
20
+ // Enforce consistent usage of type exports.
21
+ // https://typescript-eslint.io/rules/consistent-type-exports
22
+ "@typescript-eslint/consistent-type-exports": [
23
+ "error",
24
+ {
25
+ fixMixedExportsWithInlineTypeSpecifier: true
26
+ }
27
+ ],
28
+
29
+ // Enforce consistent usage of type imports.
30
+ // https://typescript-eslint.io/rules/consistent-type-imports
31
+ "@typescript-eslint/consistent-type-imports": ["error"],
32
+
33
+ // Enforce default parameters to be last.
34
+ // https://typescript-eslint.io/rules/default-param-last
35
+ // Note: you must disable the base rule as it can report incorrect errors
36
+ "default-param-last": "off",
37
+ "@typescript-eslint/default-param-last": ["error"],
38
+
39
+ // Require explicit return types on functions and class methods.
40
+ // https://typescript-eslint.io/rules/explicit-function-return-type
41
+ "@typescript-eslint/explicit-function-return-type": [
42
+ "error",
43
+ {
44
+ allowExpressions: true
45
+ }
46
+ ],
47
+
48
+ // Require explicit accessibility modifiers on class properties and methods.
49
+ // https://typescript-eslint.io/rules/explicit-member-accessibility
50
+ "@typescript-eslint/explicit-member-accessibility": [
51
+ "error",
52
+ {
53
+ accessibility: "no-public",
54
+ overrides: {
55
+ constructors: "off"
56
+ }
57
+ }
58
+ ],
59
+
60
+ // Require explicit return and argument types on exported functions' and classes' public class methods.
61
+ // https://typescript-eslint.io/rules/explicit-module-boundary-types
62
+ "@typescript-eslint/explicit-module-boundary-types": ["error"],
63
+
64
+ // Require or disallow initialization in variable declarations.
65
+ // https://typescript-eslint.io/rules/init-declarations
66
+ // Note: you must disable the base rule as it can report incorrect errors
67
+ "init-declarations": "off",
68
+ "@typescript-eslint/init-declarations": ["off"],
69
+
70
+ // Enforce a maximum number of parameters in function definitions.
71
+ // https://typescript-eslint.io/rules/max-params
72
+ // Note: you must disable the base rule as it can report incorrect errors
73
+ "max-params": "off",
74
+ "@typescript-eslint/max-params": ["off"],
75
+
76
+ // Require a consistent member declaration order.
77
+ // https://typescript-eslint.io/rules/member-ordering
78
+ "@typescript-eslint/member-ordering": [
79
+ "error",
80
+ { default: ["constructor", "field", "static-method", "method", "signature"] }
81
+ ],
82
+
83
+ // Enforce using a particular method signature syntax.
84
+ // https://typescript-eslint.io/rules/method-signature-style
85
+ "@typescript-eslint/method-signature-style": ["error"],
86
+
87
+ // Enforce naming conventions for everything across a codebase.
88
+ // https://typescript-eslint.io/rules/naming-convention
89
+ // TODO: We can split this rule. for components it enforces PascalCase and functions camelCase
90
+ "@typescript-eslint/naming-convention": [
91
+ "error",
92
+ {
93
+ selector: "function",
94
+ format: ["PascalCase", "camelCase"]
95
+ }
96
+ ],
97
+
98
+ // Disallow duplicate class members.
99
+ // https://typescript-eslint.io/rules/no-dupe-class-members
100
+ // Note: you must disable the base rule as it can report incorrect errors
101
+ "no-dupe-class-members": "error",
102
+ "@typescript-eslint/no-dupe-class-members": ["error"],
103
+
104
+ // Enforce the use of top-level import type qualifier when an import only has specifiers with inline type qualifiers.
105
+ // https://typescript-eslint.io/rules/no-import-type-side-effects
106
+ "@typescript-eslint/no-import-type-side-effects": ["error"],
107
+
108
+ // Disallow this keywords outside of classes or class-like objects.
109
+ // https://typescript-eslint.io/rules/no-invalid-this
110
+ // Note: you must disable the base rule as it can report incorrect errors
111
+ "no-invalid-this": "off",
112
+ "@typescript-eslint/no-invalid-this": ["error"],
113
+
114
+ // Disallow function declarations that contain unsafe references inside loop statements.
115
+ // https://typescript-eslint.io/rules/no-loop-func
116
+ // Note: you must disable the base rule as it can report incorrect errors
117
+ "no-loop-func": "off",
118
+ "@typescript-eslint/no-loop-func": ["error"],
119
+
120
+ // Disallow magic numbers.
121
+ // https://typescript-eslint.io/rules/no-magic-numbers
122
+ // Note: you must disable the base rule as it can report incorrect errors
123
+ "no-magic-numbers": "off",
124
+ "@typescript-eslint/no-magic-numbers": ["off"],
125
+
126
+ // Disallow variable redeclaration.
127
+ // https://typescript-eslint.io/rules/no-redeclare
128
+ // Note: you must disable the base rule as it can report incorrect errors
129
+ "no-redeclare": "off",
130
+ "@typescript-eslint/no-redeclare": ["off"],
131
+
132
+ // Disallow invocation of require().
133
+ // https://typescript-eslint.io/rules/no-require-imports
134
+ "@typescript-eslint/no-require-imports": ["error"],
135
+
136
+ // Disallow specified modules when loaded by import.
137
+ // https://typescript-eslint.io/rules/no-restricted-imports
138
+ // Note: you must disable the base rule as it can report incorrect errors
139
+ "no-restricted-imports": "off",
140
+ "@typescript-eslint/no-restricted-imports": ["off"],
141
+
142
+ // Disallow variable declarations from shadowing variables declared in the outer scope.
143
+ // https://typescript-eslint.io/rules/no-shadow
144
+ // Note: you must disable the base rule as it can report incorrect errors
145
+ "no-shadow": "off",
146
+ "@typescript-eslint/no-shadow": ["error"],
147
+
148
+ // Disallow unnecessary namespace qualifiers.
149
+ // https://typescript-eslint.io/rules/no-unnecessary-qualifier
150
+ "@typescript-eslint/no-unnecessary-qualifier": ["warn"],
151
+
152
+ // Require unary negation to take a number.
153
+ // https://typescript-eslint.io/rules/no-unsafe-unary-minus
154
+ "@typescript-eslint/no-unsafe-unary-minus": ["error"],
155
+
156
+ // Disallow unused expressions.
157
+ // https://typescript-eslint.io/rules/no-unused-expressions
158
+ // Note: you must disable the base rule as it can report incorrect errors
159
+ "no-unused-expressions": "off",
160
+ "@typescript-eslint/no-unused-expressions": ["off"],
161
+
162
+ // Disallow the use of variables before they are defined.
163
+ // https://typescript-eslint.io/rules/no-use-before-define
164
+ // Note: you must disable the base rule as it can report incorrect errors
165
+ "no-use-before-define": "off",
166
+ "@typescript-eslint/no-use-before-define": ["error"],
167
+
168
+ // Disallow empty exports that don't change anything in a module file.
169
+ // https://typescript-eslint.io/rules/no-useless-empty-export
170
+ "@typescript-eslint/no-useless-empty-export": ["warn"],
171
+
172
+ // Require or disallow parameter properties in class constructors.
173
+ // https://typescript-eslint.io/rules/parameter-properties
174
+ "@typescript-eslint/parameter-properties": ["error"],
175
+
176
+ // Require destructuring from arrays and/or objects.
177
+ // https://typescript-eslint.io/rules/prefer-destructuring
178
+ // Note: you must disable the base rule as it can report incorrect errors
179
+ "prefer-destructuring": "off",
180
+ "@typescript-eslint/prefer-destructuring": ["off"],
181
+
182
+ // Require each enum member value to be explicitly initialized.
183
+ // https://typescript-eslint.io/rules/prefer-enum-initializers
184
+ "@typescript-eslint/prefer-enum-initializers": ["off"],
185
+
186
+ // Enforce the use of Array.prototype.find() over Array.prototype.filter() followed by [0] when looking for a single result.
187
+ // https://typescript-eslint.io/rules/prefer-find
188
+ "@typescript-eslint/prefer-find": ["warn"],
189
+
190
+ // Require private members to be marked as readonly if they're never modified outside the constructor.
191
+ // https://typescript-eslint.io/rules/prefer-readonly
192
+ "@typescript-eslint/prefer-readonly": ["warn"],
193
+
194
+ // Require function parameters to be typed as readonly to prevent accidental mutation of inputs.
195
+ // https://typescript-eslint.io/rules/prefer-readonly-parameter-types
196
+ "@typescript-eslint/prefer-readonly-parameter-types": ["off"],
197
+
198
+ // Enforce RegExp#exec over String#match if no global flag is provided.
199
+ // https://typescript-eslint.io/rules/prefer-regexp-exec
200
+ "@typescript-eslint/prefer-regexp-exec": ["warn"],
201
+
202
+ // Require any function or method that returns a Promise to be marked async.
203
+ // https://typescript-eslint.io/rules/promise-function-async
204
+ "@typescript-eslint/promise-function-async": ["error"],
205
+
206
+ // Require Array#sort and Array#toSorted calls to always provide a compareFunction.
207
+ // https://typescript-eslint.io/rules/require-array-sort-compare
208
+ "@typescript-eslint/require-array-sort-compare": ["error"],
209
+
210
+ // Enforce consistent returning of awaited values.
211
+ // https://typescript-eslint.io/rules/return-await
212
+ // Note: you must disable the base rule as it can report incorrect errors
213
+ "no-return-await": "off",
214
+ "@typescript-eslint/return-await": ["off"],
215
+
216
+ // Enforce constituents of a type union/intersection to be sorted alphabetically.
217
+ // https://typescript-eslint.io/rules/sort-type-constituents
218
+ "@typescript-eslint/sort-type-constituents": ["warn"],
219
+
220
+ // Disallow certain types in boolean expressions.
221
+ // https://typescript-eslint.io/rules/strict-boolean-expressions
222
+ "@typescript-eslint/strict-boolean-expressions": [
223
+ "error",
224
+ {
225
+ allowString: false,
226
+ allowNumber: false,
227
+ allowNullableObject: false
228
+ }
229
+ ],
230
+
231
+ // Require switch-case statements to be exhaustive.
232
+ // https://typescript-eslint.io/rules/switch-exhaustiveness-check
233
+ "@typescript-eslint/switch-exhaustiveness-check": ["error"],
234
+
235
+ // Require type annotations in certain places.
236
+ // https://typescript-eslint.io/rules/typedef
237
+ "@typescript-eslint/typedef": ["off"],
238
+
239
+ // Enforce template literal expressions to be of string type.
240
+ // https://typescript-eslint.io/rules/restrict-template-expressions
241
+ "@typescript-eslint/restrict-template-expressions": [
242
+ "error",
243
+ {
244
+ allowBoolean: true,
245
+ allowNumber: true,
246
+ allowRegExp: true
247
+ }
248
+ ]
249
+ };
package/eslint.config.mjs DELETED
@@ -1,81 +0,0 @@
1
- import globals from 'globals';
2
- import eslint from '@eslint/js';
3
- import tseslint from 'typescript-eslint';
4
-
5
- // Fix plugins compatibility with ESLint 9.x
6
- import { fixupRule, fixupPluginRules } from '@eslint/compat';
7
-
8
- // Plugins
9
- import react from 'eslint-plugin-react';
10
- import reactHooks from 'eslint-plugin-react-hooks';
11
- import reactRefresh from 'eslint-plugin-react-refresh';
12
- import eslintConfigPrettier from 'eslint-config-prettier';
13
-
14
- // Custom Rules
15
- import typescriptRules from './src/lints/typescript/index.js';
16
- import reactRules from './src/lints/react/index.js';
17
-
18
- export default [
19
- // Set predefined configs
20
- eslint.configs.recommended,
21
- ...tseslint.configs.strictTypeChecked,
22
- ...tseslint.configs.stylisticTypeChecked,
23
-
24
- // Browser Only
25
- { languageOptions: { globals: globals.browser } },
26
-
27
- // Enable JSX
28
- { files: ['**/*.tsx'], languageOptions: { parserOptions: { ecmaFeatures: { jsx: true } } } },
29
-
30
- // TypeScript Rules
31
- {
32
- files: ['**/*.{ts,tsx}'],
33
- rules: {
34
- ...typescriptRules
35
- }
36
- },
37
-
38
- // React Plugin
39
- {
40
- files: ['**/*.{js,jsx,mjs,cjs,ts,tsx}'],
41
- plugins: {
42
- react: fixupPluginRules(react),
43
- 'react-hooks': reactHooks,
44
- 'react-refresh': reactRefresh
45
- },
46
- settings: {
47
- react: {
48
- version: 'detect'
49
- }
50
- },
51
- languageOptions: {
52
- parserOptions: {
53
- ecmaFeatures: {
54
- jsx: true
55
- }
56
- },
57
- globals: {
58
- ...globals.browser
59
- }
60
- },
61
- rules: {
62
- ...reactRules,
63
- // ...react.configs.recommended.rules,
64
- ...reactHooks.configs.recommended.rules,
65
-
66
- // Enforce Rules of Hooks
67
- 'react-hooks/rules-of-hooks': ['error'],
68
- // Verify the list of the dependencies for Hooks like useEffect and similar
69
- 'react-hooks/exhaustive-deps': ['error'],
70
-
71
- // React Refresh
72
- 'react-refresh/only-export-components': ['warn', { allowConstantExport: true }]
73
- }
74
- },
75
-
76
- {
77
- ignores: ['lints']
78
- },
79
-
80
- eslintConfigPrettier
81
- ];