eslint-config-typed 5.6.0 → 5.6.2
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/configs/plugins.d.mts +1 -1
- package/dist/configs/plugins.d.mts.map +1 -1
- package/dist/configs/plugins.mjs +6 -2
- package/dist/configs/plugins.mjs.map +1 -1
- package/dist/rules/eslint-import-rules.d.mts +4 -4
- package/dist/rules/eslint-import-rules.d.mts.map +1 -1
- package/dist/rules/eslint-import-rules.mjs +13 -5
- package/dist/rules/eslint-import-rules.mjs.map +1 -1
- package/package.json +3 -2
- package/src/configs/plugins.mts +0 -3
- package/src/rules/eslint-import-rules.mts +13 -6
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type ESLintPlugin } from '../types/index.mjs';
|
|
2
|
-
export declare const plugins: Record<'@typescript-eslint' | '@stylistic' | 'array-func' | 'cypress' | 'playwright' | 'functional' | 'import-x' | 'jest' | 'vitest' | 'jsx-a11y' | 'math' | 'prefer-arrow-functions' | 'promise' | 'n' | 'react' | 'react-hooks' | 'react-refresh' | 'react-perf' | 'security' | 'testing-library' | 'unicorn' | 'sort-destructure-keys' | 'eslint-plugin' | 'tree-shakable' | 'total-functions' | 'strict-dependencies' | 'ts-restrictions' | '
|
|
2
|
+
export declare const plugins: Record<'@typescript-eslint' | '@stylistic' | 'array-func' | 'cypress' | 'playwright' | 'functional' | 'import-x' | 'jest' | 'vitest' | 'jsx-a11y' | 'math' | 'prefer-arrow-functions' | 'promise' | 'n' | 'react' | 'react-hooks' | 'react-refresh' | 'react-perf' | 'security' | 'testing-library' | 'unicorn' | 'sort-destructure-keys' | 'eslint-plugin' | 'tree-shakable' | 'total-functions' | 'strict-dependencies' | 'ts-restrictions' | 'react-coding-style' | 'immer-coding-style' | 'vitest-coding-style', Omit<ESLintPlugin, 'configs'>>;
|
|
3
3
|
//# sourceMappingURL=plugins.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugins.d.mts","sourceRoot":"","sources":["../../src/configs/plugins.mts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugins.d.mts","sourceRoot":"","sources":["../../src/configs/plugins.mts"],"names":[],"mappings":"AAkEA,OAAO,EAAE,KAAK,YAAY,EAAmB,MAAM,oBAAoB,CAAC;AAExE,eAAO,MAAM,OAAO,EAAE,MAAM,CACxB,oBAAoB,GACpB,YAAY,GACZ,YAAY,GACZ,SAAS,GACT,YAAY,GACZ,YAAY,GACZ,UAAU,GACV,MAAM,GACN,QAAQ,GACR,UAAU,GACV,MAAM,GACN,wBAAwB,GACxB,SAAS,GACT,GAAG,GACH,OAAO,GACP,aAAa,GACb,eAAe,GACf,YAAY,GACZ,UAAU,GACV,iBAAiB,GACjB,SAAS,GACT,uBAAuB,GACvB,eAAe,GACf,eAAe,GACf,iBAAiB,GACjB,qBAAqB,GACrB,iBAAiB,GACjB,oBAAoB,GACpB,oBAAoB,GACpB,qBAAqB,EACvB,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC,CAuCW,CAAC"}
|
package/dist/configs/plugins.mjs
CHANGED
|
@@ -26,7 +26,12 @@ import { eslintPluginReactCodingStyle } from '../plugins/react-coding-style/plug
|
|
|
26
26
|
import { eslintPluginStrictDependencies } from '../plugins/strict-dependencies/plugin.mjs';
|
|
27
27
|
import { eslintPluginTotalFunctions } from '../plugins/total-functions/plugin.mjs';
|
|
28
28
|
import { eslintPluginTreeShakable } from '../plugins/tree-shakable/plugin.mjs';
|
|
29
|
-
import
|
|
29
|
+
import '../plugins/ts-data-forge/rules/no-unnecessary-type-guard.mjs';
|
|
30
|
+
import '@typescript-eslint/utils';
|
|
31
|
+
import 'ts-data-forge';
|
|
32
|
+
import '../plugins/ts-data-forge/rules/branded-number-types.mjs';
|
|
33
|
+
import 'typescript';
|
|
34
|
+
import '../plugins/ts-data-forge/rules/prefer-comparison-over-nullish-guard.mjs';
|
|
30
35
|
import { eslintPluginTsRestrictions } from '../plugins/ts-restrictions/plugin.mjs';
|
|
31
36
|
import { eslintPluginVitestCodingStyle } from '../plugins/vitest-coding-style/plugin.mjs';
|
|
32
37
|
|
|
@@ -67,7 +72,6 @@ const plugins = {
|
|
|
67
72
|
'total-functions': eslintPluginTotalFunctions,
|
|
68
73
|
'strict-dependencies': eslintPluginStrictDependencies,
|
|
69
74
|
'ts-restrictions': eslintPluginTsRestrictions,
|
|
70
|
-
'ts-data-forge': eslintPluginTsDataForge,
|
|
71
75
|
'react-coding-style': eslintPluginReactCodingStyle,
|
|
72
76
|
'immer-coding-style': eslintPluginImmerCodingStyle,
|
|
73
77
|
'vitest-coding-style': eslintPluginVitestCodingStyle,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugins.mjs","sources":["../../src/configs/plugins.mts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugins.mjs","sources":["../../src/configs/plugins.mts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AAmEO,MAAM,OAAO,GAgChB;AACF,IAAA,oBAAoB,EAAE,gBAAgB;AACtC,IAAA,YAAY,EAAE,SAAS;;AAEvB,IAAA,YAAY,EAAE,qBAAqB;AACnC,IAAA,OAAO,EAAE,mBAAmB;AAC5B,IAAA,UAAU,EAAE,sBAAsB;AAClC,IAAA,UAAU,EAAE,sBAAsB;;AAElC,IAAA,uBAAuB,EAAE,+BAA+B;AACxD,IAAA,UAAU,EAAE,kBAAkB;AAC9B,IAAA,IAAI,EAAE,gBAAgB;AACtB,IAAA,MAAM,EAAE,kBAAkB;;AAE1B,IAAA,UAAU,EAAE,mBAAmB;AAC/B,IAAA,IAAI,EAAE,gBAAgB;AACtB,IAAA,wBAAwB,EAAE,gCAAgC;;AAE1D,IAAA,OAAO,EAAE,mBAAmB;AAC5B,IAAA,CAAC,EAAE,aAAa;AAChB,IAAA,KAAK,EAAE,iBAAiB;;AAExB,IAAA,aAAa,EAAE,sBAAiD;AAChE,IAAA,eAAe,EAAE,wBAAwB;;AAEzC,IAAA,YAAY,EAAE,qBAAqB;;AAEnC,IAAA,QAAQ,EAAE,oBAAoB;AAC9B,IAAA,iBAAiB,EAAE,0BAA0B;AAC7C,IAAA,OAAO,EAAE,mBAAmB;AAC5B,IAAA,eAAe,EAAE,wBAAwB;AACzC,IAAA,eAAe,EAAE,wBAAwB;AACzC,IAAA,iBAAiB,EAAE,0BAA0B;AAC7C,IAAA,qBAAqB,EAAE,8BAA8B;AACrD,IAAA,iBAAiB,EAAE,0BAA0B;AAC7C,IAAA,oBAAoB,EAAE,4BAA4B;AAClD,IAAA,oBAAoB,EAAE,4BAA4B;AAClD,IAAA,qBAAqB,EAAE,6BAA6B;;;;;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export declare const eslintImportsRules: {
|
|
2
2
|
readonly 'import-x/no-unresolved': "off";
|
|
3
3
|
readonly 'import-x/named': "off";
|
|
4
|
-
readonly 'import-x/default': "
|
|
5
|
-
readonly 'import-x/namespace':
|
|
4
|
+
readonly 'import-x/default': "off";
|
|
5
|
+
readonly 'import-x/namespace': "off";
|
|
6
6
|
readonly 'import-x/no-restricted-paths': "off";
|
|
7
7
|
readonly 'import-x/no-absolute-path': 2 | 1;
|
|
8
8
|
readonly 'import-x/no-dynamic-require': 2 | 1;
|
|
@@ -16,9 +16,9 @@ export declare const eslintImportsRules: {
|
|
|
16
16
|
readonly 'import-x/no-relative-parent-imports': "off";
|
|
17
17
|
readonly 'import-x/consistent-type-specifier-style': readonly ["error", "prefer-inline"];
|
|
18
18
|
readonly 'import-x/no-relative-packages': 2 | 1;
|
|
19
|
-
readonly 'import-x/export': "
|
|
19
|
+
readonly 'import-x/export': "off";
|
|
20
20
|
readonly 'import-x/no-named-as-default': "error";
|
|
21
|
-
readonly 'import-x/no-named-as-default-member': "
|
|
21
|
+
readonly 'import-x/no-named-as-default-member': "off";
|
|
22
22
|
readonly 'import-x/no-deprecated': "off";
|
|
23
23
|
readonly 'import-x/no-extraneous-dependencies': "off";
|
|
24
24
|
readonly 'import-x/no-mutable-exports': "error";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eslint-import-rules.d.mts","sourceRoot":"","sources":["../../src/rules/eslint-import-rules.mts"],"names":[],"mappings":"AAGA,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"eslint-import-rules.d.mts","sourceRoot":"","sources":["../../src/rules/eslint-import-rules.mts"],"names":[],"mappings":"AAGA,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAuH7B;;;OAGG;;;;;;;;;;;CAuBkC,CAAC"}
|
|
@@ -4,10 +4,14 @@ import { withDefaultOption } from '../types/rule-severity-with-default-option.mj
|
|
|
4
4
|
const eslintImportsRules = {
|
|
5
5
|
// Not needed when using TypeScript.
|
|
6
6
|
'import-x/no-unresolved': 'off',
|
|
7
|
-
//
|
|
7
|
+
// The following import-x resolution rules are redundant when using TypeScript:
|
|
8
|
+
// the type-checker already reports missing named / default imports and invalid
|
|
9
|
+
// namespace member access (TS2339). They also build large ExportMaps that are
|
|
10
|
+
// slow and memory-heavy (a known cause of ESLint OOM on large codebases), so
|
|
11
|
+
// keep them off for TypeScript.
|
|
8
12
|
'import-x/named': 'off',
|
|
9
|
-
'import-x/default': '
|
|
10
|
-
'import-x/namespace':
|
|
13
|
+
'import-x/default': 'off',
|
|
14
|
+
'import-x/namespace': 'off',
|
|
11
15
|
'import-x/no-restricted-paths': 'off', // TODO
|
|
12
16
|
'import-x/no-absolute-path': withDefaultOption('error'),
|
|
13
17
|
'import-x/no-dynamic-require': withDefaultOption('error'),
|
|
@@ -44,9 +48,13 @@ const eslintImportsRules = {
|
|
|
44
48
|
'import-x/consistent-type-specifier-style': ['error', 'prefer-inline'],
|
|
45
49
|
'import-x/no-relative-packages': withDefaultOption('error'),
|
|
46
50
|
// helpfulWarnings
|
|
47
|
-
|
|
51
|
+
// Redundant with TypeScript: duplicate / conflicting exports are reported as
|
|
52
|
+
// TS2323 / TS2528.
|
|
53
|
+
'import-x/export': 'off',
|
|
48
54
|
'import-x/no-named-as-default': 'error',
|
|
49
|
-
|
|
55
|
+
// Redundant with TypeScript: accessing a named export through the default
|
|
56
|
+
// import is already a type error.
|
|
57
|
+
'import-x/no-named-as-default-member': 'off',
|
|
50
58
|
// prefer @typescript-eslint/no-deprecated (raised in import-js/eslint-plugin-import#1532)
|
|
51
59
|
'import-x/no-deprecated': 'off',
|
|
52
60
|
'import-x/no-extraneous-dependencies': 'off',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eslint-import-rules.mjs","sources":["../../src/rules/eslint-import-rules.mts"],"sourcesContent":[null],"names":[],"mappings":";;;AAGO,MAAM,kBAAkB,GAAG;;AAEhC,IAAA,wBAAwB,EAAE,KAAK
|
|
1
|
+
{"version":3,"file":"eslint-import-rules.mjs","sources":["../../src/rules/eslint-import-rules.mts"],"sourcesContent":[null],"names":[],"mappings":";;;AAGO,MAAM,kBAAkB,GAAG;;AAEhC,IAAA,wBAAwB,EAAE,KAAK;;;;;;AAO/B,IAAA,gBAAgB,EAAE,KAAK;AACvB,IAAA,kBAAkB,EAAE,KAAK;AACzB,IAAA,oBAAoB,EAAE,KAAK;IAC3B,8BAA8B,EAAE,KAAK;AACrC,IAAA,2BAA2B,EAAE,iBAAiB,CAAC,OAAO,CAAC;AACvD,IAAA,6BAA6B,EAAE,iBAAiB,CAAC,OAAO,CAAC;AACzD,IAAA,8BAA8B,EAAE;QAC9B,OAAO;AACP,QAAA;AACE,YAAA,KAAK,EAAE;AACL,gBAAA,CAAA,SAAA,EAAY,gBAAgB,CAAA,CAAA,CAAG;AAC/B,gBAAA,CAAA,SAAA,EAAY,gBAAgB,CAAA,CAAA,CAAG;gBAC/B,gBAAgB;gBAChB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QAAQ,EAAE,GAAG,EAAE,QAAQ,EAAE;AAC3C,SAAA;AACF,KAAA;IAED,gBAAgB,EAAE,KAAK;;;;;;;;AAQvB,IAAA,+BAA+B,EAAE;QAC/B,OAAO;AACP,QAAA;YACE,gBAAgB,EAAE,KAAK;AACvB,YAAA,KAAK,EAAE,CAAC;AACT,SAAA;AACF,KAAA;AAED,IAAA,2BAA2B,EAAE,KAAK;AAClC,IAAA,+BAA+B,EAAE;QAC/B,OAAO;AACP,QAAA;AACE,YAAA,KAAK,EAAE;gBACL,UAAU;gBACV,8BAA8B;gBAC9B,UAAU;gBACV,YAAY;AACb,aAAA;AACF,SAAA;AACF,KAAA;AACD,IAAA,2BAA2B,EAAE,KAAK;AAElC;;;AAGG;AACH,IAAA,4BAA4B,EAAE,OAAO;AACrC,IAAA,gCAAgC,EAAE,KAAK;AAEvC,IAAA,0BAA0B,EAAE,KAAK;AACjC,IAAA,sCAAsC,EAAE,iBAAiB,CAAC,OAAO,CAAC;AAClE,IAAA,wBAAwB,EAAE,KAAK;AAE/B,IAAA,mCAAmC,EAAE,KAAK;AAE1C,IAAA,gCAAgC,EAAE,OAAO;;;AAKzC,IAAA,4BAA4B,EAAE,iBAAiB,CAAC,OAAO,CAAC;;AAGxD,IAAA,kCAAkC,EAAE,KAAK;;;AAIzC,IAAA,wBAAwB,EAAE,CAAC;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-typed",
|
|
3
|
-
"version": "5.6.
|
|
3
|
+
"version": "5.6.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript"
|
|
@@ -158,6 +158,7 @@
|
|
|
158
158
|
"conventional-changelog-conventionalcommits": "9.3.1",
|
|
159
159
|
"cspell": "10.0.1",
|
|
160
160
|
"dedent": "1.7.2",
|
|
161
|
+
"eslint-plugin-ts-data-forge": "^0.1.1",
|
|
161
162
|
"fast-glob": "3.3.3",
|
|
162
163
|
"github-settings-as-code": "1.2.9",
|
|
163
164
|
"immer": "11.1.8",
|
|
@@ -186,7 +187,7 @@
|
|
|
186
187
|
"eslint": ">=9.0.0 <10.0.0",
|
|
187
188
|
"typescript": ">=5.0.0"
|
|
188
189
|
},
|
|
189
|
-
"packageManager": "pnpm@11.
|
|
190
|
+
"packageManager": "pnpm@11.15.1",
|
|
190
191
|
"engines": {
|
|
191
192
|
"node": ">=22.22.2",
|
|
192
193
|
"pnpm": ">=9.0.0"
|
package/src/configs/plugins.mts
CHANGED
|
@@ -60,7 +60,6 @@ import {
|
|
|
60
60
|
eslintPluginStrictDependencies,
|
|
61
61
|
eslintPluginTotalFunctions,
|
|
62
62
|
eslintPluginTreeShakable,
|
|
63
|
-
eslintPluginTsDataForge,
|
|
64
63
|
eslintPluginTsRestrictions,
|
|
65
64
|
eslintPluginVitestCodingStyle,
|
|
66
65
|
} from '../plugins/index.mjs';
|
|
@@ -95,7 +94,6 @@ export const plugins: Record<
|
|
|
95
94
|
| 'total-functions'
|
|
96
95
|
| 'strict-dependencies'
|
|
97
96
|
| 'ts-restrictions'
|
|
98
|
-
| 'ts-data-forge'
|
|
99
97
|
| 'react-coding-style'
|
|
100
98
|
| 'immer-coding-style'
|
|
101
99
|
| 'vitest-coding-style',
|
|
@@ -135,7 +133,6 @@ export const plugins: Record<
|
|
|
135
133
|
'total-functions': eslintPluginTotalFunctions,
|
|
136
134
|
'strict-dependencies': eslintPluginStrictDependencies,
|
|
137
135
|
'ts-restrictions': eslintPluginTsRestrictions,
|
|
138
|
-
'ts-data-forge': eslintPluginTsDataForge,
|
|
139
136
|
'react-coding-style': eslintPluginReactCodingStyle,
|
|
140
137
|
'immer-coding-style': eslintPluginImmerCodingStyle,
|
|
141
138
|
'vitest-coding-style': eslintPluginVitestCodingStyle,
|
|
@@ -5,11 +5,14 @@ export const eslintImportsRules = {
|
|
|
5
5
|
// Not needed when using TypeScript.
|
|
6
6
|
'import-x/no-unresolved': 'off',
|
|
7
7
|
|
|
8
|
-
//
|
|
8
|
+
// The following import-x resolution rules are redundant when using TypeScript:
|
|
9
|
+
// the type-checker already reports missing named / default imports and invalid
|
|
10
|
+
// namespace member access (TS2339). They also build large ExportMaps that are
|
|
11
|
+
// slow and memory-heavy (a known cause of ESLint OOM on large codebases), so
|
|
12
|
+
// keep them off for TypeScript.
|
|
9
13
|
'import-x/named': 'off',
|
|
10
|
-
|
|
11
|
-
'import-x/
|
|
12
|
-
'import-x/namespace': withDefaultOption('error'),
|
|
14
|
+
'import-x/default': 'off',
|
|
15
|
+
'import-x/namespace': 'off',
|
|
13
16
|
'import-x/no-restricted-paths': 'off', // TODO
|
|
14
17
|
'import-x/no-absolute-path': withDefaultOption('error'),
|
|
15
18
|
'import-x/no-dynamic-require': withDefaultOption('error'),
|
|
@@ -49,9 +52,13 @@ export const eslintImportsRules = {
|
|
|
49
52
|
'import-x/no-relative-packages': withDefaultOption('error'),
|
|
50
53
|
|
|
51
54
|
// helpfulWarnings
|
|
52
|
-
|
|
55
|
+
// Redundant with TypeScript: duplicate / conflicting exports are reported as
|
|
56
|
+
// TS2323 / TS2528.
|
|
57
|
+
'import-x/export': 'off',
|
|
53
58
|
'import-x/no-named-as-default': 'error',
|
|
54
|
-
|
|
59
|
+
// Redundant with TypeScript: accessing a named export through the default
|
|
60
|
+
// import is already a type error.
|
|
61
|
+
'import-x/no-named-as-default-member': 'off',
|
|
55
62
|
|
|
56
63
|
// prefer @typescript-eslint/no-deprecated (raised in import-js/eslint-plugin-import#1532)
|
|
57
64
|
'import-x/no-deprecated': 'off',
|