@sarj/eslint-plugin 9.11.0 → 9.13.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/README.md +8 -0
- package/dist/index.cjs +617 -345
- package/dist/index.d.cts +16 -2
- package/dist/index.d.ts +16 -2
- package/dist/index.js +612 -340
- package/package.json +10 -2
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -224,6 +224,12 @@ declare const rules: {
|
|
|
224
224
|
"prefer-input-group-search": _typescript_eslint_utils_ts_eslint.RuleModule<"preferInputGroup", readonly [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
225
225
|
name: string;
|
|
226
226
|
};
|
|
227
|
+
"prefer-immutable-module-constant": _typescript_eslint_utils_ts_eslint.RuleModule<"preferAsConst" | "preferReadonlyCollection", readonly [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
228
|
+
name: string;
|
|
229
|
+
};
|
|
230
|
+
"prefer-shadcn-primitives": _typescript_eslint_utils_ts_eslint.RuleModule<"preferShadcnPrimitive", readonly [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
231
|
+
name: string;
|
|
232
|
+
};
|
|
227
233
|
"prefer-module-level-constant": _typescript_eslint_utils_ts_eslint.RuleModule<"hoistCollection" | "hoistRegex", readonly [{
|
|
228
234
|
minElements?: number;
|
|
229
235
|
checkRegex?: boolean;
|
|
@@ -302,7 +308,7 @@ declare const rules: {
|
|
|
302
308
|
};
|
|
303
309
|
};
|
|
304
310
|
/** Rules registered for application-profile configs but intentionally absent from general presets. */
|
|
305
|
-
declare const applicationOnlyRules: readonly ["no-restricted-library-load", "prefer-native-random-uuid"];
|
|
311
|
+
declare const applicationOnlyRules: readonly ["no-restricted-library-load", "prefer-native-random-uuid", "prefer-shadcn-primitives"];
|
|
306
312
|
declare const recommendedRules: {
|
|
307
313
|
readonly "@sarj/enforce-file-structure": "warn";
|
|
308
314
|
readonly "@sarj/no-async-callback-in-wait-for": "warn";
|
|
@@ -341,6 +347,7 @@ declare const recommendedRules: {
|
|
|
341
347
|
readonly "@sarj/prefer-constant-time-secret-compare": "error";
|
|
342
348
|
readonly "@sarj/prefer-discriminated-union": "warn";
|
|
343
349
|
readonly "@sarj/prefer-input-group-search": "error";
|
|
350
|
+
readonly "@sarj/prefer-immutable-module-constant": "warn";
|
|
344
351
|
readonly "@sarj/prefer-module-level-constant": "warn";
|
|
345
352
|
readonly "@sarj/prefer-module-level-schema": "warn";
|
|
346
353
|
readonly "@sarj/prefer-non-nullable-collection": "warn";
|
|
@@ -404,6 +411,7 @@ declare const strictRules: {
|
|
|
404
411
|
readonly "@sarj/prefer-constant-time-secret-compare": "error";
|
|
405
412
|
readonly "@sarj/prefer-discriminated-union": "error";
|
|
406
413
|
readonly "@sarj/prefer-input-group-search": "error";
|
|
414
|
+
readonly "@sarj/prefer-immutable-module-constant": "warn";
|
|
407
415
|
readonly "@sarj/prefer-module-level-constant": "error";
|
|
408
416
|
readonly "@sarj/prefer-module-level-schema": "error";
|
|
409
417
|
readonly "@sarj/prefer-non-nullable-collection": "error";
|
|
@@ -438,7 +446,7 @@ type FlatPreset = {
|
|
|
438
446
|
declare const plugin: {
|
|
439
447
|
meta: {
|
|
440
448
|
readonly name: "@sarj/eslint-plugin";
|
|
441
|
-
readonly version: "9.
|
|
449
|
+
readonly version: "9.13.0";
|
|
442
450
|
};
|
|
443
451
|
rules: {
|
|
444
452
|
"enforce-file-structure": _typescript_eslint_utils_ts_eslint.RuleModule<"importsFirst" | "useServerDirective", readonly [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
@@ -574,6 +582,12 @@ declare const plugin: {
|
|
|
574
582
|
"prefer-input-group-search": _typescript_eslint_utils_ts_eslint.RuleModule<"preferInputGroup", readonly [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
575
583
|
name: string;
|
|
576
584
|
};
|
|
585
|
+
"prefer-immutable-module-constant": _typescript_eslint_utils_ts_eslint.RuleModule<"preferAsConst" | "preferReadonlyCollection", readonly [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
586
|
+
name: string;
|
|
587
|
+
};
|
|
588
|
+
"prefer-shadcn-primitives": _typescript_eslint_utils_ts_eslint.RuleModule<"preferShadcnPrimitive", readonly [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
589
|
+
name: string;
|
|
590
|
+
};
|
|
577
591
|
"prefer-module-level-constant": _typescript_eslint_utils_ts_eslint.RuleModule<"hoistCollection" | "hoistRegex", readonly [{
|
|
578
592
|
minElements?: number;
|
|
579
593
|
checkRegex?: boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -224,6 +224,12 @@ declare const rules: {
|
|
|
224
224
|
"prefer-input-group-search": _typescript_eslint_utils_ts_eslint.RuleModule<"preferInputGroup", readonly [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
225
225
|
name: string;
|
|
226
226
|
};
|
|
227
|
+
"prefer-immutable-module-constant": _typescript_eslint_utils_ts_eslint.RuleModule<"preferAsConst" | "preferReadonlyCollection", readonly [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
228
|
+
name: string;
|
|
229
|
+
};
|
|
230
|
+
"prefer-shadcn-primitives": _typescript_eslint_utils_ts_eslint.RuleModule<"preferShadcnPrimitive", readonly [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
231
|
+
name: string;
|
|
232
|
+
};
|
|
227
233
|
"prefer-module-level-constant": _typescript_eslint_utils_ts_eslint.RuleModule<"hoistCollection" | "hoistRegex", readonly [{
|
|
228
234
|
minElements?: number;
|
|
229
235
|
checkRegex?: boolean;
|
|
@@ -302,7 +308,7 @@ declare const rules: {
|
|
|
302
308
|
};
|
|
303
309
|
};
|
|
304
310
|
/** Rules registered for application-profile configs but intentionally absent from general presets. */
|
|
305
|
-
declare const applicationOnlyRules: readonly ["no-restricted-library-load", "prefer-native-random-uuid"];
|
|
311
|
+
declare const applicationOnlyRules: readonly ["no-restricted-library-load", "prefer-native-random-uuid", "prefer-shadcn-primitives"];
|
|
306
312
|
declare const recommendedRules: {
|
|
307
313
|
readonly "@sarj/enforce-file-structure": "warn";
|
|
308
314
|
readonly "@sarj/no-async-callback-in-wait-for": "warn";
|
|
@@ -341,6 +347,7 @@ declare const recommendedRules: {
|
|
|
341
347
|
readonly "@sarj/prefer-constant-time-secret-compare": "error";
|
|
342
348
|
readonly "@sarj/prefer-discriminated-union": "warn";
|
|
343
349
|
readonly "@sarj/prefer-input-group-search": "error";
|
|
350
|
+
readonly "@sarj/prefer-immutable-module-constant": "warn";
|
|
344
351
|
readonly "@sarj/prefer-module-level-constant": "warn";
|
|
345
352
|
readonly "@sarj/prefer-module-level-schema": "warn";
|
|
346
353
|
readonly "@sarj/prefer-non-nullable-collection": "warn";
|
|
@@ -404,6 +411,7 @@ declare const strictRules: {
|
|
|
404
411
|
readonly "@sarj/prefer-constant-time-secret-compare": "error";
|
|
405
412
|
readonly "@sarj/prefer-discriminated-union": "error";
|
|
406
413
|
readonly "@sarj/prefer-input-group-search": "error";
|
|
414
|
+
readonly "@sarj/prefer-immutable-module-constant": "warn";
|
|
407
415
|
readonly "@sarj/prefer-module-level-constant": "error";
|
|
408
416
|
readonly "@sarj/prefer-module-level-schema": "error";
|
|
409
417
|
readonly "@sarj/prefer-non-nullable-collection": "error";
|
|
@@ -438,7 +446,7 @@ type FlatPreset = {
|
|
|
438
446
|
declare const plugin: {
|
|
439
447
|
meta: {
|
|
440
448
|
readonly name: "@sarj/eslint-plugin";
|
|
441
|
-
readonly version: "9.
|
|
449
|
+
readonly version: "9.13.0";
|
|
442
450
|
};
|
|
443
451
|
rules: {
|
|
444
452
|
"enforce-file-structure": _typescript_eslint_utils_ts_eslint.RuleModule<"importsFirst" | "useServerDirective", readonly [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
@@ -574,6 +582,12 @@ declare const plugin: {
|
|
|
574
582
|
"prefer-input-group-search": _typescript_eslint_utils_ts_eslint.RuleModule<"preferInputGroup", readonly [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
575
583
|
name: string;
|
|
576
584
|
};
|
|
585
|
+
"prefer-immutable-module-constant": _typescript_eslint_utils_ts_eslint.RuleModule<"preferAsConst" | "preferReadonlyCollection", readonly [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
586
|
+
name: string;
|
|
587
|
+
};
|
|
588
|
+
"prefer-shadcn-primitives": _typescript_eslint_utils_ts_eslint.RuleModule<"preferShadcnPrimitive", readonly [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
589
|
+
name: string;
|
|
590
|
+
};
|
|
577
591
|
"prefer-module-level-constant": _typescript_eslint_utils_ts_eslint.RuleModule<"hoistCollection" | "hoistRegex", readonly [{
|
|
578
592
|
minElements?: number;
|
|
579
593
|
checkRegex?: boolean;
|