@aiou/eslint-config 3.2.0 → 3.3.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.mjs CHANGED
@@ -1112,13 +1112,17 @@ const stylistic = () => {
1112
1112
  const require = createRequire(import.meta.url);
1113
1113
  const tailwindcss = () => {
1114
1114
  const pluginTailwindcss = require("eslint-plugin-tailwindcss");
1115
+ const recommended = pluginTailwindcss.configs.recommended;
1116
+ const configs = Array.isArray(recommended) ? recommended : [recommended];
1117
+ const rules = {
1118
+ ...configs.find((c) => c.rules)?.rules,
1119
+ "tailwindcss/no-custom-classname": "off"
1120
+ };
1115
1121
  const config = [
1116
- ...pluginTailwindcss.configs["flat/recommended"],
1122
+ ...configs,
1117
1123
  {
1118
- rules: {
1119
- ...pluginTailwindcss.configs.recommended.rules,
1120
- "tailwindcss/no-custom-classname": "off"
1121
- }
1124
+ plugins: { tailwindcss: pluginTailwindcss.default ?? pluginTailwindcss },
1125
+ rules
1122
1126
  }
1123
1127
  ];
1124
1128
  return config;
package/dts/typegen.d.ts CHANGED
@@ -5781,43 +5781,38 @@ export interface Rules {
5781
5781
  */
5782
5782
  'storybook/use-storybook-testing-library'?: Linter.RuleEntry<[]>;
5783
5783
  /**
5784
- * Enforce a consistent and logical order of the Tailwind CSS classnames
5785
- * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/classnames-order.md
5784
+ * Enforces a consistent order for the Tailwind CSS classnames, based on the compiler.
5785
+ * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/blob/alpha/v4-basic-files/docs/rules/classnames-order.md
5786
5786
  */
5787
5787
  'tailwindcss/classnames-order'?: Linter.RuleEntry<TailwindcssClassnamesOrder>;
5788
5788
  /**
5789
- * Warns about dash prefixed classnames using arbitrary values
5790
- * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/enforces-negative-arbitrary-values.md
5789
+ * Warns about `-` prefixed classnames using arbitrary values.
5790
+ * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/blob/alpha/v4-basic-files/docs/rules/enforces-negative-arbitrary-values.md
5791
5791
  */
5792
5792
  'tailwindcss/enforces-negative-arbitrary-values'?: Linter.RuleEntry<TailwindcssEnforcesNegativeArbitraryValues>;
5793
5793
  /**
5794
- * Enforces the usage of shorthand Tailwind CSS classnames
5795
- * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/enforces-shorthand.md
5794
+ * Avoid using multiple Tailwind CSS classnames when not required.
5795
+ * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/blob/alpha/v4-basic-files/docs/rules/enforces-shorthand.md
5796
5796
  */
5797
5797
  'tailwindcss/enforces-shorthand'?: Linter.RuleEntry<TailwindcssEnforcesShorthand>;
5798
5798
  /**
5799
- * Detect obsolete classnames when upgrading to Tailwind CSS v3
5800
- * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/migration-from-tailwind-2.md
5801
- */
5802
- 'tailwindcss/migration-from-tailwind-2'?: Linter.RuleEntry<TailwindcssMigrationFromTailwind2>;
5803
- /**
5804
- * Forbid using arbitrary values in classnames
5805
- * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/no-arbitrary-value.md
5799
+ * Forbid using arbitrary values in classnames.
5800
+ * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/blob/alpha/v4-basic-files/docs/rules/no-arbitrary-value.md
5806
5801
  */
5807
5802
  'tailwindcss/no-arbitrary-value'?: Linter.RuleEntry<TailwindcssNoArbitraryValue>;
5808
5803
  /**
5809
- * Avoid contradicting Tailwind CSS classnames (e.g. "w-3 w-5")
5810
- * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/no-contradicting-classname.md
5804
+ * Avoid contradicting Tailwind CSS classnames.
5805
+ * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/blob/alpha/v4-basic-files/docs/rules/no-contradicting-classname.md
5811
5806
  */
5812
5807
  'tailwindcss/no-contradicting-classname'?: Linter.RuleEntry<TailwindcssNoContradictingClassname>;
5813
5808
  /**
5814
- * Detect classnames which do not belong to Tailwind CSS
5815
- * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/no-custom-classname.md
5809
+ * Detects classnames which do not belong to Tailwind CSS.
5810
+ * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/blob/alpha/v4-basic-files/docs/rules/no-custom-classname.md
5816
5811
  */
5817
5812
  'tailwindcss/no-custom-classname'?: Linter.RuleEntry<TailwindcssNoCustomClassname>;
5818
5813
  /**
5819
- * Forbid using arbitrary values in classnames when an equivalent preset exists
5820
- * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/no-unnecessary-arbitrary-value.md
5814
+ * Avoid unjustified arbitrary classnames.
5815
+ * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/blob/alpha/v4-basic-files/docs/rules/no-unnecessary-arbitrary-value.md
5821
5816
  */
5822
5817
  'tailwindcss/no-unnecessary-arbitrary-value'?: Linter.RuleEntry<TailwindcssNoUnnecessaryArbitraryValue>;
5823
5818
  /**
@@ -13530,98 +13525,17 @@ type StorybookNoUninstalledAddons = [] | [
13530
13525
  ignore?: string[];
13531
13526
  }
13532
13527
  ];
13533
- type TailwindcssClassnamesOrder = [] | [
13534
- {
13535
- callees?: string[];
13536
- ignoredKeys?: string[];
13537
- config?: (string | {
13538
- [k: string]: unknown | undefined;
13539
- });
13540
- removeDuplicates?: boolean;
13541
- tags?: string[];
13542
- [k: string]: unknown | undefined;
13543
- }
13544
- ];
13545
- type TailwindcssEnforcesNegativeArbitraryValues = [] | [
13546
- {
13547
- callees?: string[];
13548
- ignoredKeys?: string[];
13549
- config?: (string | {
13550
- [k: string]: unknown | undefined;
13551
- });
13552
- tags?: string[];
13553
- [k: string]: unknown | undefined;
13554
- }
13555
- ];
13556
- type TailwindcssEnforcesShorthand = [] | [
13557
- {
13558
- callees?: string[];
13559
- ignoredKeys?: string[];
13560
- config?: (string | {
13561
- [k: string]: unknown | undefined;
13562
- });
13563
- tags?: string[];
13564
- [k: string]: unknown | undefined;
13565
- }
13566
- ];
13567
- type TailwindcssMigrationFromTailwind2 = [] | [
13568
- {
13569
- callees?: string[];
13570
- ignoredKeys?: string[];
13571
- config?: (string | {
13572
- [k: string]: unknown | undefined;
13573
- });
13574
- tags?: string[];
13575
- [k: string]: unknown | undefined;
13576
- }
13577
- ];
13578
- type TailwindcssNoArbitraryValue = [] | [
13579
- {
13580
- callees?: string[];
13581
- ignoredKeys?: string[];
13582
- config?: (string | {
13583
- [k: string]: unknown | undefined;
13584
- });
13585
- tags?: string[];
13586
- [k: string]: unknown | undefined;
13587
- }
13588
- ];
13589
- type TailwindcssNoContradictingClassname = [] | [
13590
- {
13591
- callees?: string[];
13592
- ignoredKeys?: string[];
13593
- config?: (string | {
13594
- [k: string]: unknown | undefined;
13595
- });
13596
- tags?: string[];
13597
- [k: string]: unknown | undefined;
13598
- }
13599
- ];
13528
+ type TailwindcssClassnamesOrder = [] | [{}];
13529
+ type TailwindcssEnforcesNegativeArbitraryValues = [] | [{}];
13530
+ type TailwindcssEnforcesShorthand = [] | [{}];
13531
+ type TailwindcssNoArbitraryValue = [] | [{}];
13532
+ type TailwindcssNoContradictingClassname = [] | [{}];
13600
13533
  type TailwindcssNoCustomClassname = [] | [
13601
13534
  {
13602
- callees?: string[];
13603
- ignoredKeys?: string[];
13604
- config?: (string | {
13605
- [k: string]: unknown | undefined;
13606
- });
13607
- cssFiles?: string[];
13608
- cssFilesRefreshRate?: number;
13609
- tags?: string[];
13610
13535
  whitelist?: string[];
13611
- [k: string]: unknown | undefined;
13612
- }
13613
- ];
13614
- type TailwindcssNoUnnecessaryArbitraryValue = [] | [
13615
- {
13616
- callees?: string[];
13617
- ignoredKeys?: string[];
13618
- config?: (string | {
13619
- [k: string]: unknown | undefined;
13620
- });
13621
- tags?: string[];
13622
- [k: string]: unknown | undefined;
13623
13536
  }
13624
13537
  ];
13538
+ type TailwindcssNoUnnecessaryArbitraryValue = [] | [{}];
13625
13539
  type TomlArrayBracketNewline = [] | [
13626
13540
  (("always" | "never" | "consistent") | {
13627
13541
  multiline?: boolean;
@@ -14309,5 +14223,5 @@ type YmlSpacedComment = [] | [("always" | "never")] | [
14309
14223
  markers?: string[];
14310
14224
  }
14311
14225
  ];
14312
- export type ConfigNames = 'markdown/recommended/plugin' | 'markdown/recommended/processor' | 'markdown/recommended/code-blocks' | 'storybook:recommended:setup' | 'storybook:recommended:stories-rules' | 'storybook:recommended:main-rules' | 'tailwindcss:base' | 'tailwindcss:rules' | 'storybook:recommended:setup' | 'storybook:recommended:stories-rules' | 'storybook:recommended:main-rules';
14226
+ export type ConfigNames = 'markdown/recommended/plugin' | 'markdown/recommended/processor' | 'markdown/recommended/code-blocks' | 'storybook:recommended:setup' | 'storybook:recommended:stories-rules' | 'storybook:recommended:main-rules' | 'tailwindcss/recommended' | 'storybook:recommended:setup' | 'storybook:recommended:stories-rules' | 'storybook:recommended:main-rules';
14313
14227
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiou/eslint-config",
3
- "version": "3.2.0",
3
+ "version": "3.3.0",
4
4
  "type": "module",
5
5
  "description": "eslint config for JW",
6
6
  "keywords": [],
@@ -35,7 +35,13 @@
35
35
  "access": "public"
36
36
  },
37
37
  "peerDependencies": {
38
- "eslint": ">=10"
38
+ "eslint": ">=10",
39
+ "tailwindcss": "^4.0.0"
40
+ },
41
+ "peerDependenciesMeta": {
42
+ "tailwindcss": {
43
+ "optional": true
44
+ }
39
45
  },
40
46
  "dependencies": {
41
47
  "@eslint-community/eslint-plugin-eslint-comments": "^4.7.1",
@@ -56,7 +62,7 @@
56
62
  "eslint-plugin-react-refresh": "^0.5.2",
57
63
  "eslint-plugin-regexp": "^3.1.0",
58
64
  "eslint-plugin-storybook": "^10.4.0",
59
- "eslint-plugin-tailwindcss": "^4.0.0-alpha.5",
65
+ "eslint-plugin-tailwindcss": "4.0.0-alpha.6",
60
66
  "eslint-plugin-toml": "^1.3.1",
61
67
  "eslint-plugin-unicorn": "^64.0.0",
62
68
  "eslint-plugin-unused-imports": "^4.4.1",
@@ -65,7 +71,7 @@
65
71
  "jsonc-eslint-parser": "^3.1.0",
66
72
  "local-pkg": "^1.1.2",
67
73
  "yaml-eslint-parser": "^2.0.0",
68
- "@aiou/eslint-ignore": "0.6.2",
74
+ "@aiou/eslint-ignore": "0.6.3",
69
75
  "@aiou/eslint-plugin-progress": "0.4.0"
70
76
  },
71
77
  "devDependencies": {
@@ -84,6 +90,7 @@
84
90
  "rollup-plugin-esbuild": "^5.0.0",
85
91
  "rollup-plugin-filesize": "9.1.2",
86
92
  "rollup-plugin-node-externals": "5.1.2",
93
+ "tailwindcss": "^4.3.1",
87
94
  "tsx": "^4.20.0"
88
95
  },
89
96
  "scripts": {