@alextheman/eslint-plugin 5.2.3 → 5.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +78 -72
- package/dist/index.d.cts +57 -154
- package/dist/index.d.ts +56 -153
- package/dist/index.js +77 -58
- package/dist/utility/index.cjs +209 -0
- package/dist/utility/index.d.cts +208 -0
- package/dist/utility/index.d.ts +208 -0
- package/dist/utility/index.js +176 -0
- package/package.json +17 -2
package/dist/index.d.ts
CHANGED
|
@@ -6,13 +6,23 @@ import { TypeDocOptions } from "typedoc";
|
|
|
6
6
|
import { PluginOptions } from "typedoc-plugin-markdown";
|
|
7
7
|
import * as vite0 from "vite";
|
|
8
8
|
import { VitestEnvironment } from "vitest/node";
|
|
9
|
-
import { RuleContext, RuleFix, RuleFixer } from "@typescript-eslint/utils/ts-eslint";
|
|
10
9
|
import { JSONSchema4 } from "@typescript-eslint/utils/json-schema";
|
|
10
|
+
import { RuleContext, RuleFix, RuleFixer } from "@typescript-eslint/utils/ts-eslint";
|
|
11
11
|
|
|
12
12
|
//#region src/utility/private/camelToKebab.d.ts
|
|
13
13
|
type CamelToKebab<S extends string> = S extends `${infer Head}${infer Tail}` ? Head extends Lowercase<Head> ? `${Head}${CamelToKebab<Tail>}` : `-${Lowercase<Head>}${CamelToKebab<Tail>}` : S;
|
|
14
14
|
//#endregion
|
|
15
15
|
//#region src/utility/public/GetFlattenedConfigNames.d.ts
|
|
16
|
+
/**
|
|
17
|
+
* A helper type to turn the keys of a doubly-nested object into a flattened ESLint config key.
|
|
18
|
+
*
|
|
19
|
+
* @category Utility
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```typescript
|
|
23
|
+
* type ConfigNames = GetFlattenedConfigNames<{ general: { typescriptReact }}> // "general/typescript-react"
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
16
26
|
type GetFlattenedConfigNames<ConfigObject extends { [K in keyof ConfigObject]: Record<string, Linter.Config[]> }> = { [Group in keyof ConfigObject & string]: `${CamelToKebab<Group>}/${CamelToKebab<keyof ConfigObject[Group] & string>}` }[keyof ConfigObject & string];
|
|
17
27
|
//#endregion
|
|
18
28
|
//#region src/configs/AlexPluginConfigGroup.d.ts
|
|
@@ -49,101 +59,30 @@ interface AlexPlugin {
|
|
|
49
59
|
}
|
|
50
60
|
declare const alexPlugin: AlexPlugin;
|
|
51
61
|
//#endregion
|
|
52
|
-
//#region src/configs/
|
|
53
|
-
declare const
|
|
54
|
-
//#endregion
|
|
55
|
-
//#region src/configs/helpers/reactLanguageOptions.d.ts
|
|
56
|
-
declare const reactLanguageOptions: Linter.LanguageOptions;
|
|
62
|
+
//#region src/configs/external/prettierConfig.d.ts
|
|
63
|
+
declare const prettierConfig: Config;
|
|
57
64
|
//#endregion
|
|
58
|
-
//#region src/configs/
|
|
59
|
-
declare
|
|
65
|
+
//#region src/configs/external/typeDocConfig.d.ts
|
|
66
|
+
declare function typeDocConfig(entryPoints?: string[]): TypeDocOptions & PluginOptions;
|
|
60
67
|
//#endregion
|
|
61
|
-
//#region src/configs/
|
|
62
|
-
declare const typeScriptLanguageOptions: Linter.LanguageOptions;
|
|
63
|
-
//#endregion
|
|
64
|
-
//#region src/configs/helpers/unusedVarsIgnorePatterns.d.ts
|
|
65
|
-
declare const unusedVarsIgnorePatterns: {
|
|
66
|
-
argsIgnorePattern: string;
|
|
67
|
-
caughtErrorsIgnorePattern: string;
|
|
68
|
-
varsIgnorePattern: string;
|
|
69
|
-
};
|
|
70
|
-
//#endregion
|
|
71
|
-
//#region src/configs/helpers/vitestConfig.d.ts
|
|
68
|
+
//#region src/configs/external/vitestConfig.d.ts
|
|
72
69
|
declare function vitestConfig(environment?: VitestEnvironment): vite0.UserConfig;
|
|
73
70
|
//#endregion
|
|
74
|
-
//#region src/
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
type: string;
|
|
88
|
-
};
|
|
89
|
-
//#endregion
|
|
90
|
-
//#region src/configs/helpers/sorting/sortExports.d.ts
|
|
91
|
-
declare const sortExports: {
|
|
92
|
-
customGroups: never[];
|
|
93
|
-
fallbackSort: {
|
|
94
|
-
type: string;
|
|
95
|
-
};
|
|
96
|
-
groups: string[];
|
|
97
|
-
ignoreCase: boolean;
|
|
98
|
-
newlinesBetween: number;
|
|
99
|
-
order: string;
|
|
100
|
-
partitionByComment: boolean;
|
|
101
|
-
partitionByNewLine: boolean;
|
|
102
|
-
specialCharacters: string;
|
|
103
|
-
type: string;
|
|
104
|
-
};
|
|
105
|
-
//#endregion
|
|
106
|
-
//#region src/configs/helpers/sorting/sortImports.d.ts
|
|
107
|
-
declare const sortImports: {
|
|
108
|
-
customGroups: ({
|
|
109
|
-
elementNamePattern: string[];
|
|
110
|
-
groupName: string;
|
|
111
|
-
selector?: undefined;
|
|
112
|
-
} | {
|
|
113
|
-
elementNamePattern: string[];
|
|
114
|
-
groupName: string;
|
|
115
|
-
selector: string;
|
|
116
|
-
})[];
|
|
117
|
-
groups: string[];
|
|
118
|
-
ignoreCase: boolean;
|
|
119
|
-
internalPattern: string[];
|
|
120
|
-
newlinesBetween: number;
|
|
121
|
-
order: string;
|
|
122
|
-
partitionByComment: boolean;
|
|
123
|
-
partitionByNewLine: boolean;
|
|
124
|
-
specialCharacters: string;
|
|
125
|
-
type: string;
|
|
126
|
-
};
|
|
127
|
-
//#endregion
|
|
128
|
-
//#region src/configs/helpers/sorting/sortObjects.d.ts
|
|
129
|
-
declare const sortObjects: {
|
|
130
|
-
customGroups: never[];
|
|
131
|
-
fallbackSort: {
|
|
132
|
-
type: string;
|
|
133
|
-
};
|
|
134
|
-
groups: never[];
|
|
135
|
-
ignoreCase: boolean;
|
|
136
|
-
newlinesBetween: string;
|
|
137
|
-
order: string;
|
|
138
|
-
partitionByComment: boolean;
|
|
139
|
-
partitionByNewLine: boolean;
|
|
140
|
-
specialCharacters: string;
|
|
141
|
-
styledComponents: boolean;
|
|
142
|
-
type: string;
|
|
143
|
-
useConfigurationIf: {};
|
|
144
|
-
};
|
|
71
|
+
//#region src/utility/public/checkCallExpression.d.ts
|
|
72
|
+
/**
|
|
73
|
+
* Checks if a given node matches the expected object and property names.
|
|
74
|
+
*
|
|
75
|
+
* @category Utility
|
|
76
|
+
*
|
|
77
|
+
* @param node - The node to check.
|
|
78
|
+
* @param objectName - The object name to compare against the node.
|
|
79
|
+
* @param propertyName - The property name to compare against the node.
|
|
80
|
+
*
|
|
81
|
+
* @returns A value of `true` if the given `objectName` and `propertyName` matches those of the node, and `false` otherwise.
|
|
82
|
+
*/
|
|
83
|
+
declare function checkCallExpression(node: TSESTree.CallExpression, objectName: string, propertyName: string): boolean;
|
|
145
84
|
//#endregion
|
|
146
|
-
//#region src/
|
|
85
|
+
//#region src/utility/public/NoRestrictedImportsOptions.d.ts
|
|
147
86
|
interface RestrictedPathImportBase {
|
|
148
87
|
message: string;
|
|
149
88
|
name: string;
|
|
@@ -208,75 +147,19 @@ interface NoRestrictedImportsOptionsPathsAndPatterns {
|
|
|
208
147
|
paths: RestrictedPathImport[];
|
|
209
148
|
patterns: RestrictedPatternImport[];
|
|
210
149
|
}
|
|
211
|
-
type NoRestrictedImportsOptions = NoRestrictedImportsOptionsPathsOnly | NoRestrictedImportsOptionsPatternsOnly | NoRestrictedImportsOptionsPathsAndPatterns;
|
|
212
|
-
//#endregion
|
|
213
|
-
//#region src/rules/consistent-test-function.d.ts
|
|
214
|
-
declare const validTestFunctionsSchema: z.ZodEnum<{
|
|
215
|
-
test: "test";
|
|
216
|
-
it: "it";
|
|
217
|
-
}>;
|
|
218
|
-
type TestFunction = z.infer<typeof validTestFunctionsSchema>;
|
|
219
|
-
declare function parseTestFunction(data: unknown): TestFunction;
|
|
220
|
-
declare const consistentTestFunctionOptionsSchema: z.ZodObject<{
|
|
221
|
-
preference: z.ZodOptional<z.ZodEnum<{
|
|
222
|
-
test: "test";
|
|
223
|
-
it: "it";
|
|
224
|
-
}>>;
|
|
225
|
-
fixable: z.ZodOptional<z.ZodBoolean>;
|
|
226
|
-
}, z.core.$strip>;
|
|
227
|
-
type ConsistentTestFunctionOptions = z.infer<typeof consistentTestFunctionOptionsSchema>;
|
|
228
|
-
declare function parseConsistentTestFunctionOptions(data: unknown): ConsistentTestFunctionOptions;
|
|
229
|
-
//#endregion
|
|
230
|
-
//#region src/rules/helpers/fixOnCondition.d.ts
|
|
231
|
-
type RuleFixerFunction = (fixer: RuleFixer) => RuleFix | null;
|
|
232
|
-
declare function fixOnCondition(fixable: boolean, fix: RuleFixerFunction): RuleFixerFunction;
|
|
233
|
-
//#endregion
|
|
234
|
-
//#region src/rules/no-namespace-imports.d.ts
|
|
235
|
-
declare const noNamespaceImportsOptionsSchema: z.ZodObject<{
|
|
236
|
-
allow: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
237
|
-
}, z.core.$strip>;
|
|
238
|
-
type NoNamespaceImportsOptions = z.infer<typeof noNamespaceImportsOptionsSchema>;
|
|
239
|
-
declare function parseNoNamespaceImportsOptions(data: unknown): NoNamespaceImportsOptions;
|
|
240
|
-
//#endregion
|
|
241
|
-
//#region src/rules/no-relative-imports.d.ts
|
|
242
|
-
declare const noRelativeImportsOptionsSchema: z.ZodObject<{
|
|
243
|
-
depth: z.ZodOptional<z.ZodInt>;
|
|
244
|
-
}, z.core.$strip>;
|
|
245
|
-
type NoRelativeImportsOptions = z.infer<typeof noRelativeImportsOptionsSchema>;
|
|
246
|
-
declare function parseNoRelativeImportsOptions(data: unknown): NoRelativeImportsOptions;
|
|
247
|
-
//#endregion
|
|
248
|
-
//#region src/rules/standardise-error-messages.d.ts
|
|
249
|
-
declare const standardiseErrorMessagesOptionsSchema: z.ZodObject<{
|
|
250
|
-
regex: z.ZodOptional<z.ZodString>;
|
|
251
|
-
}, z.core.$strip>;
|
|
252
|
-
type StandardiseErrorMessagesOptions = z.infer<typeof standardiseErrorMessagesOptionsSchema>;
|
|
253
|
-
declare function parseStandardiseErrorMessagesOptions(data: unknown): StandardiseErrorMessagesOptions;
|
|
254
|
-
//#endregion
|
|
255
|
-
//#region src/rules/use-normalized-imports.d.ts
|
|
256
|
-
declare const useNormalizedImportsOptionsSchema: z.ZodObject<{
|
|
257
|
-
fixable: z.ZodOptional<z.ZodBoolean>;
|
|
258
|
-
}, z.core.$strip>;
|
|
259
|
-
type UseNormalizedImportsOptions = z.infer<typeof useNormalizedImportsOptionsSchema>;
|
|
260
|
-
declare function parseUseNormalizedImportsOptions(data: unknown): {
|
|
261
|
-
fixable?: boolean | undefined;
|
|
262
|
-
};
|
|
263
|
-
//#endregion
|
|
264
|
-
//#region src/utility/public/checkCallExpression.d.ts
|
|
265
150
|
/**
|
|
266
|
-
*
|
|
151
|
+
* Options for the built-in ESLint `no-restricted-imports` rule.
|
|
267
152
|
*
|
|
268
|
-
*
|
|
269
|
-
* @param objectName - The object name to compare against the node.
|
|
270
|
-
* @param propertyName - The property name to compare against the node.
|
|
271
|
-
*
|
|
272
|
-
* @returns A value of `true` if the given `objectName` and `propertyName` matches those of the node, and `false` otherwise.
|
|
153
|
+
* @category Rule Options
|
|
273
154
|
*/
|
|
274
|
-
|
|
155
|
+
type NoRestrictedImportsOptions = NoRestrictedImportsOptionsPathsOnly | NoRestrictedImportsOptionsPatternsOnly | NoRestrictedImportsOptionsPathsAndPatterns;
|
|
275
156
|
//#endregion
|
|
276
157
|
//#region src/utility/public/combineRestrictedImports.d.ts
|
|
277
158
|
/**
|
|
278
159
|
* Combines multiple option groups for the native ESLint `no-restricted-imports` rule, without overwriting previous configurations.
|
|
279
160
|
*
|
|
161
|
+
* @category Utility
|
|
162
|
+
*
|
|
280
163
|
* @param groups - Option groups to combine, applied in the order provided.
|
|
281
164
|
*
|
|
282
165
|
* @returns A new object combining all paths and patterns from the given groups, suitable as an option to pass to `no-restricted-imports`.
|
|
@@ -287,16 +170,34 @@ declare function combineRestrictedImports(...groups: NoRestrictedImportsOptions[
|
|
|
287
170
|
/**
|
|
288
171
|
* Converts a Zod schema to a JSON schema for usage in an ESLint rule.
|
|
289
172
|
*
|
|
173
|
+
* @category Utility
|
|
174
|
+
*
|
|
290
175
|
* @param schema - The Zod schema to convert.
|
|
291
176
|
*
|
|
292
177
|
* @returns An array containing the resulting JSON Schema, formatted for ESLint rule schema compatibility.
|
|
293
178
|
*/
|
|
294
179
|
declare function createRuleSchemaFromZodSchema(schema: z.ZodType): JSONSchema4[];
|
|
295
180
|
//#endregion
|
|
181
|
+
//#region src/utility/public/fixOnCondition.d.ts
|
|
182
|
+
type RuleFixerFunction = (fixer: RuleFixer) => RuleFix | null;
|
|
183
|
+
/**
|
|
184
|
+
* Returns a rule fixer function to run based on a given condition
|
|
185
|
+
*
|
|
186
|
+
* @category Utility
|
|
187
|
+
*
|
|
188
|
+
* @param fixable - Whether the rule should be treated as fixable or not, and therefore whether the fixer should run.
|
|
189
|
+
* @param fix - The rule fixer function to run.
|
|
190
|
+
*
|
|
191
|
+
* @returns The rule fixer function invoked with the fixer, provided the fixable condition is met.
|
|
192
|
+
*/
|
|
193
|
+
declare function fixOnCondition(fixable: boolean, fix: RuleFixerFunction): RuleFixerFunction;
|
|
194
|
+
//#endregion
|
|
296
195
|
//#region src/utility/public/flattenConfigs.d.ts
|
|
297
196
|
/**
|
|
298
197
|
* Takes in a nested group of configs, and returns them flattened according to ESLint config naming conventions.
|
|
299
198
|
*
|
|
199
|
+
* @category Utility
|
|
200
|
+
*
|
|
300
201
|
* @template ConfigObject - The type of the input config object.
|
|
301
202
|
*
|
|
302
203
|
* @param config - A doubly-nested config object to pass in, where the key of the top-level object is the config group name, and the key of the nested object is the name of the config within the group (e.g. `groupName.configName`).
|
|
@@ -337,6 +238,8 @@ declare function flattenConfigs<ConfigObject extends { [K in keyof ConfigObject]
|
|
|
337
238
|
*
|
|
338
239
|
* Useful for auto-fixable rules that remove a specific import from an import statement.
|
|
339
240
|
*
|
|
241
|
+
* @category Utility
|
|
242
|
+
*
|
|
340
243
|
* @template RuleOptions - The type of the RuleOptions from the given context.
|
|
341
244
|
*
|
|
342
245
|
* @param context - The current ESLint rule context.
|
|
@@ -347,4 +250,4 @@ declare function flattenConfigs<ConfigObject extends { [K in keyof ConfigObject]
|
|
|
347
250
|
*/
|
|
348
251
|
declare function getImportSpecifiersAfterRemoving<RuleOptions>(context: Readonly<RuleContext<"message", [RuleOptions]>>, specifiers: TSESTree.ImportClause[], importToRemove: string): string;
|
|
349
252
|
//#endregion
|
|
350
|
-
export { AlexConfigGroupName, AlexFlattenedConfigName, type AlexPlugin, AlexPluginConfigFlattened, AlexPluginConfigObject, CombinedConfig,
|
|
253
|
+
export { AlexConfigGroupName, AlexFlattenedConfigName, type AlexPlugin, AlexPluginConfigFlattened, AlexPluginConfigObject, CombinedConfig, GeneralConfig, type GetFlattenedConfigNames, type NoRestrictedImportsOptions, PersonalConfig, PluginConfig, checkCallExpression, combineRestrictedImports, createRuleSchemaFromZodSchema, alexPlugin as default, fixOnCondition, flattenConfigs, getImportSpecifiersAfterRemoving, prettierConfig, typeDocConfig, vitestConfig };
|
package/dist/index.js
CHANGED
|
@@ -7,9 +7,9 @@ import importPlugin from "eslint-plugin-import";
|
|
|
7
7
|
import nodePlugin from "eslint-plugin-n";
|
|
8
8
|
import perfectionist from "eslint-plugin-perfectionist";
|
|
9
9
|
import prettierPlugin from "eslint-plugin-prettier";
|
|
10
|
-
import tseslint from "typescript-eslint";
|
|
11
10
|
import tsconfigPaths from "vite-tsconfig-paths";
|
|
12
11
|
import { defineConfig } from "vitest/config";
|
|
12
|
+
import tseslint from "typescript-eslint";
|
|
13
13
|
import jsxA11y from "eslint-plugin-jsx-a11y";
|
|
14
14
|
import reactPlugin from "eslint-plugin-react";
|
|
15
15
|
import reactRefresh from "eslint-plugin-react-refresh";
|
|
@@ -3412,6 +3412,8 @@ var generalRestrictedImports_default = generalRestrictedImports;
|
|
|
3412
3412
|
/**
|
|
3413
3413
|
* Checks if a given node matches the expected object and property names.
|
|
3414
3414
|
*
|
|
3415
|
+
* @category Utility
|
|
3416
|
+
*
|
|
3415
3417
|
* @param node - The node to check.
|
|
3416
3418
|
* @param objectName - The object name to compare against the node.
|
|
3417
3419
|
* @param propertyName - The property name to compare against the node.
|
|
@@ -3428,6 +3430,8 @@ var checkCallExpression_default = checkCallExpression;
|
|
|
3428
3430
|
/**
|
|
3429
3431
|
* Combines multiple option groups for the native ESLint `no-restricted-imports` rule, without overwriting previous configurations.
|
|
3430
3432
|
*
|
|
3433
|
+
* @category Utility
|
|
3434
|
+
*
|
|
3431
3435
|
* @param groups - Option groups to combine, applied in the order provided.
|
|
3432
3436
|
*
|
|
3433
3437
|
* @returns A new object combining all paths and patterns from the given groups, suitable as an option to pass to `no-restricted-imports`.
|
|
@@ -3454,6 +3458,8 @@ var combineRestrictedImports_default = combineRestrictedImports;
|
|
|
3454
3458
|
/**
|
|
3455
3459
|
* Converts a Zod schema to a JSON schema for usage in an ESLint rule.
|
|
3456
3460
|
*
|
|
3461
|
+
* @category Utility
|
|
3462
|
+
*
|
|
3457
3463
|
* @param schema - The Zod schema to convert.
|
|
3458
3464
|
*
|
|
3459
3465
|
* @returns An array containing the resulting JSON Schema, formatted for ESLint rule schema compatibility.
|
|
@@ -3463,6 +3469,26 @@ function createRuleSchemaFromZodSchema(schema$1) {
|
|
|
3463
3469
|
}
|
|
3464
3470
|
var createRuleSchemaFromZodSchema_default = createRuleSchemaFromZodSchema;
|
|
3465
3471
|
|
|
3472
|
+
//#endregion
|
|
3473
|
+
//#region src/utility/public/fixOnCondition.ts
|
|
3474
|
+
/**
|
|
3475
|
+
* Returns a rule fixer function to run based on a given condition
|
|
3476
|
+
*
|
|
3477
|
+
* @category Utility
|
|
3478
|
+
*
|
|
3479
|
+
* @param fixable - Whether the rule should be treated as fixable or not, and therefore whether the fixer should run.
|
|
3480
|
+
* @param fix - The rule fixer function to run.
|
|
3481
|
+
*
|
|
3482
|
+
* @returns The rule fixer function invoked with the fixer, provided the fixable condition is met.
|
|
3483
|
+
*/
|
|
3484
|
+
function fixOnCondition(fixable, fix) {
|
|
3485
|
+
return (fixer) => {
|
|
3486
|
+
if (!fixable) return null;
|
|
3487
|
+
return fix(fixer);
|
|
3488
|
+
};
|
|
3489
|
+
}
|
|
3490
|
+
var fixOnCondition_default = fixOnCondition;
|
|
3491
|
+
|
|
3466
3492
|
//#endregion
|
|
3467
3493
|
//#region src/utility/private/camelToKebab.ts
|
|
3468
3494
|
function camelToKebab$1(string) {
|
|
@@ -3485,6 +3511,8 @@ var createConfigGroup_default = createConfigGroup;
|
|
|
3485
3511
|
/**
|
|
3486
3512
|
* Takes in a nested group of configs, and returns them flattened according to ESLint config naming conventions.
|
|
3487
3513
|
*
|
|
3514
|
+
* @category Utility
|
|
3515
|
+
*
|
|
3488
3516
|
* @template ConfigObject - The type of the input config object.
|
|
3489
3517
|
*
|
|
3490
3518
|
* @param config - A doubly-nested config object to pass in, where the key of the top-level object is the config group name, and the key of the nested object is the name of the config within the group (e.g. `groupName.configName`).
|
|
@@ -3531,6 +3559,8 @@ var flattenConfigs_default = flattenConfigs;
|
|
|
3531
3559
|
*
|
|
3532
3560
|
* Useful for auto-fixable rules that remove a specific import from an import statement.
|
|
3533
3561
|
*
|
|
3562
|
+
* @category Utility
|
|
3563
|
+
*
|
|
3534
3564
|
* @template RuleOptions - The type of the RuleOptions from the given context.
|
|
3535
3565
|
*
|
|
3536
3566
|
* @param context - The current ESLint rule context.
|
|
@@ -3707,9 +3737,49 @@ const generalJavaScript = [
|
|
|
3707
3737
|
var javaScript_default$1 = generalJavaScript;
|
|
3708
3738
|
|
|
3709
3739
|
//#endregion
|
|
3710
|
-
//#region src/configs/
|
|
3711
|
-
const
|
|
3712
|
-
var
|
|
3740
|
+
//#region src/configs/external/prettierConfig.ts
|
|
3741
|
+
const prettierConfig$1 = { printWidth: 100 };
|
|
3742
|
+
var prettierConfig_default = prettierConfig$1;
|
|
3743
|
+
|
|
3744
|
+
//#endregion
|
|
3745
|
+
//#region src/configs/external/typeDocConfig.ts
|
|
3746
|
+
function typeDocConfig(entryPoints = ["./src/index.ts"]) {
|
|
3747
|
+
return {
|
|
3748
|
+
disableSources: true,
|
|
3749
|
+
entryPoints,
|
|
3750
|
+
excludeNotDocumented: true,
|
|
3751
|
+
includeVersion: true,
|
|
3752
|
+
outputs: [{
|
|
3753
|
+
name: "html",
|
|
3754
|
+
options: { navigation: {
|
|
3755
|
+
excludeReferences: false,
|
|
3756
|
+
includeCategories: true,
|
|
3757
|
+
includeFolders: true,
|
|
3758
|
+
includeGroups: true
|
|
3759
|
+
} },
|
|
3760
|
+
path: "docs/features/html"
|
|
3761
|
+
}, {
|
|
3762
|
+
name: "markdown",
|
|
3763
|
+
path: "docs/features/markdown"
|
|
3764
|
+
}],
|
|
3765
|
+
plugin: ["typedoc-plugin-markdown", "typedoc-rhineai-theme"]
|
|
3766
|
+
};
|
|
3767
|
+
}
|
|
3768
|
+
var typeDocConfig_default = typeDocConfig;
|
|
3769
|
+
|
|
3770
|
+
//#endregion
|
|
3771
|
+
//#region src/configs/external/vitestConfig.ts
|
|
3772
|
+
function vitestConfig(environment = "jsdom") {
|
|
3773
|
+
return defineConfig({
|
|
3774
|
+
plugins: [tsconfigPaths()],
|
|
3775
|
+
test: {
|
|
3776
|
+
environment,
|
|
3777
|
+
globals: true,
|
|
3778
|
+
include: ["**/tests/**/*.test.ts"]
|
|
3779
|
+
}
|
|
3780
|
+
});
|
|
3781
|
+
}
|
|
3782
|
+
var vitestConfig_default = vitestConfig;
|
|
3713
3783
|
|
|
3714
3784
|
//#endregion
|
|
3715
3785
|
//#region src/configs/helpers/reactLanguageOptions.ts
|
|
@@ -3720,30 +3790,6 @@ const reactLanguageOptions = {
|
|
|
3720
3790
|
};
|
|
3721
3791
|
var reactLanguageOptions_default = reactLanguageOptions;
|
|
3722
3792
|
|
|
3723
|
-
//#endregion
|
|
3724
|
-
//#region src/configs/helpers/typeDocConfig.ts
|
|
3725
|
-
const typeDocConfig = {
|
|
3726
|
-
disableSources: true,
|
|
3727
|
-
entryPoints: ["./src/index.ts"],
|
|
3728
|
-
excludeNotDocumented: true,
|
|
3729
|
-
includeVersion: true,
|
|
3730
|
-
outputs: [{
|
|
3731
|
-
name: "html",
|
|
3732
|
-
options: { navigation: {
|
|
3733
|
-
excludeReferences: false,
|
|
3734
|
-
includeCategories: true,
|
|
3735
|
-
includeFolders: true,
|
|
3736
|
-
includeGroups: true
|
|
3737
|
-
} },
|
|
3738
|
-
path: "docs/features/html"
|
|
3739
|
-
}, {
|
|
3740
|
-
name: "markdown",
|
|
3741
|
-
path: "docs/features/markdown"
|
|
3742
|
-
}],
|
|
3743
|
-
plugin: ["typedoc-plugin-markdown", "typedoc-rhineai-theme"]
|
|
3744
|
-
};
|
|
3745
|
-
var typeDocConfig_default = typeDocConfig;
|
|
3746
|
-
|
|
3747
3793
|
//#endregion
|
|
3748
3794
|
//#region src/configs/helpers/typeScriptLanguageOptions.ts
|
|
3749
3795
|
const typeScriptLanguageOptions = {
|
|
@@ -3757,20 +3803,6 @@ const typeScriptLanguageOptions = {
|
|
|
3757
3803
|
};
|
|
3758
3804
|
var typeScriptLanguageOptions_default = typeScriptLanguageOptions;
|
|
3759
3805
|
|
|
3760
|
-
//#endregion
|
|
3761
|
-
//#region src/configs/helpers/vitestConfig.ts
|
|
3762
|
-
function vitestConfig(environment = "jsdom") {
|
|
3763
|
-
return defineConfig({
|
|
3764
|
-
plugins: [tsconfigPaths()],
|
|
3765
|
-
test: {
|
|
3766
|
-
environment,
|
|
3767
|
-
globals: true,
|
|
3768
|
-
include: ["**/tests/**/*.test.ts"]
|
|
3769
|
-
}
|
|
3770
|
-
});
|
|
3771
|
-
}
|
|
3772
|
-
var vitestConfig_default = vitestConfig;
|
|
3773
|
-
|
|
3774
3806
|
//#endregion
|
|
3775
3807
|
//#region src/configs/helpers/sorting/sortClasses.ts
|
|
3776
3808
|
const sortClasses = {
|
|
@@ -3913,7 +3945,7 @@ function personalJavaScript(plugin) {
|
|
|
3913
3945
|
"prefer-arrow-callback": ["error", { allowNamedFunctions: false }],
|
|
3914
3946
|
"prefer-destructuring": "error",
|
|
3915
3947
|
"prefer-template": "error",
|
|
3916
|
-
"prettier/prettier": ["warn",
|
|
3948
|
+
"prettier/prettier": ["warn", prettierConfig_default],
|
|
3917
3949
|
"sort-vars": "error"
|
|
3918
3950
|
}
|
|
3919
3951
|
}, {
|
|
@@ -4375,22 +4407,9 @@ const createRule = ESLintUtils.RuleCreator((ruleName) => {
|
|
|
4375
4407
|
});
|
|
4376
4408
|
var createRule_default = createRule;
|
|
4377
4409
|
|
|
4378
|
-
//#endregion
|
|
4379
|
-
//#region src/rules/helpers/fixOnCondition.ts
|
|
4380
|
-
function fixOnCondition(fixable, fix) {
|
|
4381
|
-
return (fixer) => {
|
|
4382
|
-
if (!fixable) return null;
|
|
4383
|
-
return fix(fixer);
|
|
4384
|
-
};
|
|
4385
|
-
}
|
|
4386
|
-
var fixOnCondition_default = fixOnCondition;
|
|
4387
|
-
|
|
4388
4410
|
//#endregion
|
|
4389
4411
|
//#region src/rules/consistent-test-function.ts
|
|
4390
4412
|
const validTestFunctionsSchema = z.enum(["test", "it"]);
|
|
4391
|
-
function parseTestFunction(data) {
|
|
4392
|
-
return validTestFunctionsSchema.parse(data);
|
|
4393
|
-
}
|
|
4394
4413
|
const consistentTestFunctionOptionsSchema = z.object({
|
|
4395
4414
|
preference: validTestFunctionsSchema,
|
|
4396
4415
|
fixable: z.boolean()
|
|
@@ -4786,7 +4805,7 @@ var rules_default = {
|
|
|
4786
4805
|
//#endregion
|
|
4787
4806
|
//#region package.json
|
|
4788
4807
|
var name = "@alextheman/eslint-plugin";
|
|
4789
|
-
var version = "5.
|
|
4808
|
+
var version = "5.4.0";
|
|
4790
4809
|
|
|
4791
4810
|
//#endregion
|
|
4792
4811
|
//#region src/alexPlugin.ts
|
|
@@ -4807,4 +4826,4 @@ var alexPlugin_default = alexPlugin;
|
|
|
4807
4826
|
var src_default = alexPlugin_default;
|
|
4808
4827
|
|
|
4809
4828
|
//#endregion
|
|
4810
|
-
export { checkCallExpression_default as checkCallExpression, combineRestrictedImports_default as combineRestrictedImports, createRuleSchemaFromZodSchema_default as createRuleSchemaFromZodSchema, src_default as default, fixOnCondition_default as fixOnCondition, flattenConfigs_default as flattenConfigs, getImportSpecifiersAfterRemoving_default as getImportSpecifiersAfterRemoving,
|
|
4829
|
+
export { checkCallExpression_default as checkCallExpression, combineRestrictedImports_default as combineRestrictedImports, createRuleSchemaFromZodSchema_default as createRuleSchemaFromZodSchema, src_default as default, fixOnCondition_default as fixOnCondition, flattenConfigs_default as flattenConfigs, getImportSpecifiersAfterRemoving_default as getImportSpecifiersAfterRemoving, prettierConfig_default as prettierConfig, typeDocConfig_default as typeDocConfig, vitestConfig_default as vitestConfig };
|