@alextheman/eslint-plugin 4.7.0 → 4.8.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 +26 -2
- package/dist/index.d.cts +11 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +26 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -61,7 +61,7 @@ eslint_plugin_jsdoc = __toESM(eslint_plugin_jsdoc);
|
|
|
61
61
|
|
|
62
62
|
//#region package.json
|
|
63
63
|
var name = "@alextheman/eslint-plugin";
|
|
64
|
-
var version = "4.
|
|
64
|
+
var version = "4.8.0";
|
|
65
65
|
|
|
66
66
|
//#endregion
|
|
67
67
|
//#region node_modules/.pnpm/globals@16.5.0/node_modules/globals/globals.json
|
|
@@ -3430,9 +3430,11 @@ var generalRestrictedImports_default = generalRestrictedImports;
|
|
|
3430
3430
|
//#region src/utility/public/checkCallExpression.ts
|
|
3431
3431
|
/**
|
|
3432
3432
|
* Checks if a given node matches the expected object and property names.
|
|
3433
|
+
*
|
|
3433
3434
|
* @param node - The node to check.
|
|
3434
3435
|
* @param objectName - The object name to compare against the node.
|
|
3435
3436
|
* @param propertyName - The property name to compare against the node.
|
|
3437
|
+
*
|
|
3436
3438
|
* @returns A value of `true` if the given `objectName` and `propertyName` matches those of the node, and `false` otherwise.
|
|
3437
3439
|
*/
|
|
3438
3440
|
function checkCallExpression(node, objectName, propertyName) {
|
|
@@ -3444,7 +3446,9 @@ var checkCallExpression_default = checkCallExpression;
|
|
|
3444
3446
|
//#region src/utility/public/combineRestrictedImports.ts
|
|
3445
3447
|
/**
|
|
3446
3448
|
* Combines multiple option groups for the native ESLint `no-restricted-imports` rule, without overwriting previous configurations.
|
|
3449
|
+
*
|
|
3447
3450
|
* @param groups - Option groups to combine, applied in the order provided.
|
|
3451
|
+
*
|
|
3448
3452
|
* @returns A new object combining all paths and patterns from the given groups, suitable as an option to pass to `no-restricted-imports`.
|
|
3449
3453
|
*/
|
|
3450
3454
|
function combineRestrictedImports(...groups) {
|
|
@@ -3468,7 +3472,9 @@ var combineRestrictedImports_default = combineRestrictedImports;
|
|
|
3468
3472
|
//#region src/utility/public/createRuleSchemaFromZodSchema.ts
|
|
3469
3473
|
/**
|
|
3470
3474
|
* Converts a Zod schema to a JSON schema for usage in an ESLint rule.
|
|
3475
|
+
*
|
|
3471
3476
|
* @param schema - The Zod schema to convert.
|
|
3477
|
+
*
|
|
3472
3478
|
* @returns An array containing the resulting JSON Schema, formatted for ESLint rule schema compatibility.
|
|
3473
3479
|
*/
|
|
3474
3480
|
function createRuleSchemaFromZodSchema(schema$1) {
|
|
@@ -3480,10 +3486,15 @@ var createRuleSchemaFromZodSchema_default = createRuleSchemaFromZodSchema;
|
|
|
3480
3486
|
//#region src/utility/public/getImportSpecifiersAfterRemoving.ts
|
|
3481
3487
|
/**
|
|
3482
3488
|
* Returns a comma-separated string of import specifiers, excluding the specified import.
|
|
3489
|
+
*
|
|
3483
3490
|
* Useful for auto-fixable rules that remove a specific import from an import statement.
|
|
3491
|
+
*
|
|
3492
|
+
* @template RuleOptions - The type of the RuleOptions from the given context.
|
|
3493
|
+
*
|
|
3484
3494
|
* @param context - The current ESLint rule context.
|
|
3485
3495
|
* @param specifiers - Array of import clause nodes.
|
|
3486
3496
|
* @param importToRemove - The import name to remove from the list.
|
|
3497
|
+
*
|
|
3487
3498
|
* @returns A comma-separated string of import specifiers after removing the specified import.
|
|
3488
3499
|
*/
|
|
3489
3500
|
function getImportSpecifiersAfterRemoving(context, specifiers, importToRemove) {
|
|
@@ -3946,7 +3957,20 @@ var requireJsdocOptions_default = requireJsdocOptions;
|
|
|
3946
3957
|
|
|
3947
3958
|
//#endregion
|
|
3948
3959
|
//#region src/configs/personal/typeScriptPackage.ts
|
|
3949
|
-
const personalTypeScriptPackage = [eslint_plugin_jsdoc.default.configs["flat/recommended-typescript-error"], { rules: {
|
|
3960
|
+
const personalTypeScriptPackage = [eslint_plugin_jsdoc.default.configs["flat/recommended-typescript-error"], { rules: {
|
|
3961
|
+
"jsdoc/require-jsdoc": ["warn", requireJsdocOptions_default],
|
|
3962
|
+
"jsdoc/sort-tags": ["error", { tagSequence: [
|
|
3963
|
+
{ tags: ["template"] },
|
|
3964
|
+
{ tags: ["param"] },
|
|
3965
|
+
{ tags: ["throws"] },
|
|
3966
|
+
{ tags: ["returns"] }
|
|
3967
|
+
] }],
|
|
3968
|
+
"jsdoc/tag-lines": [
|
|
3969
|
+
"error",
|
|
3970
|
+
"any",
|
|
3971
|
+
{ startLines: 1 }
|
|
3972
|
+
]
|
|
3973
|
+
} }];
|
|
3950
3974
|
var typeScriptPackage_default$1 = personalTypeScriptPackage;
|
|
3951
3975
|
|
|
3952
3976
|
//#endregion
|
package/dist/index.d.cts
CHANGED
|
@@ -234,9 +234,11 @@ declare function parseUseNormalizedImportsOptions(data: unknown): {
|
|
|
234
234
|
//#region src/utility/public/checkCallExpression.d.ts
|
|
235
235
|
/**
|
|
236
236
|
* Checks if a given node matches the expected object and property names.
|
|
237
|
+
*
|
|
237
238
|
* @param node - The node to check.
|
|
238
239
|
* @param objectName - The object name to compare against the node.
|
|
239
240
|
* @param propertyName - The property name to compare against the node.
|
|
241
|
+
*
|
|
240
242
|
* @returns A value of `true` if the given `objectName` and `propertyName` matches those of the node, and `false` otherwise.
|
|
241
243
|
*/
|
|
242
244
|
declare function checkCallExpression(node: TSESTree.CallExpression, objectName: string, propertyName: string): boolean;
|
|
@@ -244,7 +246,9 @@ declare function checkCallExpression(node: TSESTree.CallExpression, objectName:
|
|
|
244
246
|
//#region src/utility/public/combineRestrictedImports.d.ts
|
|
245
247
|
/**
|
|
246
248
|
* Combines multiple option groups for the native ESLint `no-restricted-imports` rule, without overwriting previous configurations.
|
|
249
|
+
*
|
|
247
250
|
* @param groups - Option groups to combine, applied in the order provided.
|
|
251
|
+
*
|
|
248
252
|
* @returns A new object combining all paths and patterns from the given groups, suitable as an option to pass to `no-restricted-imports`.
|
|
249
253
|
*/
|
|
250
254
|
declare function combineRestrictedImports(...groups: NoRestrictedImportsOptions[]): NoRestrictedImportsOptions;
|
|
@@ -252,7 +256,9 @@ declare function combineRestrictedImports(...groups: NoRestrictedImportsOptions[
|
|
|
252
256
|
//#region src/utility/public/createRuleSchemaFromZodSchema.d.ts
|
|
253
257
|
/**
|
|
254
258
|
* Converts a Zod schema to a JSON schema for usage in an ESLint rule.
|
|
259
|
+
*
|
|
255
260
|
* @param schema - The Zod schema to convert.
|
|
261
|
+
*
|
|
256
262
|
* @returns An array containing the resulting JSON Schema, formatted for ESLint rule schema compatibility.
|
|
257
263
|
*/
|
|
258
264
|
declare function createRuleSchemaFromZodSchema(schema: z.ZodType): JSONSchema4[];
|
|
@@ -260,10 +266,15 @@ declare function createRuleSchemaFromZodSchema(schema: z.ZodType): JSONSchema4[]
|
|
|
260
266
|
//#region src/utility/public/getImportSpecifiersAfterRemoving.d.ts
|
|
261
267
|
/**
|
|
262
268
|
* Returns a comma-separated string of import specifiers, excluding the specified import.
|
|
269
|
+
*
|
|
263
270
|
* Useful for auto-fixable rules that remove a specific import from an import statement.
|
|
271
|
+
*
|
|
272
|
+
* @template RuleOptions - The type of the RuleOptions from the given context.
|
|
273
|
+
*
|
|
264
274
|
* @param context - The current ESLint rule context.
|
|
265
275
|
* @param specifiers - Array of import clause nodes.
|
|
266
276
|
* @param importToRemove - The import name to remove from the list.
|
|
277
|
+
*
|
|
267
278
|
* @returns A comma-separated string of import specifiers after removing the specified import.
|
|
268
279
|
*/
|
|
269
280
|
declare function getImportSpecifiersAfterRemoving<RuleOptions>(context: Readonly<RuleContext<"message", [RuleOptions]>>, specifiers: TSESTree.ImportClause[], importToRemove: string): string;
|
package/dist/index.d.ts
CHANGED
|
@@ -234,9 +234,11 @@ declare function parseUseNormalizedImportsOptions(data: unknown): {
|
|
|
234
234
|
//#region src/utility/public/checkCallExpression.d.ts
|
|
235
235
|
/**
|
|
236
236
|
* Checks if a given node matches the expected object and property names.
|
|
237
|
+
*
|
|
237
238
|
* @param node - The node to check.
|
|
238
239
|
* @param objectName - The object name to compare against the node.
|
|
239
240
|
* @param propertyName - The property name to compare against the node.
|
|
241
|
+
*
|
|
240
242
|
* @returns A value of `true` if the given `objectName` and `propertyName` matches those of the node, and `false` otherwise.
|
|
241
243
|
*/
|
|
242
244
|
declare function checkCallExpression(node: TSESTree.CallExpression, objectName: string, propertyName: string): boolean;
|
|
@@ -244,7 +246,9 @@ declare function checkCallExpression(node: TSESTree.CallExpression, objectName:
|
|
|
244
246
|
//#region src/utility/public/combineRestrictedImports.d.ts
|
|
245
247
|
/**
|
|
246
248
|
* Combines multiple option groups for the native ESLint `no-restricted-imports` rule, without overwriting previous configurations.
|
|
249
|
+
*
|
|
247
250
|
* @param groups - Option groups to combine, applied in the order provided.
|
|
251
|
+
*
|
|
248
252
|
* @returns A new object combining all paths and patterns from the given groups, suitable as an option to pass to `no-restricted-imports`.
|
|
249
253
|
*/
|
|
250
254
|
declare function combineRestrictedImports(...groups: NoRestrictedImportsOptions[]): NoRestrictedImportsOptions;
|
|
@@ -252,7 +256,9 @@ declare function combineRestrictedImports(...groups: NoRestrictedImportsOptions[
|
|
|
252
256
|
//#region src/utility/public/createRuleSchemaFromZodSchema.d.ts
|
|
253
257
|
/**
|
|
254
258
|
* Converts a Zod schema to a JSON schema for usage in an ESLint rule.
|
|
259
|
+
*
|
|
255
260
|
* @param schema - The Zod schema to convert.
|
|
261
|
+
*
|
|
256
262
|
* @returns An array containing the resulting JSON Schema, formatted for ESLint rule schema compatibility.
|
|
257
263
|
*/
|
|
258
264
|
declare function createRuleSchemaFromZodSchema(schema: z.ZodType): JSONSchema4[];
|
|
@@ -260,10 +266,15 @@ declare function createRuleSchemaFromZodSchema(schema: z.ZodType): JSONSchema4[]
|
|
|
260
266
|
//#region src/utility/public/getImportSpecifiersAfterRemoving.d.ts
|
|
261
267
|
/**
|
|
262
268
|
* Returns a comma-separated string of import specifiers, excluding the specified import.
|
|
269
|
+
*
|
|
263
270
|
* Useful for auto-fixable rules that remove a specific import from an import statement.
|
|
271
|
+
*
|
|
272
|
+
* @template RuleOptions - The type of the RuleOptions from the given context.
|
|
273
|
+
*
|
|
264
274
|
* @param context - The current ESLint rule context.
|
|
265
275
|
* @param specifiers - Array of import clause nodes.
|
|
266
276
|
* @param importToRemove - The import name to remove from the list.
|
|
277
|
+
*
|
|
267
278
|
* @returns A comma-separated string of import specifiers after removing the specified import.
|
|
268
279
|
*/
|
|
269
280
|
declare function getImportSpecifiersAfterRemoving<RuleOptions>(context: Readonly<RuleContext<"message", [RuleOptions]>>, specifiers: TSESTree.ImportClause[], importToRemove: string): string;
|
package/dist/index.js
CHANGED
|
@@ -46,7 +46,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
46
46
|
//#endregion
|
|
47
47
|
//#region package.json
|
|
48
48
|
var name = "@alextheman/eslint-plugin";
|
|
49
|
-
var version = "4.
|
|
49
|
+
var version = "4.8.0";
|
|
50
50
|
|
|
51
51
|
//#endregion
|
|
52
52
|
//#region node_modules/.pnpm/globals@16.5.0/node_modules/globals/globals.json
|
|
@@ -3415,9 +3415,11 @@ var generalRestrictedImports_default = generalRestrictedImports;
|
|
|
3415
3415
|
//#region src/utility/public/checkCallExpression.ts
|
|
3416
3416
|
/**
|
|
3417
3417
|
* Checks if a given node matches the expected object and property names.
|
|
3418
|
+
*
|
|
3418
3419
|
* @param node - The node to check.
|
|
3419
3420
|
* @param objectName - The object name to compare against the node.
|
|
3420
3421
|
* @param propertyName - The property name to compare against the node.
|
|
3422
|
+
*
|
|
3421
3423
|
* @returns A value of `true` if the given `objectName` and `propertyName` matches those of the node, and `false` otherwise.
|
|
3422
3424
|
*/
|
|
3423
3425
|
function checkCallExpression(node, objectName, propertyName) {
|
|
@@ -3429,7 +3431,9 @@ var checkCallExpression_default = checkCallExpression;
|
|
|
3429
3431
|
//#region src/utility/public/combineRestrictedImports.ts
|
|
3430
3432
|
/**
|
|
3431
3433
|
* Combines multiple option groups for the native ESLint `no-restricted-imports` rule, without overwriting previous configurations.
|
|
3434
|
+
*
|
|
3432
3435
|
* @param groups - Option groups to combine, applied in the order provided.
|
|
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`.
|
|
3434
3438
|
*/
|
|
3435
3439
|
function combineRestrictedImports(...groups) {
|
|
@@ -3453,7 +3457,9 @@ var combineRestrictedImports_default = combineRestrictedImports;
|
|
|
3453
3457
|
//#region src/utility/public/createRuleSchemaFromZodSchema.ts
|
|
3454
3458
|
/**
|
|
3455
3459
|
* Converts a Zod schema to a JSON schema for usage in an ESLint rule.
|
|
3460
|
+
*
|
|
3456
3461
|
* @param schema - The Zod schema to convert.
|
|
3462
|
+
*
|
|
3457
3463
|
* @returns An array containing the resulting JSON Schema, formatted for ESLint rule schema compatibility.
|
|
3458
3464
|
*/
|
|
3459
3465
|
function createRuleSchemaFromZodSchema(schema$1) {
|
|
@@ -3465,10 +3471,15 @@ var createRuleSchemaFromZodSchema_default = createRuleSchemaFromZodSchema;
|
|
|
3465
3471
|
//#region src/utility/public/getImportSpecifiersAfterRemoving.ts
|
|
3466
3472
|
/**
|
|
3467
3473
|
* Returns a comma-separated string of import specifiers, excluding the specified import.
|
|
3474
|
+
*
|
|
3468
3475
|
* Useful for auto-fixable rules that remove a specific import from an import statement.
|
|
3476
|
+
*
|
|
3477
|
+
* @template RuleOptions - The type of the RuleOptions from the given context.
|
|
3478
|
+
*
|
|
3469
3479
|
* @param context - The current ESLint rule context.
|
|
3470
3480
|
* @param specifiers - Array of import clause nodes.
|
|
3471
3481
|
* @param importToRemove - The import name to remove from the list.
|
|
3482
|
+
*
|
|
3472
3483
|
* @returns A comma-separated string of import specifiers after removing the specified import.
|
|
3473
3484
|
*/
|
|
3474
3485
|
function getImportSpecifiersAfterRemoving(context, specifiers, importToRemove) {
|
|
@@ -3931,7 +3942,20 @@ var requireJsdocOptions_default = requireJsdocOptions;
|
|
|
3931
3942
|
|
|
3932
3943
|
//#endregion
|
|
3933
3944
|
//#region src/configs/personal/typeScriptPackage.ts
|
|
3934
|
-
const personalTypeScriptPackage = [jsdoc.configs["flat/recommended-typescript-error"], { rules: {
|
|
3945
|
+
const personalTypeScriptPackage = [jsdoc.configs["flat/recommended-typescript-error"], { rules: {
|
|
3946
|
+
"jsdoc/require-jsdoc": ["warn", requireJsdocOptions_default],
|
|
3947
|
+
"jsdoc/sort-tags": ["error", { tagSequence: [
|
|
3948
|
+
{ tags: ["template"] },
|
|
3949
|
+
{ tags: ["param"] },
|
|
3950
|
+
{ tags: ["throws"] },
|
|
3951
|
+
{ tags: ["returns"] }
|
|
3952
|
+
] }],
|
|
3953
|
+
"jsdoc/tag-lines": [
|
|
3954
|
+
"error",
|
|
3955
|
+
"any",
|
|
3956
|
+
{ startLines: 1 }
|
|
3957
|
+
]
|
|
3958
|
+
} }];
|
|
3935
3959
|
var typeScriptPackage_default$1 = personalTypeScriptPackage;
|
|
3936
3960
|
|
|
3937
3961
|
//#endregion
|