@lichthagel/eslint-config 1.0.36 → 1.0.37

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 CHANGED
@@ -411,14 +411,13 @@ const svelte = async (options = {}) => {
411
411
  //#endregion
412
412
  //#region src/configs/tailwindcss.ts
413
413
  const tailwindcss = async () => {
414
+ var _recommendedConfig$na;
414
415
  const { default: pluginTailwind } = await import("eslint-plugin-tailwindcss");
415
- return [...pluginTailwind.configs["flat/recommended"].map((config) => {
416
- var _config$name;
417
- return {
418
- ...config,
419
- name: (_config$name = config.name) === null || _config$name === void 0 ? void 0 : _config$name.replaceAll(":", "/")
420
- };
421
- }), {
416
+ const recommendedConfig = pluginTailwind.configs.recommended;
417
+ return [{
418
+ ...recommendedConfig,
419
+ name: (_recommendedConfig$na = recommendedConfig.name) === null || _recommendedConfig$na === void 0 ? void 0 : _recommendedConfig$na.replaceAll(":", "/")
420
+ }, {
422
421
  name: "lichthagel/tailwindcss",
423
422
  rules: {
424
423
  "tailwindcss/classnames-order": "error",
@@ -471,7 +470,8 @@ var unicorn_default = [{
471
470
  "unicorn/prevent-abbreviations": "off",
472
471
  "unicorn/comment-content": "off",
473
472
  "unicorn/consistent-boolean-name": "off",
474
- "unicorn/name-replacements": "off"
473
+ "unicorn/name-replacements": "off",
474
+ "unicorn/no-top-level-assignment-in-function": "off"
475
475
  }
476
476
  }];
477
477
  //#endregion
package/dist/index.d.cts CHANGED
@@ -3513,43 +3513,38 @@ interface RuleOptions {
3513
3513
  */
3514
3514
  'symbol-description'?: Linter.RuleEntry<[]>;
3515
3515
  /**
3516
- * Enforce a consistent and logical order of the Tailwind CSS classnames
3517
- * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/classnames-order.md
3516
+ * Enforces a consistent order for the Tailwind CSS classnames, based on the compiler.
3517
+ * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/blob/alpha/v4-basic-files/docs/rules/classnames-order.md
3518
3518
  */
3519
3519
  'tailwindcss/classnames-order'?: Linter.RuleEntry<TailwindcssClassnamesOrder>;
3520
3520
  /**
3521
- * Warns about dash prefixed classnames using arbitrary values
3522
- * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/enforces-negative-arbitrary-values.md
3521
+ * Warns about `-` prefixed classnames using arbitrary values.
3522
+ * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/blob/alpha/v4-basic-files/docs/rules/enforces-negative-arbitrary-values.md
3523
3523
  */
3524
3524
  'tailwindcss/enforces-negative-arbitrary-values'?: Linter.RuleEntry<TailwindcssEnforcesNegativeArbitraryValues>;
3525
3525
  /**
3526
- * Enforces the usage of shorthand Tailwind CSS classnames
3527
- * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/enforces-shorthand.md
3526
+ * Avoid using multiple Tailwind CSS classnames when not required.
3527
+ * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/blob/alpha/v4-basic-files/docs/rules/enforces-shorthand.md
3528
3528
  */
3529
3529
  'tailwindcss/enforces-shorthand'?: Linter.RuleEntry<TailwindcssEnforcesShorthand>;
3530
3530
  /**
3531
- * Detect obsolete classnames when upgrading to Tailwind CSS v3
3532
- * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/migration-from-tailwind-2.md
3533
- */
3534
- 'tailwindcss/migration-from-tailwind-2'?: Linter.RuleEntry<TailwindcssMigrationFromTailwind2>;
3535
- /**
3536
- * Forbid using arbitrary values in classnames
3537
- * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/no-arbitrary-value.md
3531
+ * Forbid using arbitrary values in classnames.
3532
+ * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/blob/alpha/v4-basic-files/docs/rules/no-arbitrary-value.md
3538
3533
  */
3539
3534
  'tailwindcss/no-arbitrary-value'?: Linter.RuleEntry<TailwindcssNoArbitraryValue>;
3540
3535
  /**
3541
- * Avoid contradicting Tailwind CSS classnames (e.g. "w-3 w-5")
3542
- * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/no-contradicting-classname.md
3536
+ * Avoid contradicting Tailwind CSS classnames.
3537
+ * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/blob/alpha/v4-basic-files/docs/rules/no-contradicting-classname.md
3543
3538
  */
3544
3539
  'tailwindcss/no-contradicting-classname'?: Linter.RuleEntry<TailwindcssNoContradictingClassname>;
3545
3540
  /**
3546
- * Detect classnames which do not belong to Tailwind CSS
3547
- * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/no-custom-classname.md
3541
+ * Detects classnames which do not belong to Tailwind CSS.
3542
+ * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/blob/alpha/v4-basic-files/docs/rules/no-custom-classname.md
3548
3543
  */
3549
3544
  'tailwindcss/no-custom-classname'?: Linter.RuleEntry<TailwindcssNoCustomClassname>;
3550
3545
  /**
3551
- * Forbid using arbitrary values in classnames when an equivalent preset exists
3552
- * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/no-unnecessary-arbitrary-value.md
3546
+ * Avoid unjustified arbitrary classnames.
3547
+ * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/blob/alpha/v4-basic-files/docs/rules/no-unnecessary-arbitrary-value.md
3553
3548
  */
3554
3549
  'tailwindcss/no-unnecessary-arbitrary-value'?: Linter.RuleEntry<TailwindcssNoUnnecessaryArbitraryValue>;
3555
3550
  /**
@@ -11561,82 +11556,15 @@ type SwitchColonSpacing = [] | [{
11561
11556
  before?: boolean;
11562
11557
  after?: boolean;
11563
11558
  }]; // ----- tailwindcss/classnames-order -----
11564
- type TailwindcssClassnamesOrder = [] | [{
11565
- callees?: string[];
11566
- ignoredKeys?: string[];
11567
- config?: (string | {
11568
- [k: string]: unknown | undefined;
11569
- });
11570
- removeDuplicates?: boolean;
11571
- tags?: string[];
11572
- [k: string]: unknown | undefined;
11573
- }]; // ----- tailwindcss/enforces-negative-arbitrary-values -----
11574
- type TailwindcssEnforcesNegativeArbitraryValues = [] | [{
11575
- callees?: string[];
11576
- ignoredKeys?: string[];
11577
- config?: (string | {
11578
- [k: string]: unknown | undefined;
11579
- });
11580
- tags?: string[];
11581
- [k: string]: unknown | undefined;
11582
- }]; // ----- tailwindcss/enforces-shorthand -----
11583
- type TailwindcssEnforcesShorthand = [] | [{
11584
- callees?: string[];
11585
- ignoredKeys?: string[];
11586
- config?: (string | {
11587
- [k: string]: unknown | undefined;
11588
- });
11589
- tags?: string[];
11590
- [k: string]: unknown | undefined;
11591
- }]; // ----- tailwindcss/migration-from-tailwind-2 -----
11592
- type TailwindcssMigrationFromTailwind2 = [] | [{
11593
- callees?: string[];
11594
- ignoredKeys?: string[];
11595
- config?: (string | {
11596
- [k: string]: unknown | undefined;
11597
- });
11598
- tags?: string[];
11599
- [k: string]: unknown | undefined;
11600
- }]; // ----- tailwindcss/no-arbitrary-value -----
11601
- type TailwindcssNoArbitraryValue = [] | [{
11602
- callees?: string[];
11603
- ignoredKeys?: string[];
11604
- config?: (string | {
11605
- [k: string]: unknown | undefined;
11606
- });
11607
- tags?: string[];
11608
- [k: string]: unknown | undefined;
11609
- }]; // ----- tailwindcss/no-contradicting-classname -----
11610
- type TailwindcssNoContradictingClassname = [] | [{
11611
- callees?: string[];
11612
- ignoredKeys?: string[];
11613
- config?: (string | {
11614
- [k: string]: unknown | undefined;
11615
- });
11616
- tags?: string[];
11617
- [k: string]: unknown | undefined;
11618
- }]; // ----- tailwindcss/no-custom-classname -----
11559
+ type TailwindcssClassnamesOrder = [] | [{}]; // ----- tailwindcss/enforces-negative-arbitrary-values -----
11560
+ type TailwindcssEnforcesNegativeArbitraryValues = [] | [{}]; // ----- tailwindcss/enforces-shorthand -----
11561
+ type TailwindcssEnforcesShorthand = [] | [{}]; // ----- tailwindcss/no-arbitrary-value -----
11562
+ type TailwindcssNoArbitraryValue = [] | [{}]; // ----- tailwindcss/no-contradicting-classname -----
11563
+ type TailwindcssNoContradictingClassname = [] | [{}]; // ----- tailwindcss/no-custom-classname -----
11619
11564
  type TailwindcssNoCustomClassname = [] | [{
11620
- callees?: string[];
11621
- ignoredKeys?: string[];
11622
- config?: (string | {
11623
- [k: string]: unknown | undefined;
11624
- });
11625
- cssFiles?: string[];
11626
- cssFilesRefreshRate?: number;
11627
- tags?: string[];
11628
11565
  whitelist?: string[];
11629
- [k: string]: unknown | undefined;
11630
11566
  }]; // ----- tailwindcss/no-unnecessary-arbitrary-value -----
11631
- type TailwindcssNoUnnecessaryArbitraryValue = [] | [{
11632
- callees?: string[];
11633
- ignoredKeys?: string[];
11634
- config?: (string | {
11635
- [k: string]: unknown | undefined;
11636
- });
11637
- tags?: string[];
11638
- [k: string]: unknown | undefined;
11639
- }]; // ----- template-curly-spacing -----
11567
+ type TailwindcssNoUnnecessaryArbitraryValue = [] | [{}]; // ----- template-curly-spacing -----
11640
11568
  type TemplateCurlySpacing = [] | [("always" | "never")]; // ----- template-tag-spacing -----
11641
11569
  type TemplateTagSpacing = [] | [("always" | "never")]; // ----- unicode-bom -----
11642
11570
  type UnicodeBom = [] | [("always" | "never")]; // ----- unicorn/catch-error-name -----
package/dist/index.d.mts CHANGED
@@ -3513,43 +3513,38 @@ interface RuleOptions {
3513
3513
  */
3514
3514
  'symbol-description'?: Linter.RuleEntry<[]>;
3515
3515
  /**
3516
- * Enforce a consistent and logical order of the Tailwind CSS classnames
3517
- * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/classnames-order.md
3516
+ * Enforces a consistent order for the Tailwind CSS classnames, based on the compiler.
3517
+ * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/blob/alpha/v4-basic-files/docs/rules/classnames-order.md
3518
3518
  */
3519
3519
  'tailwindcss/classnames-order'?: Linter.RuleEntry<TailwindcssClassnamesOrder>;
3520
3520
  /**
3521
- * Warns about dash prefixed classnames using arbitrary values
3522
- * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/enforces-negative-arbitrary-values.md
3521
+ * Warns about `-` prefixed classnames using arbitrary values.
3522
+ * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/blob/alpha/v4-basic-files/docs/rules/enforces-negative-arbitrary-values.md
3523
3523
  */
3524
3524
  'tailwindcss/enforces-negative-arbitrary-values'?: Linter.RuleEntry<TailwindcssEnforcesNegativeArbitraryValues>;
3525
3525
  /**
3526
- * Enforces the usage of shorthand Tailwind CSS classnames
3527
- * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/enforces-shorthand.md
3526
+ * Avoid using multiple Tailwind CSS classnames when not required.
3527
+ * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/blob/alpha/v4-basic-files/docs/rules/enforces-shorthand.md
3528
3528
  */
3529
3529
  'tailwindcss/enforces-shorthand'?: Linter.RuleEntry<TailwindcssEnforcesShorthand>;
3530
3530
  /**
3531
- * Detect obsolete classnames when upgrading to Tailwind CSS v3
3532
- * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/migration-from-tailwind-2.md
3533
- */
3534
- 'tailwindcss/migration-from-tailwind-2'?: Linter.RuleEntry<TailwindcssMigrationFromTailwind2>;
3535
- /**
3536
- * Forbid using arbitrary values in classnames
3537
- * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/no-arbitrary-value.md
3531
+ * Forbid using arbitrary values in classnames.
3532
+ * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/blob/alpha/v4-basic-files/docs/rules/no-arbitrary-value.md
3538
3533
  */
3539
3534
  'tailwindcss/no-arbitrary-value'?: Linter.RuleEntry<TailwindcssNoArbitraryValue>;
3540
3535
  /**
3541
- * Avoid contradicting Tailwind CSS classnames (e.g. "w-3 w-5")
3542
- * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/no-contradicting-classname.md
3536
+ * Avoid contradicting Tailwind CSS classnames.
3537
+ * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/blob/alpha/v4-basic-files/docs/rules/no-contradicting-classname.md
3543
3538
  */
3544
3539
  'tailwindcss/no-contradicting-classname'?: Linter.RuleEntry<TailwindcssNoContradictingClassname>;
3545
3540
  /**
3546
- * Detect classnames which do not belong to Tailwind CSS
3547
- * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/no-custom-classname.md
3541
+ * Detects classnames which do not belong to Tailwind CSS.
3542
+ * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/blob/alpha/v4-basic-files/docs/rules/no-custom-classname.md
3548
3543
  */
3549
3544
  'tailwindcss/no-custom-classname'?: Linter.RuleEntry<TailwindcssNoCustomClassname>;
3550
3545
  /**
3551
- * Forbid using arbitrary values in classnames when an equivalent preset exists
3552
- * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/no-unnecessary-arbitrary-value.md
3546
+ * Avoid unjustified arbitrary classnames.
3547
+ * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/blob/alpha/v4-basic-files/docs/rules/no-unnecessary-arbitrary-value.md
3553
3548
  */
3554
3549
  'tailwindcss/no-unnecessary-arbitrary-value'?: Linter.RuleEntry<TailwindcssNoUnnecessaryArbitraryValue>;
3555
3550
  /**
@@ -11561,82 +11556,15 @@ type SwitchColonSpacing = [] | [{
11561
11556
  before?: boolean;
11562
11557
  after?: boolean;
11563
11558
  }]; // ----- tailwindcss/classnames-order -----
11564
- type TailwindcssClassnamesOrder = [] | [{
11565
- callees?: string[];
11566
- ignoredKeys?: string[];
11567
- config?: (string | {
11568
- [k: string]: unknown | undefined;
11569
- });
11570
- removeDuplicates?: boolean;
11571
- tags?: string[];
11572
- [k: string]: unknown | undefined;
11573
- }]; // ----- tailwindcss/enforces-negative-arbitrary-values -----
11574
- type TailwindcssEnforcesNegativeArbitraryValues = [] | [{
11575
- callees?: string[];
11576
- ignoredKeys?: string[];
11577
- config?: (string | {
11578
- [k: string]: unknown | undefined;
11579
- });
11580
- tags?: string[];
11581
- [k: string]: unknown | undefined;
11582
- }]; // ----- tailwindcss/enforces-shorthand -----
11583
- type TailwindcssEnforcesShorthand = [] | [{
11584
- callees?: string[];
11585
- ignoredKeys?: string[];
11586
- config?: (string | {
11587
- [k: string]: unknown | undefined;
11588
- });
11589
- tags?: string[];
11590
- [k: string]: unknown | undefined;
11591
- }]; // ----- tailwindcss/migration-from-tailwind-2 -----
11592
- type TailwindcssMigrationFromTailwind2 = [] | [{
11593
- callees?: string[];
11594
- ignoredKeys?: string[];
11595
- config?: (string | {
11596
- [k: string]: unknown | undefined;
11597
- });
11598
- tags?: string[];
11599
- [k: string]: unknown | undefined;
11600
- }]; // ----- tailwindcss/no-arbitrary-value -----
11601
- type TailwindcssNoArbitraryValue = [] | [{
11602
- callees?: string[];
11603
- ignoredKeys?: string[];
11604
- config?: (string | {
11605
- [k: string]: unknown | undefined;
11606
- });
11607
- tags?: string[];
11608
- [k: string]: unknown | undefined;
11609
- }]; // ----- tailwindcss/no-contradicting-classname -----
11610
- type TailwindcssNoContradictingClassname = [] | [{
11611
- callees?: string[];
11612
- ignoredKeys?: string[];
11613
- config?: (string | {
11614
- [k: string]: unknown | undefined;
11615
- });
11616
- tags?: string[];
11617
- [k: string]: unknown | undefined;
11618
- }]; // ----- tailwindcss/no-custom-classname -----
11559
+ type TailwindcssClassnamesOrder = [] | [{}]; // ----- tailwindcss/enforces-negative-arbitrary-values -----
11560
+ type TailwindcssEnforcesNegativeArbitraryValues = [] | [{}]; // ----- tailwindcss/enforces-shorthand -----
11561
+ type TailwindcssEnforcesShorthand = [] | [{}]; // ----- tailwindcss/no-arbitrary-value -----
11562
+ type TailwindcssNoArbitraryValue = [] | [{}]; // ----- tailwindcss/no-contradicting-classname -----
11563
+ type TailwindcssNoContradictingClassname = [] | [{}]; // ----- tailwindcss/no-custom-classname -----
11619
11564
  type TailwindcssNoCustomClassname = [] | [{
11620
- callees?: string[];
11621
- ignoredKeys?: string[];
11622
- config?: (string | {
11623
- [k: string]: unknown | undefined;
11624
- });
11625
- cssFiles?: string[];
11626
- cssFilesRefreshRate?: number;
11627
- tags?: string[];
11628
11565
  whitelist?: string[];
11629
- [k: string]: unknown | undefined;
11630
11566
  }]; // ----- tailwindcss/no-unnecessary-arbitrary-value -----
11631
- type TailwindcssNoUnnecessaryArbitraryValue = [] | [{
11632
- callees?: string[];
11633
- ignoredKeys?: string[];
11634
- config?: (string | {
11635
- [k: string]: unknown | undefined;
11636
- });
11637
- tags?: string[];
11638
- [k: string]: unknown | undefined;
11639
- }]; // ----- template-curly-spacing -----
11567
+ type TailwindcssNoUnnecessaryArbitraryValue = [] | [{}]; // ----- template-curly-spacing -----
11640
11568
  type TemplateCurlySpacing = [] | [("always" | "never")]; // ----- template-tag-spacing -----
11641
11569
  type TemplateTagSpacing = [] | [("always" | "never")]; // ----- unicode-bom -----
11642
11570
  type UnicodeBom = [] | [("always" | "never")]; // ----- unicorn/catch-error-name -----
package/dist/index.mjs CHANGED
@@ -379,14 +379,13 @@ const svelte = async (options = {}) => {
379
379
  //#endregion
380
380
  //#region src/configs/tailwindcss.ts
381
381
  const tailwindcss = async () => {
382
+ var _recommendedConfig$na;
382
383
  const { default: pluginTailwind } = await import("eslint-plugin-tailwindcss");
383
- return [...pluginTailwind.configs["flat/recommended"].map((config) => {
384
- var _config$name;
385
- return {
386
- ...config,
387
- name: (_config$name = config.name) === null || _config$name === void 0 ? void 0 : _config$name.replaceAll(":", "/")
388
- };
389
- }), {
384
+ const recommendedConfig = pluginTailwind.configs.recommended;
385
+ return [{
386
+ ...recommendedConfig,
387
+ name: (_recommendedConfig$na = recommendedConfig.name) === null || _recommendedConfig$na === void 0 ? void 0 : _recommendedConfig$na.replaceAll(":", "/")
388
+ }, {
390
389
  name: "lichthagel/tailwindcss",
391
390
  rules: {
392
391
  "tailwindcss/classnames-order": "error",
@@ -439,7 +438,8 @@ var unicorn_default = [{
439
438
  "unicorn/prevent-abbreviations": "off",
440
439
  "unicorn/comment-content": "off",
441
440
  "unicorn/consistent-boolean-name": "off",
442
- "unicorn/name-replacements": "off"
441
+ "unicorn/name-replacements": "off",
442
+ "unicorn/no-top-level-assignment-in-function": "off"
443
443
  }
444
444
  }];
445
445
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lichthagel/eslint-config",
3
- "version": "1.0.36",
3
+ "version": "1.0.37",
4
4
  "description": "Licht's ESLint config",
5
5
  "keywords": [
6
6
  "eslint",
@@ -58,7 +58,7 @@
58
58
  "eslint-plugin-n": "^18.0.0",
59
59
  "eslint-plugin-solid": "^0.14.3",
60
60
  "eslint-plugin-svelte": "^3.0.0",
61
- "eslint-plugin-tailwindcss": "^3.17.4",
61
+ "eslint-plugin-tailwindcss": "^4.0.0",
62
62
  "eslint-typegen": "^2.0.0",
63
63
  "husky": "^9.1.6",
64
64
  "jiti": "^2.4.2",
@@ -74,7 +74,7 @@
74
74
  "eslint-plugin-n": "^17.2.1 || ^18.0.0",
75
75
  "eslint-plugin-solid": "^0.14.3",
76
76
  "eslint-plugin-svelte": "^2.39.0 || ^3.0.0",
77
- "eslint-plugin-tailwindcss": "^3.17.4"
77
+ "eslint-plugin-tailwindcss": "^3.17.4 || ^4.0.0"
78
78
  },
79
79
  "peerDependenciesMeta": {
80
80
  "eslint-plugin-n": {