@alextheman/eslint-plugin 5.9.1 → 5.10.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/index.cjs +14 -4
- package/dist/index.d.cts +21 -21
- package/dist/index.d.ts +21 -21
- package/dist/index.js +14 -4
- package/dist/internal/index.cjs +10 -2
- package/dist/internal/index.d.cts +10 -10
- package/dist/internal/index.d.ts +10 -10
- package/dist/internal/index.js +10 -2
- package/dist/utility/index.d.cts +14 -16
- package/dist/utility/index.d.ts +14 -16
- package/package.json +17 -16
package/dist/index.cjs
CHANGED
|
@@ -62,7 +62,7 @@ let eslint_plugin_jsdoc = require("eslint-plugin-jsdoc");
|
|
|
62
62
|
eslint_plugin_jsdoc = __toESM(eslint_plugin_jsdoc);
|
|
63
63
|
let _alextheman_utility_node = require("@alextheman/utility/node");
|
|
64
64
|
|
|
65
|
-
//#region node_modules/.pnpm/globals@17.
|
|
65
|
+
//#region node_modules/.pnpm/globals@17.4.0/node_modules/globals/globals.json
|
|
66
66
|
var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
67
67
|
module.exports = {
|
|
68
68
|
"amd": {
|
|
@@ -244,6 +244,8 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
244
244
|
"CookieStore": false,
|
|
245
245
|
"CookieStoreManager": false,
|
|
246
246
|
"CountQueuingStrategy": false,
|
|
247
|
+
"crashReport": false,
|
|
248
|
+
"CrashReportContext": false,
|
|
247
249
|
"createImageBitmap": false,
|
|
248
250
|
"CreateMonitor": false,
|
|
249
251
|
"Credential": false,
|
|
@@ -832,6 +834,7 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
832
834
|
"Option": false,
|
|
833
835
|
"OrientationSensor": false,
|
|
834
836
|
"origin": false,
|
|
837
|
+
"Origin": false,
|
|
835
838
|
"originAgentCluster": false,
|
|
836
839
|
"OscillatorNode": false,
|
|
837
840
|
"OTPCredential": false,
|
|
@@ -871,6 +874,7 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
871
874
|
"PerformanceScriptTiming": false,
|
|
872
875
|
"PerformanceServerTiming": false,
|
|
873
876
|
"PerformanceTiming": false,
|
|
877
|
+
"PerformanceTimingConfidence": false,
|
|
874
878
|
"PeriodicSyncManager": false,
|
|
875
879
|
"PeriodicWave": false,
|
|
876
880
|
"Permissions": false,
|
|
@@ -1620,6 +1624,7 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1620
1624
|
"structuredClone": false,
|
|
1621
1625
|
"SubtleCrypto": false,
|
|
1622
1626
|
"SuppressedError": false,
|
|
1627
|
+
"Temporal": false,
|
|
1623
1628
|
"TextDecoder": false,
|
|
1624
1629
|
"TextDecoderStream": false,
|
|
1625
1630
|
"TextEncoder": false,
|
|
@@ -3176,6 +3181,7 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3176
3181
|
"onsync": true,
|
|
3177
3182
|
"onunhandledrejection": true,
|
|
3178
3183
|
"origin": false,
|
|
3184
|
+
"Origin": false,
|
|
3179
3185
|
"Path2D": false,
|
|
3180
3186
|
"PaymentRequestEvent": false,
|
|
3181
3187
|
"performance": false,
|
|
@@ -3519,6 +3525,7 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3519
3525
|
"onrejectionhandled": true,
|
|
3520
3526
|
"onunhandledrejection": true,
|
|
3521
3527
|
"origin": false,
|
|
3528
|
+
"Origin": false,
|
|
3522
3529
|
"Path2D": false,
|
|
3523
3530
|
"performance": false,
|
|
3524
3531
|
"Performance": false,
|
|
@@ -3907,6 +3914,7 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3907
3914
|
"onrtctransform": true,
|
|
3908
3915
|
"onunhandledrejection": true,
|
|
3909
3916
|
"origin": false,
|
|
3917
|
+
"Origin": false,
|
|
3910
3918
|
"Path2D": false,
|
|
3911
3919
|
"performance": false,
|
|
3912
3920
|
"Performance": false,
|
|
@@ -4080,7 +4088,7 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4080
4088
|
}));
|
|
4081
4089
|
|
|
4082
4090
|
//#endregion
|
|
4083
|
-
//#region node_modules/.pnpm/globals@17.
|
|
4091
|
+
//#region node_modules/.pnpm/globals@17.4.0/node_modules/globals/index.js
|
|
4084
4092
|
var require_globals = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4085
4093
|
module.exports = require_globals$1();
|
|
4086
4094
|
}));
|
|
@@ -4611,6 +4619,7 @@ function internalJavaScript(plugin) {
|
|
|
4611
4619
|
plugins: {
|
|
4612
4620
|
"@alextheman": plugin,
|
|
4613
4621
|
import: eslint_plugin_import.default,
|
|
4622
|
+
n: eslint_plugin_n.default,
|
|
4614
4623
|
perfectionist: eslint_plugin_perfectionist.default,
|
|
4615
4624
|
prettier: eslint_plugin_prettier.default
|
|
4616
4625
|
},
|
|
@@ -4624,6 +4633,7 @@ function internalJavaScript(plugin) {
|
|
|
4624
4633
|
{ allowArrowFunctions: false }
|
|
4625
4634
|
],
|
|
4626
4635
|
"import/consistent-type-specifier-style": ["error", "prefer-top-level"],
|
|
4636
|
+
"n/no-extraneous-import": "off",
|
|
4627
4637
|
"no-else-return": "error",
|
|
4628
4638
|
"no-implicit-coercion": ["error", { allow: ["!!"] }],
|
|
4629
4639
|
"no-restricted-imports": ["error", personalRestrictedImports],
|
|
@@ -4930,7 +4940,7 @@ function internalTypeScript(plugin) {
|
|
|
4930
4940
|
},
|
|
4931
4941
|
rules: {
|
|
4932
4942
|
"@alextheman/standardise-error-messages": "off",
|
|
4933
|
-
"@typescript-eslint/array-type": ["error", { default: "
|
|
4943
|
+
"@typescript-eslint/array-type": ["error", { default: "generic" }],
|
|
4934
4944
|
"@typescript-eslint/consistent-type-assertions": ["error", { assertionStyle: "as" }],
|
|
4935
4945
|
"@typescript-eslint/consistent-type-definitions": "error",
|
|
4936
4946
|
"@typescript-eslint/dot-notation": "error",
|
|
@@ -5558,7 +5568,7 @@ var rules_default = {
|
|
|
5558
5568
|
//#endregion
|
|
5559
5569
|
//#region package.json
|
|
5560
5570
|
var name = "@alextheman/eslint-plugin";
|
|
5561
|
-
var version = "5.
|
|
5571
|
+
var version = "5.10.1";
|
|
5562
5572
|
|
|
5563
5573
|
//#endregion
|
|
5564
5574
|
//#region src/alexPlugin.ts
|
package/dist/index.d.cts
CHANGED
|
@@ -23,7 +23,7 @@ type CamelToKebab<S extends string> = S extends `${infer Head}${infer Tail}` ? H
|
|
|
23
23
|
* type ConfigNames = GetFlattenedConfigNames<{ general: { typescriptReact }}> // "general/typescript-react"
|
|
24
24
|
* ```
|
|
25
25
|
*/
|
|
26
|
-
type GetFlattenedConfigNames<ConfigObject extends { [K in keyof ConfigObject]: Record<string, Linter.Config
|
|
26
|
+
type GetFlattenedConfigNames<ConfigObject extends { [K in keyof ConfigObject]: Record<string, Array<Linter.Config>> }> = { [Group in keyof ConfigObject & string]: `${CamelToKebab<Group>}/${CamelToKebab<keyof ConfigObject[Group] & string>}` }[keyof ConfigObject & string];
|
|
27
27
|
//#endregion
|
|
28
28
|
//#region src/configs/AlexPluginConfigGroup.d.ts
|
|
29
29
|
type GeneralConfig = "javascript" | "typescript" | "react" | "packageJson";
|
|
@@ -31,17 +31,17 @@ type PluginConfig = "base" | "tests";
|
|
|
31
31
|
type InternalConfig = "javascript" | "typescript" | "react" | "tests" | "eslintPluginBase" | "eslintPluginConfigs" | "eslintPluginRules" | "eslintPluginUtility" | "neurosongsBackEnd" | "neurosongsFrontEnd" | "utilityBase" | "utilityRoot" | "utilityInternal" | "alexCLine" | "jsdoc" | "components";
|
|
32
32
|
type CombinedConfig = "javascript" | "typescript" | "react" | "tests" | "typescriptReact" | "javascriptReact" | "typescriptPackage";
|
|
33
33
|
interface AlexPluginConfigObject {
|
|
34
|
-
general: Record<GeneralConfig, Linter.Config
|
|
35
|
-
plugin: Record<PluginConfig, Linter.Config
|
|
36
|
-
internal: Record<InternalConfig, Linter.Config
|
|
37
|
-
combined: Record<CombinedConfig, Linter.Config
|
|
34
|
+
general: Record<GeneralConfig, Array<Linter.Config>>;
|
|
35
|
+
plugin: Record<PluginConfig, Array<Linter.Config>>;
|
|
36
|
+
internal: Record<InternalConfig, Array<Linter.Config>>;
|
|
37
|
+
combined: Record<CombinedConfig, Array<Linter.Config>>;
|
|
38
38
|
}
|
|
39
39
|
type AlexConfigGroupName = keyof AlexPluginConfigObject;
|
|
40
40
|
type AlexFlattenedConfigName = GetFlattenedConfigNames<AlexPluginConfigObject>;
|
|
41
|
-
type AlexPluginConfigFlattened = Record<AlexFlattenedConfigName, Linter.Config
|
|
41
|
+
type AlexPluginConfigFlattened = Record<AlexFlattenedConfigName, Array<Linter.Config>>;
|
|
42
42
|
//#endregion
|
|
43
43
|
//#region src/configs/index.d.ts
|
|
44
|
-
declare function createAlexPluginConfigs(plugin: Readonly<AlexPlugin>): Record<AlexFlattenedConfigName, Linter.Config
|
|
44
|
+
declare function createAlexPluginConfigs(plugin: Readonly<AlexPlugin>): Record<AlexFlattenedConfigName, Array<Linter.Config>>;
|
|
45
45
|
//#endregion
|
|
46
46
|
//#region package.json.d.ts
|
|
47
47
|
declare let name: string;
|
|
@@ -63,7 +63,7 @@ declare const alexPlugin: AlexPlugin;
|
|
|
63
63
|
declare const prettierConfig: Config;
|
|
64
64
|
//#endregion
|
|
65
65
|
//#region src/configs/external/typeDocConfig.d.ts
|
|
66
|
-
declare function typeDocConfig(entryPoints?: string
|
|
66
|
+
declare function typeDocConfig(entryPoints?: Array<string>): TypeDocOptions & PluginOptions;
|
|
67
67
|
//#endregion
|
|
68
68
|
//#region src/configs/external/vitestConfig.d.ts
|
|
69
69
|
declare function vitestConfig(environment?: VitestEnvironment): vite.UserConfig;
|
|
@@ -89,11 +89,11 @@ interface RestrictedPathImportBase {
|
|
|
89
89
|
allowTypeImports?: boolean;
|
|
90
90
|
}
|
|
91
91
|
interface RestrictedPathImportImportNames extends RestrictedPathImportBase {
|
|
92
|
-
importNames: string
|
|
92
|
+
importNames: Array<string>;
|
|
93
93
|
allowImportNames?: never;
|
|
94
94
|
}
|
|
95
95
|
interface RestrictedPathImportAllowImportNames extends RestrictedPathImportBase {
|
|
96
|
-
allowImportNames: string
|
|
96
|
+
allowImportNames: Array<string>;
|
|
97
97
|
importNames?: never;
|
|
98
98
|
}
|
|
99
99
|
type RestrictedPathImport = RestrictedPathImportBase | RestrictedPathImportImportNames | RestrictedPathImportAllowImportNames;
|
|
@@ -103,7 +103,7 @@ interface RestrictedPatternImportBase {
|
|
|
103
103
|
allowTypeImports?: boolean;
|
|
104
104
|
}
|
|
105
105
|
interface RestrictedPatternImportGroup extends RestrictedPatternImportBase {
|
|
106
|
-
group: string
|
|
106
|
+
group: Array<string>;
|
|
107
107
|
regex?: never;
|
|
108
108
|
}
|
|
109
109
|
interface RestrictedPatternImportRegex extends RestrictedPatternImportBase {
|
|
@@ -111,14 +111,14 @@ interface RestrictedPatternImportRegex extends RestrictedPatternImportBase {
|
|
|
111
111
|
group?: never;
|
|
112
112
|
}
|
|
113
113
|
interface RestrictedPatternImportImportNames extends RestrictedPatternImportBase {
|
|
114
|
-
importNames: string
|
|
114
|
+
importNames: Array<string>;
|
|
115
115
|
allowImportNames?: never;
|
|
116
116
|
importNamePattern?: never;
|
|
117
117
|
allowImportNamePattern?: never;
|
|
118
118
|
}
|
|
119
119
|
interface RestrictedPatternImportAllowImportNames extends RestrictedPatternImportBase {
|
|
120
120
|
importNames?: never;
|
|
121
|
-
allowImportNames: string
|
|
121
|
+
allowImportNames: Array<string>;
|
|
122
122
|
importNamePattern?: never;
|
|
123
123
|
allowImportNamePattern?: never;
|
|
124
124
|
}
|
|
@@ -136,16 +136,16 @@ interface RestrictedPatternImportAllowImportNamePattern extends RestrictedPatter
|
|
|
136
136
|
}
|
|
137
137
|
type RestrictedPatternImport = RestrictedPatternImportGroup | RestrictedPatternImportRegex | RestrictedPatternImportImportNames | RestrictedPatternImportAllowImportNames | RestrictedPatternImportImportNamePattern | RestrictedPatternImportAllowImportNamePattern;
|
|
138
138
|
interface NoRestrictedImportsOptionsPathsOnly {
|
|
139
|
-
paths: RestrictedPathImport
|
|
139
|
+
paths: Array<RestrictedPathImport>;
|
|
140
140
|
patterns?: never;
|
|
141
141
|
}
|
|
142
142
|
interface NoRestrictedImportsOptionsPatternsOnly {
|
|
143
143
|
paths?: never;
|
|
144
|
-
patterns: RestrictedPatternImport
|
|
144
|
+
patterns: Array<RestrictedPatternImport>;
|
|
145
145
|
}
|
|
146
146
|
interface NoRestrictedImportsOptionsPathsAndPatterns {
|
|
147
|
-
paths: RestrictedPathImport
|
|
148
|
-
patterns: RestrictedPatternImport
|
|
147
|
+
paths: Array<RestrictedPathImport>;
|
|
148
|
+
patterns: Array<RestrictedPatternImport>;
|
|
149
149
|
}
|
|
150
150
|
/**
|
|
151
151
|
* Options for the built-in ESLint `no-restricted-imports` rule.
|
|
@@ -164,7 +164,7 @@ type NoRestrictedImportsOptions = NoRestrictedImportsOptionsPathsOnly | NoRestri
|
|
|
164
164
|
*
|
|
165
165
|
* @returns A new object combining all paths and patterns from the given groups, suitable as an option to pass to `no-restricted-imports`.
|
|
166
166
|
*/
|
|
167
|
-
declare function combineRestrictedImports(...groups: NoRestrictedImportsOptions
|
|
167
|
+
declare function combineRestrictedImports(...groups: Array<NoRestrictedImportsOptions>): NoRestrictedImportsOptions;
|
|
168
168
|
//#endregion
|
|
169
169
|
//#region src/utility/public/createRuleSchemaFromZodSchema.d.ts
|
|
170
170
|
/**
|
|
@@ -176,7 +176,7 @@ declare function combineRestrictedImports(...groups: NoRestrictedImportsOptions[
|
|
|
176
176
|
*
|
|
177
177
|
* @returns An array containing the resulting JSON Schema, formatted for ESLint rule schema compatibility.
|
|
178
178
|
*/
|
|
179
|
-
declare function createRuleSchemaFromZodSchema(schema: z.ZodType): JSONSchema4
|
|
179
|
+
declare function createRuleSchemaFromZodSchema(schema: z.ZodType): Array<JSONSchema4>;
|
|
180
180
|
//#endregion
|
|
181
181
|
//#region src/utility/public/fixOnCondition.d.ts
|
|
182
182
|
type RuleFixerFunction = (fixer: RuleFixer) => RuleFix | null;
|
|
@@ -230,7 +230,7 @@ declare function fixOnCondition(fixable: boolean, fix: RuleFixerFunction): RuleF
|
|
|
230
230
|
* // ...
|
|
231
231
|
* }
|
|
232
232
|
*/
|
|
233
|
-
declare function flattenConfigs<ConfigObject extends { [K in keyof ConfigObject]: Record<string, Linter.Config
|
|
233
|
+
declare function flattenConfigs<ConfigObject extends { [K in keyof ConfigObject]: Record<string, Array<Linter.Config>> }>(config: ConfigObject): Record<GetFlattenedConfigNames<ConfigObject>, Array<Linter.Config>>;
|
|
234
234
|
//#endregion
|
|
235
235
|
//#region src/utility/public/getImportSpecifiersAfterRemoving.d.ts
|
|
236
236
|
/**
|
|
@@ -248,6 +248,6 @@ declare function flattenConfigs<ConfigObject extends { [K in keyof ConfigObject]
|
|
|
248
248
|
*
|
|
249
249
|
* @returns A comma-separated string of import specifiers after removing the specified import.
|
|
250
250
|
*/
|
|
251
|
-
declare function getImportSpecifiersAfterRemoving<RuleOptions>(context: Readonly<RuleContext<"message", [RuleOptions]>>, specifiers: TSESTree.ImportClause
|
|
251
|
+
declare function getImportSpecifiersAfterRemoving<RuleOptions>(context: Readonly<RuleContext<"message", [RuleOptions]>>, specifiers: Array<TSESTree.ImportClause>, importToRemove: string): string;
|
|
252
252
|
//#endregion
|
|
253
253
|
export { AlexConfigGroupName, AlexFlattenedConfigName, type AlexPlugin, AlexPluginConfigFlattened, AlexPluginConfigObject, CombinedConfig, GeneralConfig, type GetFlattenedConfigNames, InternalConfig, type NoRestrictedImportsOptions, PluginConfig, checkCallExpression, combineRestrictedImports, createRuleSchemaFromZodSchema, alexPlugin as default, fixOnCondition, flattenConfigs, getImportSpecifiersAfterRemoving, prettierConfig, typeDocConfig, vitestConfig };
|
package/dist/index.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ type CamelToKebab<S extends string> = S extends `${infer Head}${infer Tail}` ? H
|
|
|
23
23
|
* type ConfigNames = GetFlattenedConfigNames<{ general: { typescriptReact }}> // "general/typescript-react"
|
|
24
24
|
* ```
|
|
25
25
|
*/
|
|
26
|
-
type GetFlattenedConfigNames<ConfigObject extends { [K in keyof ConfigObject]: Record<string, Linter.Config
|
|
26
|
+
type GetFlattenedConfigNames<ConfigObject extends { [K in keyof ConfigObject]: Record<string, Array<Linter.Config>> }> = { [Group in keyof ConfigObject & string]: `${CamelToKebab<Group>}/${CamelToKebab<keyof ConfigObject[Group] & string>}` }[keyof ConfigObject & string];
|
|
27
27
|
//#endregion
|
|
28
28
|
//#region src/configs/AlexPluginConfigGroup.d.ts
|
|
29
29
|
type GeneralConfig = "javascript" | "typescript" | "react" | "packageJson";
|
|
@@ -31,17 +31,17 @@ type PluginConfig = "base" | "tests";
|
|
|
31
31
|
type InternalConfig = "javascript" | "typescript" | "react" | "tests" | "eslintPluginBase" | "eslintPluginConfigs" | "eslintPluginRules" | "eslintPluginUtility" | "neurosongsBackEnd" | "neurosongsFrontEnd" | "utilityBase" | "utilityRoot" | "utilityInternal" | "alexCLine" | "jsdoc" | "components";
|
|
32
32
|
type CombinedConfig = "javascript" | "typescript" | "react" | "tests" | "typescriptReact" | "javascriptReact" | "typescriptPackage";
|
|
33
33
|
interface AlexPluginConfigObject {
|
|
34
|
-
general: Record<GeneralConfig, Linter.Config
|
|
35
|
-
plugin: Record<PluginConfig, Linter.Config
|
|
36
|
-
internal: Record<InternalConfig, Linter.Config
|
|
37
|
-
combined: Record<CombinedConfig, Linter.Config
|
|
34
|
+
general: Record<GeneralConfig, Array<Linter.Config>>;
|
|
35
|
+
plugin: Record<PluginConfig, Array<Linter.Config>>;
|
|
36
|
+
internal: Record<InternalConfig, Array<Linter.Config>>;
|
|
37
|
+
combined: Record<CombinedConfig, Array<Linter.Config>>;
|
|
38
38
|
}
|
|
39
39
|
type AlexConfigGroupName = keyof AlexPluginConfigObject;
|
|
40
40
|
type AlexFlattenedConfigName = GetFlattenedConfigNames<AlexPluginConfigObject>;
|
|
41
|
-
type AlexPluginConfigFlattened = Record<AlexFlattenedConfigName, Linter.Config
|
|
41
|
+
type AlexPluginConfigFlattened = Record<AlexFlattenedConfigName, Array<Linter.Config>>;
|
|
42
42
|
//#endregion
|
|
43
43
|
//#region src/configs/index.d.ts
|
|
44
|
-
declare function createAlexPluginConfigs(plugin: Readonly<AlexPlugin>): Record<AlexFlattenedConfigName, Linter.Config
|
|
44
|
+
declare function createAlexPluginConfigs(plugin: Readonly<AlexPlugin>): Record<AlexFlattenedConfigName, Array<Linter.Config>>;
|
|
45
45
|
//#endregion
|
|
46
46
|
//#region package.json.d.ts
|
|
47
47
|
declare let name: string;
|
|
@@ -63,7 +63,7 @@ declare const alexPlugin: AlexPlugin;
|
|
|
63
63
|
declare const prettierConfig: Config;
|
|
64
64
|
//#endregion
|
|
65
65
|
//#region src/configs/external/typeDocConfig.d.ts
|
|
66
|
-
declare function typeDocConfig(entryPoints?: string
|
|
66
|
+
declare function typeDocConfig(entryPoints?: Array<string>): TypeDocOptions & PluginOptions;
|
|
67
67
|
//#endregion
|
|
68
68
|
//#region src/configs/external/vitestConfig.d.ts
|
|
69
69
|
declare function vitestConfig(environment?: VitestEnvironment): vite.UserConfig;
|
|
@@ -89,11 +89,11 @@ interface RestrictedPathImportBase {
|
|
|
89
89
|
allowTypeImports?: boolean;
|
|
90
90
|
}
|
|
91
91
|
interface RestrictedPathImportImportNames extends RestrictedPathImportBase {
|
|
92
|
-
importNames: string
|
|
92
|
+
importNames: Array<string>;
|
|
93
93
|
allowImportNames?: never;
|
|
94
94
|
}
|
|
95
95
|
interface RestrictedPathImportAllowImportNames extends RestrictedPathImportBase {
|
|
96
|
-
allowImportNames: string
|
|
96
|
+
allowImportNames: Array<string>;
|
|
97
97
|
importNames?: never;
|
|
98
98
|
}
|
|
99
99
|
type RestrictedPathImport = RestrictedPathImportBase | RestrictedPathImportImportNames | RestrictedPathImportAllowImportNames;
|
|
@@ -103,7 +103,7 @@ interface RestrictedPatternImportBase {
|
|
|
103
103
|
allowTypeImports?: boolean;
|
|
104
104
|
}
|
|
105
105
|
interface RestrictedPatternImportGroup extends RestrictedPatternImportBase {
|
|
106
|
-
group: string
|
|
106
|
+
group: Array<string>;
|
|
107
107
|
regex?: never;
|
|
108
108
|
}
|
|
109
109
|
interface RestrictedPatternImportRegex extends RestrictedPatternImportBase {
|
|
@@ -111,14 +111,14 @@ interface RestrictedPatternImportRegex extends RestrictedPatternImportBase {
|
|
|
111
111
|
group?: never;
|
|
112
112
|
}
|
|
113
113
|
interface RestrictedPatternImportImportNames extends RestrictedPatternImportBase {
|
|
114
|
-
importNames: string
|
|
114
|
+
importNames: Array<string>;
|
|
115
115
|
allowImportNames?: never;
|
|
116
116
|
importNamePattern?: never;
|
|
117
117
|
allowImportNamePattern?: never;
|
|
118
118
|
}
|
|
119
119
|
interface RestrictedPatternImportAllowImportNames extends RestrictedPatternImportBase {
|
|
120
120
|
importNames?: never;
|
|
121
|
-
allowImportNames: string
|
|
121
|
+
allowImportNames: Array<string>;
|
|
122
122
|
importNamePattern?: never;
|
|
123
123
|
allowImportNamePattern?: never;
|
|
124
124
|
}
|
|
@@ -136,16 +136,16 @@ interface RestrictedPatternImportAllowImportNamePattern extends RestrictedPatter
|
|
|
136
136
|
}
|
|
137
137
|
type RestrictedPatternImport = RestrictedPatternImportGroup | RestrictedPatternImportRegex | RestrictedPatternImportImportNames | RestrictedPatternImportAllowImportNames | RestrictedPatternImportImportNamePattern | RestrictedPatternImportAllowImportNamePattern;
|
|
138
138
|
interface NoRestrictedImportsOptionsPathsOnly {
|
|
139
|
-
paths: RestrictedPathImport
|
|
139
|
+
paths: Array<RestrictedPathImport>;
|
|
140
140
|
patterns?: never;
|
|
141
141
|
}
|
|
142
142
|
interface NoRestrictedImportsOptionsPatternsOnly {
|
|
143
143
|
paths?: never;
|
|
144
|
-
patterns: RestrictedPatternImport
|
|
144
|
+
patterns: Array<RestrictedPatternImport>;
|
|
145
145
|
}
|
|
146
146
|
interface NoRestrictedImportsOptionsPathsAndPatterns {
|
|
147
|
-
paths: RestrictedPathImport
|
|
148
|
-
patterns: RestrictedPatternImport
|
|
147
|
+
paths: Array<RestrictedPathImport>;
|
|
148
|
+
patterns: Array<RestrictedPatternImport>;
|
|
149
149
|
}
|
|
150
150
|
/**
|
|
151
151
|
* Options for the built-in ESLint `no-restricted-imports` rule.
|
|
@@ -164,7 +164,7 @@ type NoRestrictedImportsOptions = NoRestrictedImportsOptionsPathsOnly | NoRestri
|
|
|
164
164
|
*
|
|
165
165
|
* @returns A new object combining all paths and patterns from the given groups, suitable as an option to pass to `no-restricted-imports`.
|
|
166
166
|
*/
|
|
167
|
-
declare function combineRestrictedImports(...groups: NoRestrictedImportsOptions
|
|
167
|
+
declare function combineRestrictedImports(...groups: Array<NoRestrictedImportsOptions>): NoRestrictedImportsOptions;
|
|
168
168
|
//#endregion
|
|
169
169
|
//#region src/utility/public/createRuleSchemaFromZodSchema.d.ts
|
|
170
170
|
/**
|
|
@@ -176,7 +176,7 @@ declare function combineRestrictedImports(...groups: NoRestrictedImportsOptions[
|
|
|
176
176
|
*
|
|
177
177
|
* @returns An array containing the resulting JSON Schema, formatted for ESLint rule schema compatibility.
|
|
178
178
|
*/
|
|
179
|
-
declare function createRuleSchemaFromZodSchema(schema: z.ZodType): JSONSchema4
|
|
179
|
+
declare function createRuleSchemaFromZodSchema(schema: z.ZodType): Array<JSONSchema4>;
|
|
180
180
|
//#endregion
|
|
181
181
|
//#region src/utility/public/fixOnCondition.d.ts
|
|
182
182
|
type RuleFixerFunction = (fixer: RuleFixer) => RuleFix | null;
|
|
@@ -230,7 +230,7 @@ declare function fixOnCondition(fixable: boolean, fix: RuleFixerFunction): RuleF
|
|
|
230
230
|
* // ...
|
|
231
231
|
* }
|
|
232
232
|
*/
|
|
233
|
-
declare function flattenConfigs<ConfigObject extends { [K in keyof ConfigObject]: Record<string, Linter.Config
|
|
233
|
+
declare function flattenConfigs<ConfigObject extends { [K in keyof ConfigObject]: Record<string, Array<Linter.Config>> }>(config: ConfigObject): Record<GetFlattenedConfigNames<ConfigObject>, Array<Linter.Config>>;
|
|
234
234
|
//#endregion
|
|
235
235
|
//#region src/utility/public/getImportSpecifiersAfterRemoving.d.ts
|
|
236
236
|
/**
|
|
@@ -248,6 +248,6 @@ declare function flattenConfigs<ConfigObject extends { [K in keyof ConfigObject]
|
|
|
248
248
|
*
|
|
249
249
|
* @returns A comma-separated string of import specifiers after removing the specified import.
|
|
250
250
|
*/
|
|
251
|
-
declare function getImportSpecifiersAfterRemoving<RuleOptions>(context: Readonly<RuleContext<"message", [RuleOptions]>>, specifiers: TSESTree.ImportClause
|
|
251
|
+
declare function getImportSpecifiersAfterRemoving<RuleOptions>(context: Readonly<RuleContext<"message", [RuleOptions]>>, specifiers: Array<TSESTree.ImportClause>, importToRemove: string): string;
|
|
252
252
|
//#endregion
|
|
253
253
|
export { AlexConfigGroupName, AlexFlattenedConfigName, type AlexPlugin, AlexPluginConfigFlattened, AlexPluginConfigObject, CombinedConfig, GeneralConfig, type GetFlattenedConfigNames, InternalConfig, type NoRestrictedImportsOptions, PluginConfig, checkCallExpression, combineRestrictedImports, createRuleSchemaFromZodSchema, alexPlugin as default, fixOnCondition, flattenConfigs, getImportSpecifiersAfterRemoving, prettierConfig, typeDocConfig, vitestConfig };
|
package/dist/index.js
CHANGED
|
@@ -46,7 +46,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
46
46
|
}) : target, mod));
|
|
47
47
|
|
|
48
48
|
//#endregion
|
|
49
|
-
//#region node_modules/.pnpm/globals@17.
|
|
49
|
+
//#region node_modules/.pnpm/globals@17.4.0/node_modules/globals/globals.json
|
|
50
50
|
var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
51
51
|
module.exports = {
|
|
52
52
|
"amd": {
|
|
@@ -228,6 +228,8 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
228
228
|
"CookieStore": false,
|
|
229
229
|
"CookieStoreManager": false,
|
|
230
230
|
"CountQueuingStrategy": false,
|
|
231
|
+
"crashReport": false,
|
|
232
|
+
"CrashReportContext": false,
|
|
231
233
|
"createImageBitmap": false,
|
|
232
234
|
"CreateMonitor": false,
|
|
233
235
|
"Credential": false,
|
|
@@ -816,6 +818,7 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
816
818
|
"Option": false,
|
|
817
819
|
"OrientationSensor": false,
|
|
818
820
|
"origin": false,
|
|
821
|
+
"Origin": false,
|
|
819
822
|
"originAgentCluster": false,
|
|
820
823
|
"OscillatorNode": false,
|
|
821
824
|
"OTPCredential": false,
|
|
@@ -855,6 +858,7 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
855
858
|
"PerformanceScriptTiming": false,
|
|
856
859
|
"PerformanceServerTiming": false,
|
|
857
860
|
"PerformanceTiming": false,
|
|
861
|
+
"PerformanceTimingConfidence": false,
|
|
858
862
|
"PeriodicSyncManager": false,
|
|
859
863
|
"PeriodicWave": false,
|
|
860
864
|
"Permissions": false,
|
|
@@ -1604,6 +1608,7 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1604
1608
|
"structuredClone": false,
|
|
1605
1609
|
"SubtleCrypto": false,
|
|
1606
1610
|
"SuppressedError": false,
|
|
1611
|
+
"Temporal": false,
|
|
1607
1612
|
"TextDecoder": false,
|
|
1608
1613
|
"TextDecoderStream": false,
|
|
1609
1614
|
"TextEncoder": false,
|
|
@@ -3160,6 +3165,7 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3160
3165
|
"onsync": true,
|
|
3161
3166
|
"onunhandledrejection": true,
|
|
3162
3167
|
"origin": false,
|
|
3168
|
+
"Origin": false,
|
|
3163
3169
|
"Path2D": false,
|
|
3164
3170
|
"PaymentRequestEvent": false,
|
|
3165
3171
|
"performance": false,
|
|
@@ -3503,6 +3509,7 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3503
3509
|
"onrejectionhandled": true,
|
|
3504
3510
|
"onunhandledrejection": true,
|
|
3505
3511
|
"origin": false,
|
|
3512
|
+
"Origin": false,
|
|
3506
3513
|
"Path2D": false,
|
|
3507
3514
|
"performance": false,
|
|
3508
3515
|
"Performance": false,
|
|
@@ -3891,6 +3898,7 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3891
3898
|
"onrtctransform": true,
|
|
3892
3899
|
"onunhandledrejection": true,
|
|
3893
3900
|
"origin": false,
|
|
3901
|
+
"Origin": false,
|
|
3894
3902
|
"Path2D": false,
|
|
3895
3903
|
"performance": false,
|
|
3896
3904
|
"Performance": false,
|
|
@@ -4064,7 +4072,7 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4064
4072
|
}));
|
|
4065
4073
|
|
|
4066
4074
|
//#endregion
|
|
4067
|
-
//#region node_modules/.pnpm/globals@17.
|
|
4075
|
+
//#region node_modules/.pnpm/globals@17.4.0/node_modules/globals/index.js
|
|
4068
4076
|
var require_globals = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4069
4077
|
module.exports = require_globals$1();
|
|
4070
4078
|
}));
|
|
@@ -4595,6 +4603,7 @@ function internalJavaScript(plugin) {
|
|
|
4595
4603
|
plugins: {
|
|
4596
4604
|
"@alextheman": plugin,
|
|
4597
4605
|
import: importPlugin,
|
|
4606
|
+
n: nodePlugin,
|
|
4598
4607
|
perfectionist,
|
|
4599
4608
|
prettier: prettierPlugin
|
|
4600
4609
|
},
|
|
@@ -4608,6 +4617,7 @@ function internalJavaScript(plugin) {
|
|
|
4608
4617
|
{ allowArrowFunctions: false }
|
|
4609
4618
|
],
|
|
4610
4619
|
"import/consistent-type-specifier-style": ["error", "prefer-top-level"],
|
|
4620
|
+
"n/no-extraneous-import": "off",
|
|
4611
4621
|
"no-else-return": "error",
|
|
4612
4622
|
"no-implicit-coercion": ["error", { allow: ["!!"] }],
|
|
4613
4623
|
"no-restricted-imports": ["error", personalRestrictedImports],
|
|
@@ -4914,7 +4924,7 @@ function internalTypeScript(plugin) {
|
|
|
4914
4924
|
},
|
|
4915
4925
|
rules: {
|
|
4916
4926
|
"@alextheman/standardise-error-messages": "off",
|
|
4917
|
-
"@typescript-eslint/array-type": ["error", { default: "
|
|
4927
|
+
"@typescript-eslint/array-type": ["error", { default: "generic" }],
|
|
4918
4928
|
"@typescript-eslint/consistent-type-assertions": ["error", { assertionStyle: "as" }],
|
|
4919
4929
|
"@typescript-eslint/consistent-type-definitions": "error",
|
|
4920
4930
|
"@typescript-eslint/dot-notation": "error",
|
|
@@ -5542,7 +5552,7 @@ var rules_default = {
|
|
|
5542
5552
|
//#endregion
|
|
5543
5553
|
//#region package.json
|
|
5544
5554
|
var name = "@alextheman/eslint-plugin";
|
|
5545
|
-
var version = "5.
|
|
5555
|
+
var version = "5.10.1";
|
|
5546
5556
|
|
|
5547
5557
|
//#endregion
|
|
5548
5558
|
//#region src/alexPlugin.ts
|
package/dist/internal/index.cjs
CHANGED
|
@@ -75,7 +75,7 @@ function vitestConfig(environment = "jsdom") {
|
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
//#endregion
|
|
78
|
-
//#region node_modules/.pnpm/globals@17.
|
|
78
|
+
//#region node_modules/.pnpm/globals@17.4.0/node_modules/globals/globals.json
|
|
79
79
|
var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
80
80
|
module.exports = {
|
|
81
81
|
"amd": {
|
|
@@ -257,6 +257,8 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
257
257
|
"CookieStore": false,
|
|
258
258
|
"CookieStoreManager": false,
|
|
259
259
|
"CountQueuingStrategy": false,
|
|
260
|
+
"crashReport": false,
|
|
261
|
+
"CrashReportContext": false,
|
|
260
262
|
"createImageBitmap": false,
|
|
261
263
|
"CreateMonitor": false,
|
|
262
264
|
"Credential": false,
|
|
@@ -845,6 +847,7 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
845
847
|
"Option": false,
|
|
846
848
|
"OrientationSensor": false,
|
|
847
849
|
"origin": false,
|
|
850
|
+
"Origin": false,
|
|
848
851
|
"originAgentCluster": false,
|
|
849
852
|
"OscillatorNode": false,
|
|
850
853
|
"OTPCredential": false,
|
|
@@ -884,6 +887,7 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
884
887
|
"PerformanceScriptTiming": false,
|
|
885
888
|
"PerformanceServerTiming": false,
|
|
886
889
|
"PerformanceTiming": false,
|
|
890
|
+
"PerformanceTimingConfidence": false,
|
|
887
891
|
"PeriodicSyncManager": false,
|
|
888
892
|
"PeriodicWave": false,
|
|
889
893
|
"Permissions": false,
|
|
@@ -1633,6 +1637,7 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1633
1637
|
"structuredClone": false,
|
|
1634
1638
|
"SubtleCrypto": false,
|
|
1635
1639
|
"SuppressedError": false,
|
|
1640
|
+
"Temporal": false,
|
|
1636
1641
|
"TextDecoder": false,
|
|
1637
1642
|
"TextDecoderStream": false,
|
|
1638
1643
|
"TextEncoder": false,
|
|
@@ -3189,6 +3194,7 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3189
3194
|
"onsync": true,
|
|
3190
3195
|
"onunhandledrejection": true,
|
|
3191
3196
|
"origin": false,
|
|
3197
|
+
"Origin": false,
|
|
3192
3198
|
"Path2D": false,
|
|
3193
3199
|
"PaymentRequestEvent": false,
|
|
3194
3200
|
"performance": false,
|
|
@@ -3532,6 +3538,7 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3532
3538
|
"onrejectionhandled": true,
|
|
3533
3539
|
"onunhandledrejection": true,
|
|
3534
3540
|
"origin": false,
|
|
3541
|
+
"Origin": false,
|
|
3535
3542
|
"Path2D": false,
|
|
3536
3543
|
"performance": false,
|
|
3537
3544
|
"Performance": false,
|
|
@@ -3920,6 +3927,7 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3920
3927
|
"onrtctransform": true,
|
|
3921
3928
|
"onunhandledrejection": true,
|
|
3922
3929
|
"origin": false,
|
|
3930
|
+
"Origin": false,
|
|
3923
3931
|
"Path2D": false,
|
|
3924
3932
|
"performance": false,
|
|
3925
3933
|
"Performance": false,
|
|
@@ -4093,7 +4101,7 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4093
4101
|
}));
|
|
4094
4102
|
|
|
4095
4103
|
//#endregion
|
|
4096
|
-
//#region node_modules/.pnpm/globals@17.
|
|
4104
|
+
//#region node_modules/.pnpm/globals@17.4.0/node_modules/globals/index.js
|
|
4097
4105
|
var require_globals = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4098
4106
|
module.exports = require_globals$1();
|
|
4099
4107
|
}));
|
|
@@ -9,7 +9,7 @@ import { Linter } from "eslint";
|
|
|
9
9
|
declare const prettierConfig: Config;
|
|
10
10
|
//#endregion
|
|
11
11
|
//#region src/configs/external/typeDocConfig.d.ts
|
|
12
|
-
declare function typeDocConfig(entryPoints?: string
|
|
12
|
+
declare function typeDocConfig(entryPoints?: Array<string>): TypeDocOptions & PluginOptions;
|
|
13
13
|
//#endregion
|
|
14
14
|
//#region src/configs/external/vitestConfig.d.ts
|
|
15
15
|
declare function vitestConfig(environment?: VitestEnvironment): vite.UserConfig;
|
|
@@ -106,11 +106,11 @@ interface RestrictedPathImportBase {
|
|
|
106
106
|
allowTypeImports?: boolean;
|
|
107
107
|
}
|
|
108
108
|
interface RestrictedPathImportImportNames extends RestrictedPathImportBase {
|
|
109
|
-
importNames: string
|
|
109
|
+
importNames: Array<string>;
|
|
110
110
|
allowImportNames?: never;
|
|
111
111
|
}
|
|
112
112
|
interface RestrictedPathImportAllowImportNames extends RestrictedPathImportBase {
|
|
113
|
-
allowImportNames: string
|
|
113
|
+
allowImportNames: Array<string>;
|
|
114
114
|
importNames?: never;
|
|
115
115
|
}
|
|
116
116
|
type RestrictedPathImport = RestrictedPathImportBase | RestrictedPathImportImportNames | RestrictedPathImportAllowImportNames;
|
|
@@ -120,7 +120,7 @@ interface RestrictedPatternImportBase {
|
|
|
120
120
|
allowTypeImports?: boolean;
|
|
121
121
|
}
|
|
122
122
|
interface RestrictedPatternImportGroup extends RestrictedPatternImportBase {
|
|
123
|
-
group: string
|
|
123
|
+
group: Array<string>;
|
|
124
124
|
regex?: never;
|
|
125
125
|
}
|
|
126
126
|
interface RestrictedPatternImportRegex extends RestrictedPatternImportBase {
|
|
@@ -128,14 +128,14 @@ interface RestrictedPatternImportRegex extends RestrictedPatternImportBase {
|
|
|
128
128
|
group?: never;
|
|
129
129
|
}
|
|
130
130
|
interface RestrictedPatternImportImportNames extends RestrictedPatternImportBase {
|
|
131
|
-
importNames: string
|
|
131
|
+
importNames: Array<string>;
|
|
132
132
|
allowImportNames?: never;
|
|
133
133
|
importNamePattern?: never;
|
|
134
134
|
allowImportNamePattern?: never;
|
|
135
135
|
}
|
|
136
136
|
interface RestrictedPatternImportAllowImportNames extends RestrictedPatternImportBase {
|
|
137
137
|
importNames?: never;
|
|
138
|
-
allowImportNames: string
|
|
138
|
+
allowImportNames: Array<string>;
|
|
139
139
|
importNamePattern?: never;
|
|
140
140
|
allowImportNamePattern?: never;
|
|
141
141
|
}
|
|
@@ -153,16 +153,16 @@ interface RestrictedPatternImportAllowImportNamePattern extends RestrictedPatter
|
|
|
153
153
|
}
|
|
154
154
|
type RestrictedPatternImport = RestrictedPatternImportGroup | RestrictedPatternImportRegex | RestrictedPatternImportImportNames | RestrictedPatternImportAllowImportNames | RestrictedPatternImportImportNamePattern | RestrictedPatternImportAllowImportNamePattern;
|
|
155
155
|
interface NoRestrictedImportsOptionsPathsOnly {
|
|
156
|
-
paths: RestrictedPathImport
|
|
156
|
+
paths: Array<RestrictedPathImport>;
|
|
157
157
|
patterns?: never;
|
|
158
158
|
}
|
|
159
159
|
interface NoRestrictedImportsOptionsPatternsOnly {
|
|
160
160
|
paths?: never;
|
|
161
|
-
patterns: RestrictedPatternImport
|
|
161
|
+
patterns: Array<RestrictedPatternImport>;
|
|
162
162
|
}
|
|
163
163
|
interface NoRestrictedImportsOptionsPathsAndPatterns {
|
|
164
|
-
paths: RestrictedPathImport
|
|
165
|
-
patterns: RestrictedPatternImport
|
|
164
|
+
paths: Array<RestrictedPathImport>;
|
|
165
|
+
patterns: Array<RestrictedPatternImport>;
|
|
166
166
|
}
|
|
167
167
|
/**
|
|
168
168
|
* Options for the built-in ESLint `no-restricted-imports` rule.
|
package/dist/internal/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { Linter } from "eslint";
|
|
|
9
9
|
declare const prettierConfig: Config;
|
|
10
10
|
//#endregion
|
|
11
11
|
//#region src/configs/external/typeDocConfig.d.ts
|
|
12
|
-
declare function typeDocConfig(entryPoints?: string
|
|
12
|
+
declare function typeDocConfig(entryPoints?: Array<string>): TypeDocOptions & PluginOptions;
|
|
13
13
|
//#endregion
|
|
14
14
|
//#region src/configs/external/vitestConfig.d.ts
|
|
15
15
|
declare function vitestConfig(environment?: VitestEnvironment): vite.UserConfig;
|
|
@@ -106,11 +106,11 @@ interface RestrictedPathImportBase {
|
|
|
106
106
|
allowTypeImports?: boolean;
|
|
107
107
|
}
|
|
108
108
|
interface RestrictedPathImportImportNames extends RestrictedPathImportBase {
|
|
109
|
-
importNames: string
|
|
109
|
+
importNames: Array<string>;
|
|
110
110
|
allowImportNames?: never;
|
|
111
111
|
}
|
|
112
112
|
interface RestrictedPathImportAllowImportNames extends RestrictedPathImportBase {
|
|
113
|
-
allowImportNames: string
|
|
113
|
+
allowImportNames: Array<string>;
|
|
114
114
|
importNames?: never;
|
|
115
115
|
}
|
|
116
116
|
type RestrictedPathImport = RestrictedPathImportBase | RestrictedPathImportImportNames | RestrictedPathImportAllowImportNames;
|
|
@@ -120,7 +120,7 @@ interface RestrictedPatternImportBase {
|
|
|
120
120
|
allowTypeImports?: boolean;
|
|
121
121
|
}
|
|
122
122
|
interface RestrictedPatternImportGroup extends RestrictedPatternImportBase {
|
|
123
|
-
group: string
|
|
123
|
+
group: Array<string>;
|
|
124
124
|
regex?: never;
|
|
125
125
|
}
|
|
126
126
|
interface RestrictedPatternImportRegex extends RestrictedPatternImportBase {
|
|
@@ -128,14 +128,14 @@ interface RestrictedPatternImportRegex extends RestrictedPatternImportBase {
|
|
|
128
128
|
group?: never;
|
|
129
129
|
}
|
|
130
130
|
interface RestrictedPatternImportImportNames extends RestrictedPatternImportBase {
|
|
131
|
-
importNames: string
|
|
131
|
+
importNames: Array<string>;
|
|
132
132
|
allowImportNames?: never;
|
|
133
133
|
importNamePattern?: never;
|
|
134
134
|
allowImportNamePattern?: never;
|
|
135
135
|
}
|
|
136
136
|
interface RestrictedPatternImportAllowImportNames extends RestrictedPatternImportBase {
|
|
137
137
|
importNames?: never;
|
|
138
|
-
allowImportNames: string
|
|
138
|
+
allowImportNames: Array<string>;
|
|
139
139
|
importNamePattern?: never;
|
|
140
140
|
allowImportNamePattern?: never;
|
|
141
141
|
}
|
|
@@ -153,16 +153,16 @@ interface RestrictedPatternImportAllowImportNamePattern extends RestrictedPatter
|
|
|
153
153
|
}
|
|
154
154
|
type RestrictedPatternImport = RestrictedPatternImportGroup | RestrictedPatternImportRegex | RestrictedPatternImportImportNames | RestrictedPatternImportAllowImportNames | RestrictedPatternImportImportNamePattern | RestrictedPatternImportAllowImportNamePattern;
|
|
155
155
|
interface NoRestrictedImportsOptionsPathsOnly {
|
|
156
|
-
paths: RestrictedPathImport
|
|
156
|
+
paths: Array<RestrictedPathImport>;
|
|
157
157
|
patterns?: never;
|
|
158
158
|
}
|
|
159
159
|
interface NoRestrictedImportsOptionsPatternsOnly {
|
|
160
160
|
paths?: never;
|
|
161
|
-
patterns: RestrictedPatternImport
|
|
161
|
+
patterns: Array<RestrictedPatternImport>;
|
|
162
162
|
}
|
|
163
163
|
interface NoRestrictedImportsOptionsPathsAndPatterns {
|
|
164
|
-
paths: RestrictedPathImport
|
|
165
|
-
patterns: RestrictedPatternImport
|
|
164
|
+
paths: Array<RestrictedPathImport>;
|
|
165
|
+
patterns: Array<RestrictedPatternImport>;
|
|
166
166
|
}
|
|
167
167
|
/**
|
|
168
168
|
* Options for the built-in ESLint `no-restricted-imports` rule.
|
package/dist/internal/index.js
CHANGED
|
@@ -72,7 +72,7 @@ function vitestConfig(environment = "jsdom") {
|
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
//#endregion
|
|
75
|
-
//#region node_modules/.pnpm/globals@17.
|
|
75
|
+
//#region node_modules/.pnpm/globals@17.4.0/node_modules/globals/globals.json
|
|
76
76
|
var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
77
77
|
module.exports = {
|
|
78
78
|
"amd": {
|
|
@@ -254,6 +254,8 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
254
254
|
"CookieStore": false,
|
|
255
255
|
"CookieStoreManager": false,
|
|
256
256
|
"CountQueuingStrategy": false,
|
|
257
|
+
"crashReport": false,
|
|
258
|
+
"CrashReportContext": false,
|
|
257
259
|
"createImageBitmap": false,
|
|
258
260
|
"CreateMonitor": false,
|
|
259
261
|
"Credential": false,
|
|
@@ -842,6 +844,7 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
842
844
|
"Option": false,
|
|
843
845
|
"OrientationSensor": false,
|
|
844
846
|
"origin": false,
|
|
847
|
+
"Origin": false,
|
|
845
848
|
"originAgentCluster": false,
|
|
846
849
|
"OscillatorNode": false,
|
|
847
850
|
"OTPCredential": false,
|
|
@@ -881,6 +884,7 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
881
884
|
"PerformanceScriptTiming": false,
|
|
882
885
|
"PerformanceServerTiming": false,
|
|
883
886
|
"PerformanceTiming": false,
|
|
887
|
+
"PerformanceTimingConfidence": false,
|
|
884
888
|
"PeriodicSyncManager": false,
|
|
885
889
|
"PeriodicWave": false,
|
|
886
890
|
"Permissions": false,
|
|
@@ -1630,6 +1634,7 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1630
1634
|
"structuredClone": false,
|
|
1631
1635
|
"SubtleCrypto": false,
|
|
1632
1636
|
"SuppressedError": false,
|
|
1637
|
+
"Temporal": false,
|
|
1633
1638
|
"TextDecoder": false,
|
|
1634
1639
|
"TextDecoderStream": false,
|
|
1635
1640
|
"TextEncoder": false,
|
|
@@ -3186,6 +3191,7 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3186
3191
|
"onsync": true,
|
|
3187
3192
|
"onunhandledrejection": true,
|
|
3188
3193
|
"origin": false,
|
|
3194
|
+
"Origin": false,
|
|
3189
3195
|
"Path2D": false,
|
|
3190
3196
|
"PaymentRequestEvent": false,
|
|
3191
3197
|
"performance": false,
|
|
@@ -3529,6 +3535,7 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3529
3535
|
"onrejectionhandled": true,
|
|
3530
3536
|
"onunhandledrejection": true,
|
|
3531
3537
|
"origin": false,
|
|
3538
|
+
"Origin": false,
|
|
3532
3539
|
"Path2D": false,
|
|
3533
3540
|
"performance": false,
|
|
3534
3541
|
"Performance": false,
|
|
@@ -3917,6 +3924,7 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3917
3924
|
"onrtctransform": true,
|
|
3918
3925
|
"onunhandledrejection": true,
|
|
3919
3926
|
"origin": false,
|
|
3927
|
+
"Origin": false,
|
|
3920
3928
|
"Path2D": false,
|
|
3921
3929
|
"performance": false,
|
|
3922
3930
|
"Performance": false,
|
|
@@ -4090,7 +4098,7 @@ var require_globals$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4090
4098
|
}));
|
|
4091
4099
|
|
|
4092
4100
|
//#endregion
|
|
4093
|
-
//#region node_modules/.pnpm/globals@17.
|
|
4101
|
+
//#region node_modules/.pnpm/globals@17.4.0/node_modules/globals/index.js
|
|
4094
4102
|
var require_globals = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4095
4103
|
module.exports = require_globals$1();
|
|
4096
4104
|
}));
|
package/dist/utility/index.d.cts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { TSESTree } from "@typescript-eslint/utils";
|
|
2
|
-
import "typedoc";
|
|
3
|
-
import "typedoc-plugin-markdown";
|
|
4
2
|
import { Linter } from "eslint";
|
|
5
3
|
import z from "zod";
|
|
6
4
|
import { JSONSchema4 } from "@typescript-eslint/utils/json-schema";
|
|
@@ -27,11 +25,11 @@ interface RestrictedPathImportBase {
|
|
|
27
25
|
allowTypeImports?: boolean;
|
|
28
26
|
}
|
|
29
27
|
interface RestrictedPathImportImportNames extends RestrictedPathImportBase {
|
|
30
|
-
importNames: string
|
|
28
|
+
importNames: Array<string>;
|
|
31
29
|
allowImportNames?: never;
|
|
32
30
|
}
|
|
33
31
|
interface RestrictedPathImportAllowImportNames extends RestrictedPathImportBase {
|
|
34
|
-
allowImportNames: string
|
|
32
|
+
allowImportNames: Array<string>;
|
|
35
33
|
importNames?: never;
|
|
36
34
|
}
|
|
37
35
|
type RestrictedPathImport = RestrictedPathImportBase | RestrictedPathImportImportNames | RestrictedPathImportAllowImportNames;
|
|
@@ -41,7 +39,7 @@ interface RestrictedPatternImportBase {
|
|
|
41
39
|
allowTypeImports?: boolean;
|
|
42
40
|
}
|
|
43
41
|
interface RestrictedPatternImportGroup extends RestrictedPatternImportBase {
|
|
44
|
-
group: string
|
|
42
|
+
group: Array<string>;
|
|
45
43
|
regex?: never;
|
|
46
44
|
}
|
|
47
45
|
interface RestrictedPatternImportRegex extends RestrictedPatternImportBase {
|
|
@@ -49,14 +47,14 @@ interface RestrictedPatternImportRegex extends RestrictedPatternImportBase {
|
|
|
49
47
|
group?: never;
|
|
50
48
|
}
|
|
51
49
|
interface RestrictedPatternImportImportNames extends RestrictedPatternImportBase {
|
|
52
|
-
importNames: string
|
|
50
|
+
importNames: Array<string>;
|
|
53
51
|
allowImportNames?: never;
|
|
54
52
|
importNamePattern?: never;
|
|
55
53
|
allowImportNamePattern?: never;
|
|
56
54
|
}
|
|
57
55
|
interface RestrictedPatternImportAllowImportNames extends RestrictedPatternImportBase {
|
|
58
56
|
importNames?: never;
|
|
59
|
-
allowImportNames: string
|
|
57
|
+
allowImportNames: Array<string>;
|
|
60
58
|
importNamePattern?: never;
|
|
61
59
|
allowImportNamePattern?: never;
|
|
62
60
|
}
|
|
@@ -74,16 +72,16 @@ interface RestrictedPatternImportAllowImportNamePattern extends RestrictedPatter
|
|
|
74
72
|
}
|
|
75
73
|
type RestrictedPatternImport = RestrictedPatternImportGroup | RestrictedPatternImportRegex | RestrictedPatternImportImportNames | RestrictedPatternImportAllowImportNames | RestrictedPatternImportImportNamePattern | RestrictedPatternImportAllowImportNamePattern;
|
|
76
74
|
interface NoRestrictedImportsOptionsPathsOnly {
|
|
77
|
-
paths: RestrictedPathImport
|
|
75
|
+
paths: Array<RestrictedPathImport>;
|
|
78
76
|
patterns?: never;
|
|
79
77
|
}
|
|
80
78
|
interface NoRestrictedImportsOptionsPatternsOnly {
|
|
81
79
|
paths?: never;
|
|
82
|
-
patterns: RestrictedPatternImport
|
|
80
|
+
patterns: Array<RestrictedPatternImport>;
|
|
83
81
|
}
|
|
84
82
|
interface NoRestrictedImportsOptionsPathsAndPatterns {
|
|
85
|
-
paths: RestrictedPathImport
|
|
86
|
-
patterns: RestrictedPatternImport
|
|
83
|
+
paths: Array<RestrictedPathImport>;
|
|
84
|
+
patterns: Array<RestrictedPatternImport>;
|
|
87
85
|
}
|
|
88
86
|
/**
|
|
89
87
|
* Options for the built-in ESLint `no-restricted-imports` rule.
|
|
@@ -102,7 +100,7 @@ type NoRestrictedImportsOptions = NoRestrictedImportsOptionsPathsOnly | NoRestri
|
|
|
102
100
|
*
|
|
103
101
|
* @returns A new object combining all paths and patterns from the given groups, suitable as an option to pass to `no-restricted-imports`.
|
|
104
102
|
*/
|
|
105
|
-
declare function combineRestrictedImports(...groups: NoRestrictedImportsOptions
|
|
103
|
+
declare function combineRestrictedImports(...groups: Array<NoRestrictedImportsOptions>): NoRestrictedImportsOptions;
|
|
106
104
|
//#endregion
|
|
107
105
|
//#region src/utility/public/createRuleSchemaFromZodSchema.d.ts
|
|
108
106
|
/**
|
|
@@ -114,7 +112,7 @@ declare function combineRestrictedImports(...groups: NoRestrictedImportsOptions[
|
|
|
114
112
|
*
|
|
115
113
|
* @returns An array containing the resulting JSON Schema, formatted for ESLint rule schema compatibility.
|
|
116
114
|
*/
|
|
117
|
-
declare function createRuleSchemaFromZodSchema(schema: z.ZodType): JSONSchema4
|
|
115
|
+
declare function createRuleSchemaFromZodSchema(schema: z.ZodType): Array<JSONSchema4>;
|
|
118
116
|
//#endregion
|
|
119
117
|
//#region src/utility/public/fixOnCondition.d.ts
|
|
120
118
|
type RuleFixerFunction = (fixer: RuleFixer) => RuleFix | null;
|
|
@@ -144,7 +142,7 @@ type CamelToKebab<S extends string> = S extends `${infer Head}${infer Tail}` ? H
|
|
|
144
142
|
* type ConfigNames = GetFlattenedConfigNames<{ general: { typescriptReact }}> // "general/typescript-react"
|
|
145
143
|
* ```
|
|
146
144
|
*/
|
|
147
|
-
type GetFlattenedConfigNames<ConfigObject extends { [K in keyof ConfigObject]: Record<string, Linter.Config
|
|
145
|
+
type GetFlattenedConfigNames<ConfigObject extends { [K in keyof ConfigObject]: Record<string, Array<Linter.Config>> }> = { [Group in keyof ConfigObject & string]: `${CamelToKebab<Group>}/${CamelToKebab<keyof ConfigObject[Group] & string>}` }[keyof ConfigObject & string];
|
|
148
146
|
//#endregion
|
|
149
147
|
//#region src/utility/public/flattenConfigs.d.ts
|
|
150
148
|
/**
|
|
@@ -184,7 +182,7 @@ type GetFlattenedConfigNames<ConfigObject extends { [K in keyof ConfigObject]: R
|
|
|
184
182
|
* // ...
|
|
185
183
|
* }
|
|
186
184
|
*/
|
|
187
|
-
declare function flattenConfigs<ConfigObject extends { [K in keyof ConfigObject]: Record<string, Linter.Config
|
|
185
|
+
declare function flattenConfigs<ConfigObject extends { [K in keyof ConfigObject]: Record<string, Array<Linter.Config>> }>(config: ConfigObject): Record<GetFlattenedConfigNames<ConfigObject>, Array<Linter.Config>>;
|
|
188
186
|
//#endregion
|
|
189
187
|
//#region src/utility/public/getImportSpecifiersAfterRemoving.d.ts
|
|
190
188
|
/**
|
|
@@ -202,6 +200,6 @@ declare function flattenConfigs<ConfigObject extends { [K in keyof ConfigObject]
|
|
|
202
200
|
*
|
|
203
201
|
* @returns A comma-separated string of import specifiers after removing the specified import.
|
|
204
202
|
*/
|
|
205
|
-
declare function getImportSpecifiersAfterRemoving<RuleOptions>(context: Readonly<RuleContext<"message", [RuleOptions]>>, specifiers: TSESTree.ImportClause
|
|
203
|
+
declare function getImportSpecifiersAfterRemoving<RuleOptions>(context: Readonly<RuleContext<"message", [RuleOptions]>>, specifiers: Array<TSESTree.ImportClause>, importToRemove: string): string;
|
|
206
204
|
//#endregion
|
|
207
205
|
export { type GetFlattenedConfigNames, type NoRestrictedImportsOptions, checkCallExpression, combineRestrictedImports, createRuleSchemaFromZodSchema, fixOnCondition, flattenConfigs, getImportSpecifiersAfterRemoving };
|
package/dist/utility/index.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { TSESTree } from "@typescript-eslint/utils";
|
|
2
2
|
import z from "zod";
|
|
3
|
-
import "typedoc";
|
|
4
|
-
import "typedoc-plugin-markdown";
|
|
5
3
|
import { Linter } from "eslint";
|
|
6
4
|
import { JSONSchema4 } from "@typescript-eslint/utils/json-schema";
|
|
7
5
|
import { RuleContext, RuleFix, RuleFixer } from "@typescript-eslint/utils/ts-eslint";
|
|
@@ -27,11 +25,11 @@ interface RestrictedPathImportBase {
|
|
|
27
25
|
allowTypeImports?: boolean;
|
|
28
26
|
}
|
|
29
27
|
interface RestrictedPathImportImportNames extends RestrictedPathImportBase {
|
|
30
|
-
importNames: string
|
|
28
|
+
importNames: Array<string>;
|
|
31
29
|
allowImportNames?: never;
|
|
32
30
|
}
|
|
33
31
|
interface RestrictedPathImportAllowImportNames extends RestrictedPathImportBase {
|
|
34
|
-
allowImportNames: string
|
|
32
|
+
allowImportNames: Array<string>;
|
|
35
33
|
importNames?: never;
|
|
36
34
|
}
|
|
37
35
|
type RestrictedPathImport = RestrictedPathImportBase | RestrictedPathImportImportNames | RestrictedPathImportAllowImportNames;
|
|
@@ -41,7 +39,7 @@ interface RestrictedPatternImportBase {
|
|
|
41
39
|
allowTypeImports?: boolean;
|
|
42
40
|
}
|
|
43
41
|
interface RestrictedPatternImportGroup extends RestrictedPatternImportBase {
|
|
44
|
-
group: string
|
|
42
|
+
group: Array<string>;
|
|
45
43
|
regex?: never;
|
|
46
44
|
}
|
|
47
45
|
interface RestrictedPatternImportRegex extends RestrictedPatternImportBase {
|
|
@@ -49,14 +47,14 @@ interface RestrictedPatternImportRegex extends RestrictedPatternImportBase {
|
|
|
49
47
|
group?: never;
|
|
50
48
|
}
|
|
51
49
|
interface RestrictedPatternImportImportNames extends RestrictedPatternImportBase {
|
|
52
|
-
importNames: string
|
|
50
|
+
importNames: Array<string>;
|
|
53
51
|
allowImportNames?: never;
|
|
54
52
|
importNamePattern?: never;
|
|
55
53
|
allowImportNamePattern?: never;
|
|
56
54
|
}
|
|
57
55
|
interface RestrictedPatternImportAllowImportNames extends RestrictedPatternImportBase {
|
|
58
56
|
importNames?: never;
|
|
59
|
-
allowImportNames: string
|
|
57
|
+
allowImportNames: Array<string>;
|
|
60
58
|
importNamePattern?: never;
|
|
61
59
|
allowImportNamePattern?: never;
|
|
62
60
|
}
|
|
@@ -74,16 +72,16 @@ interface RestrictedPatternImportAllowImportNamePattern extends RestrictedPatter
|
|
|
74
72
|
}
|
|
75
73
|
type RestrictedPatternImport = RestrictedPatternImportGroup | RestrictedPatternImportRegex | RestrictedPatternImportImportNames | RestrictedPatternImportAllowImportNames | RestrictedPatternImportImportNamePattern | RestrictedPatternImportAllowImportNamePattern;
|
|
76
74
|
interface NoRestrictedImportsOptionsPathsOnly {
|
|
77
|
-
paths: RestrictedPathImport
|
|
75
|
+
paths: Array<RestrictedPathImport>;
|
|
78
76
|
patterns?: never;
|
|
79
77
|
}
|
|
80
78
|
interface NoRestrictedImportsOptionsPatternsOnly {
|
|
81
79
|
paths?: never;
|
|
82
|
-
patterns: RestrictedPatternImport
|
|
80
|
+
patterns: Array<RestrictedPatternImport>;
|
|
83
81
|
}
|
|
84
82
|
interface NoRestrictedImportsOptionsPathsAndPatterns {
|
|
85
|
-
paths: RestrictedPathImport
|
|
86
|
-
patterns: RestrictedPatternImport
|
|
83
|
+
paths: Array<RestrictedPathImport>;
|
|
84
|
+
patterns: Array<RestrictedPatternImport>;
|
|
87
85
|
}
|
|
88
86
|
/**
|
|
89
87
|
* Options for the built-in ESLint `no-restricted-imports` rule.
|
|
@@ -102,7 +100,7 @@ type NoRestrictedImportsOptions = NoRestrictedImportsOptionsPathsOnly | NoRestri
|
|
|
102
100
|
*
|
|
103
101
|
* @returns A new object combining all paths and patterns from the given groups, suitable as an option to pass to `no-restricted-imports`.
|
|
104
102
|
*/
|
|
105
|
-
declare function combineRestrictedImports(...groups: NoRestrictedImportsOptions
|
|
103
|
+
declare function combineRestrictedImports(...groups: Array<NoRestrictedImportsOptions>): NoRestrictedImportsOptions;
|
|
106
104
|
//#endregion
|
|
107
105
|
//#region src/utility/public/createRuleSchemaFromZodSchema.d.ts
|
|
108
106
|
/**
|
|
@@ -114,7 +112,7 @@ declare function combineRestrictedImports(...groups: NoRestrictedImportsOptions[
|
|
|
114
112
|
*
|
|
115
113
|
* @returns An array containing the resulting JSON Schema, formatted for ESLint rule schema compatibility.
|
|
116
114
|
*/
|
|
117
|
-
declare function createRuleSchemaFromZodSchema(schema: z.ZodType): JSONSchema4
|
|
115
|
+
declare function createRuleSchemaFromZodSchema(schema: z.ZodType): Array<JSONSchema4>;
|
|
118
116
|
//#endregion
|
|
119
117
|
//#region src/utility/public/fixOnCondition.d.ts
|
|
120
118
|
type RuleFixerFunction = (fixer: RuleFixer) => RuleFix | null;
|
|
@@ -144,7 +142,7 @@ type CamelToKebab<S extends string> = S extends `${infer Head}${infer Tail}` ? H
|
|
|
144
142
|
* type ConfigNames = GetFlattenedConfigNames<{ general: { typescriptReact }}> // "general/typescript-react"
|
|
145
143
|
* ```
|
|
146
144
|
*/
|
|
147
|
-
type GetFlattenedConfigNames<ConfigObject extends { [K in keyof ConfigObject]: Record<string, Linter.Config
|
|
145
|
+
type GetFlattenedConfigNames<ConfigObject extends { [K in keyof ConfigObject]: Record<string, Array<Linter.Config>> }> = { [Group in keyof ConfigObject & string]: `${CamelToKebab<Group>}/${CamelToKebab<keyof ConfigObject[Group] & string>}` }[keyof ConfigObject & string];
|
|
148
146
|
//#endregion
|
|
149
147
|
//#region src/utility/public/flattenConfigs.d.ts
|
|
150
148
|
/**
|
|
@@ -184,7 +182,7 @@ type GetFlattenedConfigNames<ConfigObject extends { [K in keyof ConfigObject]: R
|
|
|
184
182
|
* // ...
|
|
185
183
|
* }
|
|
186
184
|
*/
|
|
187
|
-
declare function flattenConfigs<ConfigObject extends { [K in keyof ConfigObject]: Record<string, Linter.Config
|
|
185
|
+
declare function flattenConfigs<ConfigObject extends { [K in keyof ConfigObject]: Record<string, Array<Linter.Config>> }>(config: ConfigObject): Record<GetFlattenedConfigNames<ConfigObject>, Array<Linter.Config>>;
|
|
188
186
|
//#endregion
|
|
189
187
|
//#region src/utility/public/getImportSpecifiersAfterRemoving.d.ts
|
|
190
188
|
/**
|
|
@@ -202,6 +200,6 @@ declare function flattenConfigs<ConfigObject extends { [K in keyof ConfigObject]
|
|
|
202
200
|
*
|
|
203
201
|
* @returns A comma-separated string of import specifiers after removing the specified import.
|
|
204
202
|
*/
|
|
205
|
-
declare function getImportSpecifiersAfterRemoving<RuleOptions>(context: Readonly<RuleContext<"message", [RuleOptions]>>, specifiers: TSESTree.ImportClause
|
|
203
|
+
declare function getImportSpecifiersAfterRemoving<RuleOptions>(context: Readonly<RuleContext<"message", [RuleOptions]>>, specifiers: Array<TSESTree.ImportClause>, importToRemove: string): string;
|
|
206
204
|
//#endregion
|
|
207
205
|
export { type GetFlattenedConfigNames, type NoRestrictedImportsOptions, checkCallExpression, combineRestrictedImports, createRuleSchemaFromZodSchema, fixOnCondition, flattenConfigs, getImportSpecifiersAfterRemoving };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alextheman/eslint-plugin",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.10.1",
|
|
4
4
|
"description": "A package to provide custom ESLint rules and configs.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
"dist"
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@alextheman/utility": "^5.1
|
|
37
|
+
"@alextheman/utility": "^5.6.1",
|
|
38
38
|
"@eslint/compat": "^2.0.2",
|
|
39
|
-
"@typescript-eslint/types": "^8.56.
|
|
40
|
-
"@typescript-eslint/utils": "^8.56.
|
|
39
|
+
"@typescript-eslint/types": "^8.56.1",
|
|
40
|
+
"@typescript-eslint/utils": "^8.56.1",
|
|
41
41
|
"common-tags": "^1.8.2",
|
|
42
42
|
"prettier": "^3.8.1",
|
|
43
43
|
"zod": "^4.3.6"
|
|
@@ -47,26 +47,26 @@
|
|
|
47
47
|
"@types/common-tags": "^1.8.4",
|
|
48
48
|
"@types/eslint": "^9.6.1",
|
|
49
49
|
"@types/eslint-plugin-jsx-a11y": "^6.10.1",
|
|
50
|
-
"@types/node": "^25.3.
|
|
51
|
-
"@typescript-eslint/rule-tester": "^8.56.
|
|
52
|
-
"alex-c-line": "^
|
|
50
|
+
"@types/node": "^25.3.5",
|
|
51
|
+
"@typescript-eslint/rule-tester": "^8.56.1",
|
|
52
|
+
"alex-c-line": "^2.0.1",
|
|
53
53
|
"dotenv-cli": "^11.0.0",
|
|
54
|
-
"eslint": "^10.0.
|
|
54
|
+
"eslint": "^10.0.2",
|
|
55
55
|
"eslint-config-prettier": "^10.1.8",
|
|
56
56
|
"eslint-import-resolver-typescript": "^4.4.4",
|
|
57
57
|
"eslint-plugin-import": "^2.32.0",
|
|
58
|
-
"eslint-plugin-jsdoc": "^62.7.
|
|
58
|
+
"eslint-plugin-jsdoc": "^62.7.1",
|
|
59
59
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
60
60
|
"eslint-plugin-n": "^17.24.0",
|
|
61
|
-
"eslint-plugin-package-json": "^0.89.
|
|
61
|
+
"eslint-plugin-package-json": "^0.89.3",
|
|
62
62
|
"eslint-plugin-perfectionist": "^5.6.0",
|
|
63
63
|
"eslint-plugin-prettier": "^5.5.5",
|
|
64
64
|
"eslint-plugin-react": "^7.37.5",
|
|
65
65
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
66
|
-
"eslint-plugin-react-refresh": "^0.5.
|
|
66
|
+
"eslint-plugin-react-refresh": "^0.5.2",
|
|
67
67
|
"eslint-vitest-rule-tester": "^3.1.0",
|
|
68
68
|
"execa": "^9.6.1",
|
|
69
|
-
"globals": "^17.
|
|
69
|
+
"globals": "^17.4.0",
|
|
70
70
|
"husky": "^9.1.7",
|
|
71
71
|
"jsdom": "^28.1.0",
|
|
72
72
|
"tempy": "^3.2.0",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"typedoc-plugin-markdown": "^4.10.0",
|
|
77
77
|
"typedoc-rhineai-theme": "^1.2.0",
|
|
78
78
|
"typescript": "^5.9.3",
|
|
79
|
-
"typescript-eslint": "^8.56.
|
|
79
|
+
"typescript-eslint": "^8.56.1",
|
|
80
80
|
"vite-tsconfig-paths": "^6.1.1",
|
|
81
81
|
"vitest": "^4.0.18"
|
|
82
82
|
},
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
"build": "tsdown",
|
|
107
107
|
"create-feature-docs": "typedoc",
|
|
108
108
|
"create-local-package": "pnpm run build && rm -f alextheman-eslint-plugin-*.tgz && pnpm pack",
|
|
109
|
-
"create-release-note": "bash -c 'git pull origin main && alex-c-line
|
|
109
|
+
"create-release-note": "bash -c 'git pull origin main && alex-c-line template release-note create $@' --",
|
|
110
110
|
"format": "pnpm run format-prettier && pnpm run format-eslint",
|
|
111
111
|
"format-and-build": "tsx src/utility/checkConfigChanges.ts || pnpm run build && pnpm run format",
|
|
112
112
|
"format-eslint": "eslint --fix --suppress-all \"src/**/*.ts\" \"tests/**/*.ts\" \"package.json\" && rm -f eslint-suppressions.json",
|
|
@@ -114,15 +114,16 @@
|
|
|
114
114
|
"format-prettier-javascript": "prettier --write \"./**/*.js\"",
|
|
115
115
|
"format-prettier-typescript": "prettier --write --parser typescript \"./**/*.ts\"",
|
|
116
116
|
"format-prettier-yml": "prettier --write \"./**/*.yml\"",
|
|
117
|
-
"lint": "pnpm run lint-tsc && pnpm run lint-eslint && pnpm run lint-prettier",
|
|
117
|
+
"lint": "pnpm run lint-tsc && pnpm run lint-eslint && pnpm run lint-prettier && pnpm run lint-pre-release",
|
|
118
118
|
"lint-and-build": "tsx src/utility/checkConfigChanges.ts || pnpm run build && pnpm run lint",
|
|
119
119
|
"lint-eslint": "eslint \"src/**/*.ts\" \"tests/**/*.ts\" \"package.json\"",
|
|
120
|
+
"lint-pre-release": "alex-c-line package-json check --rules no-pre-release-dependencies",
|
|
120
121
|
"lint-prettier": "pnpm run lint-prettier-typescript && pnpm run lint-prettier-javascript && pnpm run lint-prettier-yml",
|
|
121
122
|
"lint-prettier-javascript": "prettier --check \"./**/*.js\"",
|
|
122
123
|
"lint-prettier-typescript": "prettier --check --parser typescript \"./**/*.ts\"",
|
|
123
124
|
"lint-prettier-yml": "prettier --check \"./**/*.{yml,yaml}\"",
|
|
124
125
|
"lint-tsc": "tsc --noEmit",
|
|
125
|
-
"pre-commit": "alex-c-line pre-commit
|
|
126
|
+
"pre-commit": "alex-c-line pre-commit",
|
|
126
127
|
"test": "vitest run",
|
|
127
128
|
"test-end-to-end": "RUN_END_TO_END=true vitest run tests/end-to-end --reporter verbose",
|
|
128
129
|
"test-watch": "vitest",
|