@egy186/eslint-config 1.3.0 → 2.0.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.
- package/dist/base.d.ts +3 -11
- package/dist/base.js +1 -3
- package/dist/browser.d.ts +3 -11
- package/dist/commonjs.d.ts +3 -11
- package/dist/react.js +1 -2
- package/dist/rules/eslint-rules.d.ts +2 -8
- package/dist/rules/eslint-rules.js +2 -11
- package/dist/typescript.d.ts +2 -2
- package/package.json +8 -10
package/dist/base.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { ESLint, Linter } from 'eslint';
|
|
|
2
2
|
declare const config: {
|
|
3
3
|
readonly files: ["**/*.{js,jsx,mjs}", "**/*.{ts,tsx,mts}"];
|
|
4
4
|
readonly languageOptions: {
|
|
5
|
+
readonly ecmaVersion: 2023;
|
|
5
6
|
readonly globals: {
|
|
6
7
|
readonly __dirname: false;
|
|
7
8
|
readonly __filename: false;
|
|
@@ -138,9 +139,6 @@ declare const config: {
|
|
|
138
139
|
readonly WeakRef: false;
|
|
139
140
|
readonly WeakSet: false;
|
|
140
141
|
};
|
|
141
|
-
readonly parserOptions: {
|
|
142
|
-
readonly ecmaVersion: 2023;
|
|
143
|
-
};
|
|
144
142
|
readonly sourceType: "module";
|
|
145
143
|
};
|
|
146
144
|
readonly linterOptions: {
|
|
@@ -461,7 +459,6 @@ declare const config: {
|
|
|
461
459
|
readonly 'import/prefer-default-export': "error";
|
|
462
460
|
readonly 'import/unambiguous': "error";
|
|
463
461
|
readonly 'no-duplicate-imports': "off";
|
|
464
|
-
readonly 'line-comment-position': "off";
|
|
465
462
|
readonly 'unicode-bom': ["error", string];
|
|
466
463
|
readonly 'accessor-pairs': "error";
|
|
467
464
|
readonly 'arrow-body-style': ["error", string];
|
|
@@ -497,7 +494,6 @@ declare const config: {
|
|
|
497
494
|
readonly 'max-nested-callbacks': "error";
|
|
498
495
|
readonly 'max-params': "off";
|
|
499
496
|
readonly 'max-statements': "warn";
|
|
500
|
-
readonly 'multiline-comment-style': "error";
|
|
501
497
|
readonly 'new-cap': "error";
|
|
502
498
|
readonly 'no-alert': "error";
|
|
503
499
|
readonly 'no-array-constructor': "error";
|
|
@@ -646,7 +642,6 @@ declare const config: {
|
|
|
646
642
|
readonly 'no-loss-of-precision': "error";
|
|
647
643
|
readonly 'no-misleading-character-class': "error";
|
|
648
644
|
readonly 'no-new-native-nonconstructor': "error";
|
|
649
|
-
readonly 'no-new-symbol': "error";
|
|
650
645
|
readonly 'no-obj-calls': "error";
|
|
651
646
|
readonly 'no-promise-executor-return': "error";
|
|
652
647
|
readonly 'no-prototype-builtins': "error";
|
|
@@ -667,12 +662,9 @@ declare const config: {
|
|
|
667
662
|
disallowArithmeticOperators: boolean;
|
|
668
663
|
}];
|
|
669
664
|
readonly 'no-unused-private-class-members': "error";
|
|
670
|
-
readonly 'no-unused-vars':
|
|
671
|
-
args: string;
|
|
672
|
-
caughtErrors: string;
|
|
673
|
-
vars: string;
|
|
674
|
-
}];
|
|
665
|
+
readonly 'no-unused-vars': "error";
|
|
675
666
|
readonly 'no-use-before-define': "error";
|
|
667
|
+
readonly 'no-useless-assignment': "error";
|
|
676
668
|
readonly 'no-useless-backreference': "error";
|
|
677
669
|
readonly 'require-atomic-updates': "error";
|
|
678
670
|
readonly 'use-isnan': "error";
|
package/dist/base.js
CHANGED
|
@@ -13,13 +13,11 @@ import stylisticRules from './rules/stylistic-rules.js';
|
|
|
13
13
|
const config = {
|
|
14
14
|
files: ['**/*.{js,jsx,mjs}', '**/*.{ts,tsx,mts}'],
|
|
15
15
|
languageOptions: {
|
|
16
|
+
ecmaVersion: 2023,
|
|
16
17
|
globals: {
|
|
17
18
|
...globals.es2023,
|
|
18
19
|
...globals.node
|
|
19
20
|
},
|
|
20
|
-
parserOptions: {
|
|
21
|
-
ecmaVersion: 2023
|
|
22
|
-
},
|
|
23
21
|
sourceType: 'module'
|
|
24
22
|
},
|
|
25
23
|
linterOptions: {
|
package/dist/browser.d.ts
CHANGED
|
@@ -1187,9 +1187,7 @@ declare const config: {
|
|
|
1187
1187
|
readonly WeakRef: false;
|
|
1188
1188
|
readonly WeakSet: false;
|
|
1189
1189
|
};
|
|
1190
|
-
readonly
|
|
1191
|
-
readonly ecmaVersion: 2023;
|
|
1192
|
-
};
|
|
1190
|
+
readonly ecmaVersion: 2023;
|
|
1193
1191
|
readonly sourceType: "module";
|
|
1194
1192
|
};
|
|
1195
1193
|
readonly rules: {
|
|
@@ -1489,7 +1487,6 @@ declare const config: {
|
|
|
1489
1487
|
readonly 'import/prefer-default-export': "error";
|
|
1490
1488
|
readonly 'import/unambiguous': "error";
|
|
1491
1489
|
readonly 'no-duplicate-imports': "off";
|
|
1492
|
-
readonly 'line-comment-position': "off";
|
|
1493
1490
|
readonly 'unicode-bom': ["error", string];
|
|
1494
1491
|
readonly 'accessor-pairs': "error";
|
|
1495
1492
|
readonly 'arrow-body-style': ["error", string];
|
|
@@ -1525,7 +1522,6 @@ declare const config: {
|
|
|
1525
1522
|
readonly 'max-nested-callbacks': "error";
|
|
1526
1523
|
readonly 'max-params': "off";
|
|
1527
1524
|
readonly 'max-statements': "warn";
|
|
1528
|
-
readonly 'multiline-comment-style': "error";
|
|
1529
1525
|
readonly 'new-cap': "error";
|
|
1530
1526
|
readonly 'no-alert': "error";
|
|
1531
1527
|
readonly 'no-array-constructor': "error";
|
|
@@ -1674,7 +1670,6 @@ declare const config: {
|
|
|
1674
1670
|
readonly 'no-loss-of-precision': "error";
|
|
1675
1671
|
readonly 'no-misleading-character-class': "error";
|
|
1676
1672
|
readonly 'no-new-native-nonconstructor': "error";
|
|
1677
|
-
readonly 'no-new-symbol': "error";
|
|
1678
1673
|
readonly 'no-obj-calls': "error";
|
|
1679
1674
|
readonly 'no-promise-executor-return': "error";
|
|
1680
1675
|
readonly 'no-prototype-builtins': "error";
|
|
@@ -1695,12 +1690,9 @@ declare const config: {
|
|
|
1695
1690
|
disallowArithmeticOperators: boolean;
|
|
1696
1691
|
}];
|
|
1697
1692
|
readonly 'no-unused-private-class-members': "error";
|
|
1698
|
-
readonly 'no-unused-vars':
|
|
1699
|
-
args: string;
|
|
1700
|
-
caughtErrors: string;
|
|
1701
|
-
vars: string;
|
|
1702
|
-
}];
|
|
1693
|
+
readonly 'no-unused-vars': "error";
|
|
1703
1694
|
readonly 'no-use-before-define': "error";
|
|
1695
|
+
readonly 'no-useless-assignment': "error";
|
|
1704
1696
|
readonly 'no-useless-backreference': "error";
|
|
1705
1697
|
readonly 'require-atomic-updates': "error";
|
|
1706
1698
|
readonly 'use-isnan': "error";
|
package/dist/commonjs.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ declare const config: {
|
|
|
3
3
|
readonly files: ["**/*.{cjs,cts}"];
|
|
4
4
|
readonly languageOptions: {
|
|
5
5
|
readonly sourceType: "commonjs";
|
|
6
|
+
readonly ecmaVersion: 2023;
|
|
6
7
|
readonly globals: {
|
|
7
8
|
readonly __dirname: false;
|
|
8
9
|
readonly __filename: false;
|
|
@@ -139,9 +140,6 @@ declare const config: {
|
|
|
139
140
|
readonly WeakRef: false;
|
|
140
141
|
readonly WeakSet: false;
|
|
141
142
|
};
|
|
142
|
-
readonly parserOptions: {
|
|
143
|
-
readonly ecmaVersion: 2023;
|
|
144
|
-
};
|
|
145
143
|
};
|
|
146
144
|
readonly rules: {
|
|
147
145
|
readonly '@stylistic/array-bracket-newline': "error";
|
|
@@ -440,7 +438,6 @@ declare const config: {
|
|
|
440
438
|
readonly 'import/prefer-default-export': "error";
|
|
441
439
|
readonly 'import/unambiguous': "error";
|
|
442
440
|
readonly 'no-duplicate-imports': "off";
|
|
443
|
-
readonly 'line-comment-position': "off";
|
|
444
441
|
readonly 'unicode-bom': ["error", string];
|
|
445
442
|
readonly 'accessor-pairs': "error";
|
|
446
443
|
readonly 'arrow-body-style': ["error", string];
|
|
@@ -476,7 +473,6 @@ declare const config: {
|
|
|
476
473
|
readonly 'max-nested-callbacks': "error";
|
|
477
474
|
readonly 'max-params': "off";
|
|
478
475
|
readonly 'max-statements': "warn";
|
|
479
|
-
readonly 'multiline-comment-style': "error";
|
|
480
476
|
readonly 'new-cap': "error";
|
|
481
477
|
readonly 'no-alert': "error";
|
|
482
478
|
readonly 'no-array-constructor': "error";
|
|
@@ -625,7 +621,6 @@ declare const config: {
|
|
|
625
621
|
readonly 'no-loss-of-precision': "error";
|
|
626
622
|
readonly 'no-misleading-character-class': "error";
|
|
627
623
|
readonly 'no-new-native-nonconstructor': "error";
|
|
628
|
-
readonly 'no-new-symbol': "error";
|
|
629
624
|
readonly 'no-obj-calls': "error";
|
|
630
625
|
readonly 'no-promise-executor-return': "error";
|
|
631
626
|
readonly 'no-prototype-builtins': "error";
|
|
@@ -646,12 +641,9 @@ declare const config: {
|
|
|
646
641
|
disallowArithmeticOperators: boolean;
|
|
647
642
|
}];
|
|
648
643
|
readonly 'no-unused-private-class-members': "error";
|
|
649
|
-
readonly 'no-unused-vars':
|
|
650
|
-
args: string;
|
|
651
|
-
caughtErrors: string;
|
|
652
|
-
vars: string;
|
|
653
|
-
}];
|
|
644
|
+
readonly 'no-unused-vars': "error";
|
|
654
645
|
readonly 'no-use-before-define': "error";
|
|
646
|
+
readonly 'no-useless-assignment': "error";
|
|
655
647
|
readonly 'no-useless-backreference': "error";
|
|
656
648
|
readonly 'require-atomic-updates': "error";
|
|
657
649
|
readonly 'use-isnan': "error";
|
package/dist/react.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { fixupPluginRules } from '@eslint/compat';
|
|
2
1
|
import react from 'eslint-plugin-react';
|
|
3
2
|
// @ts-expect-error TS7016
|
|
4
3
|
import reactHooksPlugin from 'eslint-plugin-react-hooks';
|
|
@@ -12,7 +11,7 @@ const config = {
|
|
|
12
11
|
},
|
|
13
12
|
plugins: {
|
|
14
13
|
react: react,
|
|
15
|
-
'react-hooks':
|
|
14
|
+
'react-hooks': reactHooksPlugin
|
|
16
15
|
},
|
|
17
16
|
rules: {
|
|
18
17
|
'react-hooks/exhaustive-deps': 'error',
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
declare const rules: {
|
|
2
|
-
readonly 'line-comment-position': "off";
|
|
3
2
|
readonly 'unicode-bom': ["error", string];
|
|
4
3
|
readonly 'accessor-pairs': "error";
|
|
5
4
|
readonly 'arrow-body-style': ["error", string];
|
|
@@ -35,7 +34,6 @@ declare const rules: {
|
|
|
35
34
|
readonly 'max-nested-callbacks': "error";
|
|
36
35
|
readonly 'max-params': "off";
|
|
37
36
|
readonly 'max-statements': "warn";
|
|
38
|
-
readonly 'multiline-comment-style': "error";
|
|
39
37
|
readonly 'new-cap': "error";
|
|
40
38
|
readonly 'no-alert': "error";
|
|
41
39
|
readonly 'no-array-constructor': "error";
|
|
@@ -185,7 +183,6 @@ declare const rules: {
|
|
|
185
183
|
readonly 'no-loss-of-precision': "error";
|
|
186
184
|
readonly 'no-misleading-character-class': "error";
|
|
187
185
|
readonly 'no-new-native-nonconstructor': "error";
|
|
188
|
-
readonly 'no-new-symbol': "error";
|
|
189
186
|
readonly 'no-obj-calls': "error";
|
|
190
187
|
readonly 'no-promise-executor-return': "error";
|
|
191
188
|
readonly 'no-prototype-builtins': "error";
|
|
@@ -206,12 +203,9 @@ declare const rules: {
|
|
|
206
203
|
disallowArithmeticOperators: boolean;
|
|
207
204
|
}];
|
|
208
205
|
readonly 'no-unused-private-class-members': "error";
|
|
209
|
-
readonly 'no-unused-vars':
|
|
210
|
-
args: string;
|
|
211
|
-
caughtErrors: string;
|
|
212
|
-
vars: string;
|
|
213
|
-
}];
|
|
206
|
+
readonly 'no-unused-vars': "error";
|
|
214
207
|
readonly 'no-use-before-define': "error";
|
|
208
|
+
readonly 'no-useless-assignment': "error";
|
|
215
209
|
readonly 'no-useless-backreference': "error";
|
|
216
210
|
readonly 'require-atomic-updates': "error";
|
|
217
211
|
readonly 'use-isnan': "error";
|
|
@@ -35,7 +35,6 @@ const rules = {
|
|
|
35
35
|
'no-loss-of-precision': 'error',
|
|
36
36
|
'no-misleading-character-class': 'error',
|
|
37
37
|
'no-new-native-nonconstructor': 'error',
|
|
38
|
-
'no-new-symbol': 'error',
|
|
39
38
|
'no-obj-calls': 'error',
|
|
40
39
|
'no-promise-executor-return': 'error',
|
|
41
40
|
'no-prototype-builtins': 'error',
|
|
@@ -54,15 +53,9 @@ const rules = {
|
|
|
54
53
|
'no-unsafe-negation': 'error',
|
|
55
54
|
'no-unsafe-optional-chaining': ['error', { disallowArithmeticOperators: true }],
|
|
56
55
|
'no-unused-private-class-members': 'error',
|
|
57
|
-
'no-unused-vars':
|
|
58
|
-
'error',
|
|
59
|
-
{
|
|
60
|
-
args: 'after-used',
|
|
61
|
-
caughtErrors: 'all',
|
|
62
|
-
vars: 'all'
|
|
63
|
-
}
|
|
64
|
-
],
|
|
56
|
+
'no-unused-vars': 'error',
|
|
65
57
|
'no-use-before-define': 'error',
|
|
58
|
+
'no-useless-assignment': 'error',
|
|
66
59
|
'no-useless-backreference': 'error',
|
|
67
60
|
'require-atomic-updates': 'error',
|
|
68
61
|
'use-isnan': 'error',
|
|
@@ -102,7 +95,6 @@ const rules = {
|
|
|
102
95
|
'max-nested-callbacks': 'error',
|
|
103
96
|
'max-params': 'off',
|
|
104
97
|
'max-statements': 'warn',
|
|
105
|
-
'multiline-comment-style': 'error',
|
|
106
98
|
'new-cap': 'error',
|
|
107
99
|
'no-alert': 'error',
|
|
108
100
|
'no-array-constructor': 'error',
|
|
@@ -212,7 +204,6 @@ const rules = {
|
|
|
212
204
|
},
|
|
213
205
|
...{
|
|
214
206
|
// Layout & Formatting
|
|
215
|
-
'line-comment-position': 'off',
|
|
216
207
|
'unicode-bom': ['error', 'never']
|
|
217
208
|
}
|
|
218
209
|
};
|
package/dist/typescript.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ type ParserOptions = NonNullable<(NonNullable<typeof configs.base.languageOption
|
|
|
4
4
|
declare const config: {
|
|
5
5
|
readonly files: ["**/*.{ts,tsx,mts,cts}"];
|
|
6
6
|
readonly languageOptions: {
|
|
7
|
-
readonly parser: Linter.
|
|
7
|
+
readonly parser: Linter.Parser;
|
|
8
8
|
readonly parserOptions: {
|
|
9
9
|
readonly projectService: true;
|
|
10
10
|
readonly sourceType: "module";
|
|
@@ -214,6 +214,6 @@ declare const config: {
|
|
|
214
214
|
};
|
|
215
215
|
};
|
|
216
216
|
};
|
|
217
|
-
declare const typescriptConfig: (parserOptions: ParserOptions) => Linter.
|
|
217
|
+
declare const typescriptConfig: (parserOptions: ParserOptions) => Linter.Config;
|
|
218
218
|
export { config as typescript, typescriptConfig };
|
|
219
219
|
export default config;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@egy186/eslint-config",
|
|
3
3
|
"description": "Eslint shareable config",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "2.0.1",
|
|
5
5
|
"author": "egy186",
|
|
6
6
|
"bugs": {
|
|
7
7
|
"url": "https://github.com/egy186/eslint-config/issues"
|
|
@@ -15,16 +15,15 @@
|
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"@eslint-stylistic/metadata": "~2.9.0",
|
|
18
|
-
"@eslint/
|
|
19
|
-
"@eslint
|
|
20
|
-
"@types/eslint": "^8.56.12",
|
|
18
|
+
"@eslint/js": "~9.12.0",
|
|
19
|
+
"@types/eslint": "^9.6.1",
|
|
21
20
|
"@types/eslint__js": "^8.42.3",
|
|
22
21
|
"@types/node": "^20.16.11",
|
|
23
|
-
"eslint": "~
|
|
22
|
+
"eslint": "~9.12.0",
|
|
24
23
|
"eslint-import-resolver-typescript": "~3.6.3",
|
|
25
24
|
"eslint-plugin-jest": "~28.8.3",
|
|
26
25
|
"eslint-plugin-react": "~7.37.1",
|
|
27
|
-
"eslint-plugin-react-hooks": "~
|
|
26
|
+
"eslint-plugin-react-hooks": "~5.1.0-rc-459fd418-20241001",
|
|
28
27
|
"husky": "^9.1.6",
|
|
29
28
|
"jiti": "^2.3.3",
|
|
30
29
|
"typescript": "~5.5.4",
|
|
@@ -62,12 +61,11 @@
|
|
|
62
61
|
"license": "MIT",
|
|
63
62
|
"main": "./dist/index.js",
|
|
64
63
|
"peerDependencies": {
|
|
65
|
-
"
|
|
66
|
-
"eslint": "^8.50.0",
|
|
64
|
+
"eslint": "^9.11.1",
|
|
67
65
|
"eslint-import-resolver-typescript": "^3.6.1",
|
|
68
66
|
"eslint-plugin-jest": "^28.8.3",
|
|
69
67
|
"eslint-plugin-react": "^7.36.1",
|
|
70
|
-
"eslint-plugin-react-hooks": "^
|
|
68
|
+
"eslint-plugin-react-hooks": "^5.1.0-rc-459fd418-20241001",
|
|
71
69
|
"typescript": "^5.0.4",
|
|
72
70
|
"typescript-eslint": "^8.5.0"
|
|
73
71
|
},
|
|
@@ -101,7 +99,7 @@
|
|
|
101
99
|
"scripts": {
|
|
102
100
|
"build": "tsc --build",
|
|
103
101
|
"clean": "npm run build -- --clean",
|
|
104
|
-
"lint": "eslint
|
|
102
|
+
"lint": "eslint",
|
|
105
103
|
"prepare": "husky",
|
|
106
104
|
"test": "jiti test/test.ts",
|
|
107
105
|
"typecheck": "tsc --project tsconfig.typecheck.json"
|