@egy186/eslint-config 3.4.0 → 3.5.0
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.
- package/README.md +21 -1
- package/dist/react.d.ts +26 -0
- package/dist/react.js +26 -0
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
7
7
|
```sh
|
|
8
|
-
npm install @egy186/eslint-config
|
|
8
|
+
npm install -D eslint @egy186/eslint-config
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
## `eslint.config.js`
|
|
@@ -24,6 +24,10 @@ export { commonjs as default } from '@egy186/eslint-config';
|
|
|
24
24
|
|
|
25
25
|
Browser, React:
|
|
26
26
|
|
|
27
|
+
```sh
|
|
28
|
+
npm install -D eslint-plugin-react eslint-plugin-react-hooks
|
|
29
|
+
```
|
|
30
|
+
|
|
27
31
|
```js
|
|
28
32
|
import { browser } from '@egy186/eslint-config';
|
|
29
33
|
import { react } from '@egy186/eslint-config/react';
|
|
@@ -33,6 +37,10 @@ export default [browser, react];
|
|
|
33
37
|
|
|
34
38
|
TypeScript:
|
|
35
39
|
|
|
40
|
+
```sh
|
|
41
|
+
npm install -D typescript-eslint eslint-import-resolver-typescript
|
|
42
|
+
```
|
|
43
|
+
|
|
36
44
|
```js
|
|
37
45
|
import { base } from '@egy186/eslint-config';
|
|
38
46
|
import { typescript } from '@egy186/eslint-config/typescript';
|
|
@@ -42,6 +50,10 @@ export default [base, typescript];
|
|
|
42
50
|
|
|
43
51
|
TypeScript, tsconfig:
|
|
44
52
|
|
|
53
|
+
```sh
|
|
54
|
+
npm install -D typescript-eslint eslint-import-resolver-typescript
|
|
55
|
+
```
|
|
56
|
+
|
|
45
57
|
```js
|
|
46
58
|
import { base } from '@egy186/eslint-config';
|
|
47
59
|
import { typescriptConfig } from '@egy186/eslint-config/typescript';
|
|
@@ -51,6 +63,10 @@ export default [base, typescriptConfig({ projectService: { allowDefaultProject:
|
|
|
51
63
|
|
|
52
64
|
Jest:
|
|
53
65
|
|
|
66
|
+
```sh
|
|
67
|
+
npm install -D eslint-plugin-jest
|
|
68
|
+
```
|
|
69
|
+
|
|
54
70
|
```js
|
|
55
71
|
import { base } from '@egy186/eslint-config';
|
|
56
72
|
import { jest } from '@egy186/eslint-config/jest';
|
|
@@ -60,6 +76,10 @@ export default [base, jest];
|
|
|
60
76
|
|
|
61
77
|
Vitest:
|
|
62
78
|
|
|
79
|
+
```sh
|
|
80
|
+
npm install -D @vitest/eslint-plugin
|
|
81
|
+
```
|
|
82
|
+
|
|
63
83
|
```js
|
|
64
84
|
import { base } from '@egy186/eslint-config';
|
|
65
85
|
import { vitest } from '@egy186/eslint-config/vitest';
|
package/dist/react.d.ts
CHANGED
|
@@ -285,8 +285,34 @@ declare const config: {
|
|
|
285
285
|
readonly 'react-hooks': typeof reactHooksPlugin;
|
|
286
286
|
};
|
|
287
287
|
readonly rules: {
|
|
288
|
+
readonly 'react-hooks/automatic-effect-dependencies': "off";
|
|
289
|
+
readonly 'react-hooks/capitalized-calls': "off";
|
|
290
|
+
readonly 'react-hooks/component-hook-factories': "error";
|
|
291
|
+
readonly 'react-hooks/config': "error";
|
|
292
|
+
readonly 'react-hooks/error-boundaries': "error";
|
|
288
293
|
readonly 'react-hooks/exhaustive-deps': "error";
|
|
294
|
+
readonly 'react-hooks/fbt': "off";
|
|
295
|
+
readonly 'react-hooks/fire': "off";
|
|
296
|
+
readonly 'react-hooks/gating': "error";
|
|
297
|
+
readonly 'react-hooks/globals': "error";
|
|
298
|
+
readonly 'react-hooks/hooks': "off";
|
|
299
|
+
readonly 'react-hooks/immutability': "error";
|
|
300
|
+
readonly 'react-hooks/incompatible-library': "error";
|
|
301
|
+
readonly 'react-hooks/invariant': "off";
|
|
302
|
+
readonly 'react-hooks/memoized-effect-dependencies': "off";
|
|
303
|
+
readonly 'react-hooks/no-deriving-state-in-effects': "off";
|
|
304
|
+
readonly 'react-hooks/preserve-manual-memoization': "error";
|
|
305
|
+
readonly 'react-hooks/purity': "error";
|
|
306
|
+
readonly 'react-hooks/refs': "error";
|
|
307
|
+
readonly 'react-hooks/rule-suppression': "off";
|
|
289
308
|
readonly 'react-hooks/rules-of-hooks': "error";
|
|
309
|
+
readonly 'react-hooks/set-state-in-effect': "error";
|
|
310
|
+
readonly 'react-hooks/set-state-in-render': "error";
|
|
311
|
+
readonly 'react-hooks/static-components': "error";
|
|
312
|
+
readonly 'react-hooks/syntax': "off";
|
|
313
|
+
readonly 'react-hooks/todo': "off";
|
|
314
|
+
readonly 'react-hooks/unsupported-syntax': "error";
|
|
315
|
+
readonly 'react-hooks/use-memo': "error";
|
|
290
316
|
readonly 'react/boolean-prop-naming': "error";
|
|
291
317
|
readonly 'react/button-has-type': "error";
|
|
292
318
|
readonly 'react/checked-requires-onchange-or-readonly': "error";
|
package/dist/react.js
CHANGED
|
@@ -13,8 +13,34 @@ const config = {
|
|
|
13
13
|
'react-hooks': reactHooksPlugin
|
|
14
14
|
},
|
|
15
15
|
rules: {
|
|
16
|
+
'react-hooks/automatic-effect-dependencies': 'off',
|
|
17
|
+
'react-hooks/capitalized-calls': 'off',
|
|
18
|
+
'react-hooks/component-hook-factories': 'error',
|
|
19
|
+
'react-hooks/config': 'error',
|
|
20
|
+
'react-hooks/error-boundaries': 'error',
|
|
16
21
|
'react-hooks/exhaustive-deps': 'error',
|
|
22
|
+
'react-hooks/fbt': 'off',
|
|
23
|
+
'react-hooks/fire': 'off',
|
|
24
|
+
'react-hooks/gating': 'error',
|
|
25
|
+
'react-hooks/globals': 'error',
|
|
26
|
+
'react-hooks/hooks': 'off',
|
|
27
|
+
'react-hooks/immutability': 'error',
|
|
28
|
+
'react-hooks/incompatible-library': 'error',
|
|
29
|
+
'react-hooks/invariant': 'off',
|
|
30
|
+
'react-hooks/memoized-effect-dependencies': 'off',
|
|
31
|
+
'react-hooks/no-deriving-state-in-effects': 'off',
|
|
32
|
+
'react-hooks/preserve-manual-memoization': 'error',
|
|
33
|
+
'react-hooks/purity': 'error',
|
|
34
|
+
'react-hooks/refs': 'error',
|
|
35
|
+
'react-hooks/rule-suppression': 'off',
|
|
17
36
|
'react-hooks/rules-of-hooks': 'error',
|
|
37
|
+
'react-hooks/set-state-in-effect': 'error',
|
|
38
|
+
'react-hooks/set-state-in-render': 'error',
|
|
39
|
+
'react-hooks/static-components': 'error',
|
|
40
|
+
'react-hooks/syntax': 'off',
|
|
41
|
+
'react-hooks/todo': 'off',
|
|
42
|
+
'react-hooks/unsupported-syntax': 'error',
|
|
43
|
+
'react-hooks/use-memo': 'error',
|
|
18
44
|
'react/boolean-prop-naming': 'error',
|
|
19
45
|
'react/button-has-type': 'error',
|
|
20
46
|
'react/checked-requires-onchange-or-readonly': 'error',
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@egy186/eslint-config",
|
|
3
3
|
"description": "Eslint shareable config",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.5.0",
|
|
5
5
|
"author": "egy186",
|
|
6
6
|
"bugs": {
|
|
7
7
|
"url": "https://github.com/egy186/eslint-config/issues"
|
|
@@ -9,19 +9,19 @@
|
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"@stylistic/eslint-plugin": "~5.4.0",
|
|
11
11
|
"eslint-plugin-import": "~2.32.0",
|
|
12
|
-
"eslint-plugin-jsdoc": "~60.
|
|
12
|
+
"eslint-plugin-jsdoc": "~60.8.0",
|
|
13
13
|
"eslint-plugin-n": "~17.23.1",
|
|
14
14
|
"globals": "^16.4.0"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
|
-
"@eslint/js": "~9.
|
|
17
|
+
"@eslint/js": "~9.37.0",
|
|
18
18
|
"@types/node": "^24.6.2",
|
|
19
19
|
"@vitest/eslint-plugin": "~1.3.15",
|
|
20
|
-
"eslint": "~9.
|
|
20
|
+
"eslint": "~9.37.0",
|
|
21
21
|
"eslint-import-resolver-typescript": "~4.4.4",
|
|
22
22
|
"eslint-plugin-jest": "~29.0.1",
|
|
23
23
|
"eslint-plugin-react": "~7.37.5",
|
|
24
|
-
"eslint-plugin-react-hooks": "~
|
|
24
|
+
"eslint-plugin-react-hooks": "~6.1.1",
|
|
25
25
|
"husky": "^9.1.7",
|
|
26
26
|
"jiti": "^2.6.1",
|
|
27
27
|
"typescript": "~5.9.3",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"eslint-import-resolver-typescript": "^4.2.2",
|
|
72
72
|
"eslint-plugin-jest": "^29.0.1",
|
|
73
73
|
"eslint-plugin-react": "^7.36.1",
|
|
74
|
-
"eslint-plugin-react-hooks": "^
|
|
74
|
+
"eslint-plugin-react-hooks": "^6.1.1",
|
|
75
75
|
"typescript": "^5.0.4",
|
|
76
76
|
"typescript-eslint": "^8.32.0"
|
|
77
77
|
},
|