@rebeccastevens/eslint-config 3.2.0 → 3.2.2

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
@@ -228,10 +228,10 @@ async function formatters(opts, stylistic) {
228
228
  if (options.slidev !== false && options.slidev !== undefined && options.markdown !== true) {
229
229
  throw new Error("`slidev` option only works when `markdown` is enabled with `prettier`");
230
230
  }
231
- const { indent, quotes, semi } = stylistic;
231
+ const { indent, printWidth, quotes, semi } = stylistic;
232
232
  const prettierOptions = Object.assign({
233
233
  endOfLine: "lf",
234
- printWidth: 120,
234
+ printWidth: printWidth ?? 120,
235
235
  semi: semi ?? true,
236
236
  singleQuote: quotes === "single",
237
237
  tabWidth: typeof indent === "number" ? indent : 2,
@@ -2484,6 +2484,7 @@ const StylisticConfigDefaults = {
2484
2484
  jsx: true,
2485
2485
  quotes: "double",
2486
2486
  semi: true,
2487
+ printWidth: 120,
2487
2488
  };
2488
2489
  async function stylistic(options) {
2489
2490
  const { stylistic: { indent, jsx, quotes, semi }, overrides, typescript, } = options;
@@ -2716,7 +2717,7 @@ async function stylistic(options) {
2716
2717
  }
2717
2718
 
2718
2719
  async function tailwind(options) {
2719
- const { overrides } = options;
2720
+ const { overrides, stylistic } = options;
2720
2721
  const [pluginTailwindCSS, pluginReadableTailwind] = (await loadPackages([
2721
2722
  "eslint-plugin-tailwindcss",
2722
2723
  "eslint-plugin-readable-tailwind",
@@ -2725,19 +2726,30 @@ async function tailwind(options) {
2725
2726
  {
2726
2727
  name: "js:tailwindcss",
2727
2728
  plugins: {
2728
- tailwindcss: pluginTailwindCSS,
2729
- "tailwindcss-readable": pluginReadableTailwind,
2729
+ tailwind: pluginTailwindCSS,
2730
+ "tailwind-readable": pluginReadableTailwind,
2730
2731
  },
2731
2732
  rules: {
2732
- "tailwindcss/classnames-order": "warn",
2733
- "tailwindcss/enforces-negative-arbitrary-values": "warn",
2734
- "tailwindcss/enforces-shorthand": "warn",
2735
- "tailwindcss/no-arbitrary-value": "off",
2736
- "tailwindcss/no-custom-classname": "off",
2737
- "tailwindcss/no-contradicting-classname": "error",
2738
- "tailwindcss/no-unnecessary-arbitrary-value": "warn",
2739
- "tailwindcss-readable/multiline": "warn",
2740
- "tailwindcss-readable/no-unnecessary-whitespace": "warn",
2733
+ "tailwind/no-contradicting-classname": "error",
2734
+ "tailwind/no-arbitrary-value": "off",
2735
+ "tailwind/no-custom-classname": "off",
2736
+ ...(stylistic === false
2737
+ ? {}
2738
+ : {
2739
+ "tailwind/classnames-order": "warn",
2740
+ "tailwind/enforces-negative-arbitrary-values": "warn",
2741
+ "tailwind/enforces-shorthand": "warn",
2742
+ "tailwind/no-unnecessary-arbitrary-value": "warn",
2743
+ "tailwind-readable/multiline": [
2744
+ "warn",
2745
+ {
2746
+ group: "newLine",
2747
+ indent: stylistic.indent,
2748
+ printWidth: stylistic.printWidth,
2749
+ },
2750
+ ],
2751
+ "tailwind-readable/no-unnecessary-whitespace": "warn",
2752
+ }),
2741
2753
  ...overrides,
2742
2754
  },
2743
2755
  },
@@ -3144,21 +3156,21 @@ async function typescript(options) {
3144
3156
  modifiers: ["destructured"],
3145
3157
  },
3146
3158
  {
3147
- selector: "memberLike",
3159
+ selector: ["autoAccessor", "parameterProperty", "property"],
3148
3160
  filter: { regex: "^[A-Z0-9_]+$", match: true },
3149
3161
  format: ["UPPER_CASE"],
3150
3162
  leadingUnderscore: "forbid",
3151
3163
  trailingUnderscore: "forbid",
3152
3164
  },
3153
3165
  {
3154
- selector: "memberLike",
3166
+ selector: ["autoAccessor", "parameterProperty", "property"],
3155
3167
  format: ["camelCase", "PascalCase"],
3156
3168
  prefix: ["m_", "M_"],
3157
3169
  leadingUnderscore: "forbid",
3158
3170
  trailingUnderscore: "forbid",
3159
3171
  },
3160
3172
  {
3161
- selector: "memberLike",
3173
+ selector: ["autoAccessor", "parameterProperty", "property"],
3162
3174
  filter: { regex: "_[^_]+", match: true },
3163
3175
  format: ["camelCase", "PascalCase"],
3164
3176
  modifiers: ["readonly"],
@@ -3167,7 +3179,7 @@ async function typescript(options) {
3167
3179
  trailingUnderscore: "forbid",
3168
3180
  },
3169
3181
  {
3170
- selector: "memberLike",
3182
+ selector: ["autoAccessor", "parameterProperty", "property"],
3171
3183
  format: ["camelCase", "PascalCase", "UPPER_CASE"],
3172
3184
  modifiers: ["readonly"],
3173
3185
  leadingUnderscore: "allow",
@@ -3765,6 +3777,7 @@ async function rsEslint(options, ...userConfigs) {
3765
3777
  }
3766
3778
  if (tailwindOptions !== false) {
3767
3779
  m_configs.push(tailwind({
3780
+ stylistic: stylisticOptions,
3768
3781
  overrides: getOverrides(options, "tailwind"),
3769
3782
  }));
3770
3783
  }
package/dist/index.d.cts CHANGED
@@ -2804,62 +2804,62 @@ interface RuleOptions {
2804
2804
  * Enforce consistent line wrapping for tailwind classes.
2805
2805
  * @see https://github.com/schoero/eslint-plugin-readable-tailwind/blob/main/docs/rules/multiline.md
2806
2806
  */
2807
- "tailwindcss-readable/multiline"?: Linter.RuleEntry<TailwindcssReadableMultiline>;
2807
+ "tailwind-readable/multiline"?: Linter.RuleEntry<TailwindReadableMultiline>;
2808
2808
  /**
2809
2809
  * Disallow duplicate class names in tailwind classes.
2810
2810
  * @see https://github.com/schoero/eslint-plugin-readable-tailwind/blob/main/docs/rules/no-duplicate-classes.md
2811
2811
  */
2812
- "tailwindcss-readable/no-duplicate-classes"?: Linter.RuleEntry<TailwindcssReadableNoDuplicateClasses>;
2812
+ "tailwind-readable/no-duplicate-classes"?: Linter.RuleEntry<TailwindReadableNoDuplicateClasses>;
2813
2813
  /**
2814
2814
  * Disallow unnecessary whitespace in tailwind classes.
2815
2815
  * @see https://github.com/schoero/eslint-plugin-readable-tailwind/blob/main/docs/rules/no-unnecessary-whitespace.md
2816
2816
  */
2817
- "tailwindcss-readable/no-unnecessary-whitespace"?: Linter.RuleEntry<TailwindcssReadableNoUnnecessaryWhitespace>;
2817
+ "tailwind-readable/no-unnecessary-whitespace"?: Linter.RuleEntry<TailwindReadableNoUnnecessaryWhitespace>;
2818
2818
  /**
2819
2819
  * Enforce a consistent order for tailwind classes.
2820
2820
  * @see https://github.com/schoero/eslint-plugin-readable-tailwind/blob/main/docs/rules/sort-classes.md
2821
2821
  */
2822
- "tailwindcss-readable/sort-classes"?: Linter.RuleEntry<TailwindcssReadableSortClasses>;
2822
+ "tailwind-readable/sort-classes"?: Linter.RuleEntry<TailwindReadableSortClasses>;
2823
2823
  /**
2824
2824
  * Enforce a consistent and logical order of the Tailwind CSS classnames
2825
2825
  * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/classnames-order.md
2826
2826
  */
2827
- "tailwindcss/classnames-order"?: Linter.RuleEntry<TailwindcssClassnamesOrder>;
2827
+ "tailwind/classnames-order"?: Linter.RuleEntry<TailwindClassnamesOrder>;
2828
2828
  /**
2829
2829
  * Warns about dash prefixed classnames using arbitrary values
2830
2830
  * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/enforces-negative-arbitrary-values.md
2831
2831
  */
2832
- "tailwindcss/enforces-negative-arbitrary-values"?: Linter.RuleEntry<TailwindcssEnforcesNegativeArbitraryValues>;
2832
+ "tailwind/enforces-negative-arbitrary-values"?: Linter.RuleEntry<TailwindEnforcesNegativeArbitraryValues>;
2833
2833
  /**
2834
2834
  * Enforces the usage of shorthand Tailwind CSS classnames
2835
2835
  * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/enforces-shorthand.md
2836
2836
  */
2837
- "tailwindcss/enforces-shorthand"?: Linter.RuleEntry<TailwindcssEnforcesShorthand>;
2837
+ "tailwind/enforces-shorthand"?: Linter.RuleEntry<TailwindEnforcesShorthand>;
2838
2838
  /**
2839
2839
  * Detect obsolete classnames when upgrading to Tailwind CSS v3
2840
2840
  * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/migration-from-tailwind-2.md
2841
2841
  */
2842
- "tailwindcss/migration-from-tailwind-2"?: Linter.RuleEntry<TailwindcssMigrationFromTailwind2>;
2842
+ "tailwind/migration-from-tailwind-2"?: Linter.RuleEntry<TailwindMigrationFromTailwind2>;
2843
2843
  /**
2844
2844
  * Forbid using arbitrary values in classnames
2845
2845
  * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/no-arbitrary-value.md
2846
2846
  */
2847
- "tailwindcss/no-arbitrary-value"?: Linter.RuleEntry<TailwindcssNoArbitraryValue>;
2847
+ "tailwind/no-arbitrary-value"?: Linter.RuleEntry<TailwindNoArbitraryValue>;
2848
2848
  /**
2849
2849
  * Avoid contradicting Tailwind CSS classnames (e.g. "w-3 w-5")
2850
2850
  * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/no-contradicting-classname.md
2851
2851
  */
2852
- "tailwindcss/no-contradicting-classname"?: Linter.RuleEntry<TailwindcssNoContradictingClassname>;
2852
+ "tailwind/no-contradicting-classname"?: Linter.RuleEntry<TailwindNoContradictingClassname>;
2853
2853
  /**
2854
2854
  * Detect classnames which do not belong to Tailwind CSS
2855
2855
  * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/no-custom-classname.md
2856
2856
  */
2857
- "tailwindcss/no-custom-classname"?: Linter.RuleEntry<TailwindcssNoCustomClassname>;
2857
+ "tailwind/no-custom-classname"?: Linter.RuleEntry<TailwindNoCustomClassname>;
2858
2858
  /**
2859
2859
  * Forbid using arbitrary values in classnames when an equivalent preset exists
2860
2860
  * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/no-unnecessary-arbitrary-value.md
2861
2861
  */
2862
- "tailwindcss/no-unnecessary-arbitrary-value"?: Linter.RuleEntry<TailwindcssNoUnnecessaryArbitraryValue>;
2862
+ "tailwind/no-unnecessary-arbitrary-value"?: Linter.RuleEntry<TailwindNoUnnecessaryArbitraryValue>;
2863
2863
  /**
2864
2864
  * require .spec test file pattern
2865
2865
  * @see https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/consistent-test-filename.md
@@ -10233,8 +10233,8 @@ type StyleYieldStarSpacing = [
10233
10233
  after?: boolean;
10234
10234
  })
10235
10235
  ];
10236
- // ----- tailwindcss-readable/multiline -----
10237
- type TailwindcssReadableMultiline = [
10236
+ // ----- tailwind-readable/multiline -----
10237
+ type TailwindReadableMultiline = [
10238
10238
  ] | [
10239
10239
  {
10240
10240
  callees?: ([
@@ -10316,8 +10316,8 @@ type TailwindcssReadableMultiline = [
10316
10316
  printWidth?: number;
10317
10317
  }
10318
10318
  ];
10319
- // ----- tailwindcss-readable/no-duplicate-classes -----
10320
- type TailwindcssReadableNoDuplicateClasses = [
10319
+ // ----- tailwind-readable/no-duplicate-classes -----
10320
+ type TailwindReadableNoDuplicateClasses = [
10321
10321
  ] | [
10322
10322
  {
10323
10323
  callees?: ([
@@ -10394,8 +10394,8 @@ type TailwindcssReadableNoDuplicateClasses = [
10394
10394
  ] | string)[];
10395
10395
  }
10396
10396
  ];
10397
- // ----- tailwindcss-readable/no-unnecessary-whitespace -----
10398
- type TailwindcssReadableNoUnnecessaryWhitespace = [
10397
+ // ----- tailwind-readable/no-unnecessary-whitespace -----
10398
+ type TailwindReadableNoUnnecessaryWhitespace = [
10399
10399
  ] | [
10400
10400
  {
10401
10401
  allowMultiline?: boolean;
@@ -10473,8 +10473,8 @@ type TailwindcssReadableNoUnnecessaryWhitespace = [
10473
10473
  ] | string)[];
10474
10474
  }
10475
10475
  ];
10476
- // ----- tailwindcss-readable/sort-classes -----
10477
- type TailwindcssReadableSortClasses = [
10476
+ // ----- tailwind-readable/sort-classes -----
10477
+ type TailwindReadableSortClasses = [
10478
10478
  ] | [
10479
10479
  {
10480
10480
  callees?: ([
@@ -10553,8 +10553,8 @@ type TailwindcssReadableSortClasses = [
10553
10553
  tailwindConfig?: string;
10554
10554
  }
10555
10555
  ];
10556
- // ----- tailwindcss/classnames-order -----
10557
- type TailwindcssClassnamesOrder = [
10556
+ // ----- tailwind/classnames-order -----
10557
+ type TailwindClassnamesOrder = [
10558
10558
  ] | [
10559
10559
  {
10560
10560
  callees?: string[];
@@ -10567,8 +10567,8 @@ type TailwindcssClassnamesOrder = [
10567
10567
  [k: string]: unknown | undefined;
10568
10568
  }
10569
10569
  ];
10570
- // ----- tailwindcss/enforces-negative-arbitrary-values -----
10571
- type TailwindcssEnforcesNegativeArbitraryValues = [
10570
+ // ----- tailwind/enforces-negative-arbitrary-values -----
10571
+ type TailwindEnforcesNegativeArbitraryValues = [
10572
10572
  ] | [
10573
10573
  {
10574
10574
  callees?: string[];
@@ -10580,8 +10580,8 @@ type TailwindcssEnforcesNegativeArbitraryValues = [
10580
10580
  [k: string]: unknown | undefined;
10581
10581
  }
10582
10582
  ];
10583
- // ----- tailwindcss/enforces-shorthand -----
10584
- type TailwindcssEnforcesShorthand = [
10583
+ // ----- tailwind/enforces-shorthand -----
10584
+ type TailwindEnforcesShorthand = [
10585
10585
  ] | [
10586
10586
  {
10587
10587
  callees?: string[];
@@ -10593,8 +10593,8 @@ type TailwindcssEnforcesShorthand = [
10593
10593
  [k: string]: unknown | undefined;
10594
10594
  }
10595
10595
  ];
10596
- // ----- tailwindcss/migration-from-tailwind-2 -----
10597
- type TailwindcssMigrationFromTailwind2 = [
10596
+ // ----- tailwind/migration-from-tailwind-2 -----
10597
+ type TailwindMigrationFromTailwind2 = [
10598
10598
  ] | [
10599
10599
  {
10600
10600
  callees?: string[];
@@ -10606,8 +10606,8 @@ type TailwindcssMigrationFromTailwind2 = [
10606
10606
  [k: string]: unknown | undefined;
10607
10607
  }
10608
10608
  ];
10609
- // ----- tailwindcss/no-arbitrary-value -----
10610
- type TailwindcssNoArbitraryValue = [
10609
+ // ----- tailwind/no-arbitrary-value -----
10610
+ type TailwindNoArbitraryValue = [
10611
10611
  ] | [
10612
10612
  {
10613
10613
  callees?: string[];
@@ -10619,8 +10619,8 @@ type TailwindcssNoArbitraryValue = [
10619
10619
  [k: string]: unknown | undefined;
10620
10620
  }
10621
10621
  ];
10622
- // ----- tailwindcss/no-contradicting-classname -----
10623
- type TailwindcssNoContradictingClassname = [
10622
+ // ----- tailwind/no-contradicting-classname -----
10623
+ type TailwindNoContradictingClassname = [
10624
10624
  ] | [
10625
10625
  {
10626
10626
  callees?: string[];
@@ -10632,8 +10632,8 @@ type TailwindcssNoContradictingClassname = [
10632
10632
  [k: string]: unknown | undefined;
10633
10633
  }
10634
10634
  ];
10635
- // ----- tailwindcss/no-custom-classname -----
10636
- type TailwindcssNoCustomClassname = [
10635
+ // ----- tailwind/no-custom-classname -----
10636
+ type TailwindNoCustomClassname = [
10637
10637
  ] | [
10638
10638
  {
10639
10639
  callees?: string[];
@@ -10648,8 +10648,8 @@ type TailwindcssNoCustomClassname = [
10648
10648
  [k: string]: unknown | undefined;
10649
10649
  }
10650
10650
  ];
10651
- // ----- tailwindcss/no-unnecessary-arbitrary-value -----
10652
- type TailwindcssNoUnnecessaryArbitraryValue = [
10651
+ // ----- tailwind/no-unnecessary-arbitrary-value -----
10652
+ type TailwindNoUnnecessaryArbitraryValue = [
10653
10653
  ] | [
10654
10654
  {
10655
10655
  callees?: string[];
@@ -14498,7 +14498,9 @@ type OptionsStylistic = {
14498
14498
  type RequiredOptionsStylistic = {
14499
14499
  stylistic: Required<StylisticConfig> | false;
14500
14500
  };
14501
- type StylisticConfig = {} & Pick<StylisticCustomizeOptions, "indent" | "quotes" | "jsx" | "semi">;
14501
+ type StylisticConfig = {
14502
+ printWidth?: number;
14503
+ } & Pick<StylisticCustomizeOptions, "indent" | "quotes" | "jsx" | "semi">;
14502
14504
  type OptionsOverrides = {
14503
14505
  overrides?: FlatConfigItem["rules"];
14504
14506
  };
@@ -14664,7 +14666,7 @@ declare const StylisticConfigDefaults: Required<StylisticConfig>;
14664
14666
  declare function stylistic(options: Readonly<Required<{
14665
14667
  stylistic: Required<StylisticConfig>;
14666
14668
  } & OptionsOverrides & OptionsHasTypeScript>>): Promise<FlatConfigItem[]>;
14667
- declare function tailwind(options: Readonly<Required<OptionsTailwindCSS>>): Promise<FlatConfigItem[]>;
14669
+ declare function tailwind(options: Readonly<Required<OptionsTailwindCSS> & RequiredOptionsStylistic>): Promise<FlatConfigItem[]>;
14668
14670
  declare function test(options: Readonly<Required<OptionsFiles & OptionsOverrides>>): Promise<FlatConfigItem[]>;
14669
14671
  declare function toml(options: Readonly<Required<OptionsOverrides & RequiredOptionsStylistic & OptionsFiles>>): Promise<FlatConfigItem[]>;
14670
14672
  declare const defaultFilesTypesAware: string[];
package/dist/index.d.mts CHANGED
@@ -2804,62 +2804,62 @@ interface RuleOptions {
2804
2804
  * Enforce consistent line wrapping for tailwind classes.
2805
2805
  * @see https://github.com/schoero/eslint-plugin-readable-tailwind/blob/main/docs/rules/multiline.md
2806
2806
  */
2807
- "tailwindcss-readable/multiline"?: Linter.RuleEntry<TailwindcssReadableMultiline>;
2807
+ "tailwind-readable/multiline"?: Linter.RuleEntry<TailwindReadableMultiline>;
2808
2808
  /**
2809
2809
  * Disallow duplicate class names in tailwind classes.
2810
2810
  * @see https://github.com/schoero/eslint-plugin-readable-tailwind/blob/main/docs/rules/no-duplicate-classes.md
2811
2811
  */
2812
- "tailwindcss-readable/no-duplicate-classes"?: Linter.RuleEntry<TailwindcssReadableNoDuplicateClasses>;
2812
+ "tailwind-readable/no-duplicate-classes"?: Linter.RuleEntry<TailwindReadableNoDuplicateClasses>;
2813
2813
  /**
2814
2814
  * Disallow unnecessary whitespace in tailwind classes.
2815
2815
  * @see https://github.com/schoero/eslint-plugin-readable-tailwind/blob/main/docs/rules/no-unnecessary-whitespace.md
2816
2816
  */
2817
- "tailwindcss-readable/no-unnecessary-whitespace"?: Linter.RuleEntry<TailwindcssReadableNoUnnecessaryWhitespace>;
2817
+ "tailwind-readable/no-unnecessary-whitespace"?: Linter.RuleEntry<TailwindReadableNoUnnecessaryWhitespace>;
2818
2818
  /**
2819
2819
  * Enforce a consistent order for tailwind classes.
2820
2820
  * @see https://github.com/schoero/eslint-plugin-readable-tailwind/blob/main/docs/rules/sort-classes.md
2821
2821
  */
2822
- "tailwindcss-readable/sort-classes"?: Linter.RuleEntry<TailwindcssReadableSortClasses>;
2822
+ "tailwind-readable/sort-classes"?: Linter.RuleEntry<TailwindReadableSortClasses>;
2823
2823
  /**
2824
2824
  * Enforce a consistent and logical order of the Tailwind CSS classnames
2825
2825
  * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/classnames-order.md
2826
2826
  */
2827
- "tailwindcss/classnames-order"?: Linter.RuleEntry<TailwindcssClassnamesOrder>;
2827
+ "tailwind/classnames-order"?: Linter.RuleEntry<TailwindClassnamesOrder>;
2828
2828
  /**
2829
2829
  * Warns about dash prefixed classnames using arbitrary values
2830
2830
  * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/enforces-negative-arbitrary-values.md
2831
2831
  */
2832
- "tailwindcss/enforces-negative-arbitrary-values"?: Linter.RuleEntry<TailwindcssEnforcesNegativeArbitraryValues>;
2832
+ "tailwind/enforces-negative-arbitrary-values"?: Linter.RuleEntry<TailwindEnforcesNegativeArbitraryValues>;
2833
2833
  /**
2834
2834
  * Enforces the usage of shorthand Tailwind CSS classnames
2835
2835
  * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/enforces-shorthand.md
2836
2836
  */
2837
- "tailwindcss/enforces-shorthand"?: Linter.RuleEntry<TailwindcssEnforcesShorthand>;
2837
+ "tailwind/enforces-shorthand"?: Linter.RuleEntry<TailwindEnforcesShorthand>;
2838
2838
  /**
2839
2839
  * Detect obsolete classnames when upgrading to Tailwind CSS v3
2840
2840
  * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/migration-from-tailwind-2.md
2841
2841
  */
2842
- "tailwindcss/migration-from-tailwind-2"?: Linter.RuleEntry<TailwindcssMigrationFromTailwind2>;
2842
+ "tailwind/migration-from-tailwind-2"?: Linter.RuleEntry<TailwindMigrationFromTailwind2>;
2843
2843
  /**
2844
2844
  * Forbid using arbitrary values in classnames
2845
2845
  * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/no-arbitrary-value.md
2846
2846
  */
2847
- "tailwindcss/no-arbitrary-value"?: Linter.RuleEntry<TailwindcssNoArbitraryValue>;
2847
+ "tailwind/no-arbitrary-value"?: Linter.RuleEntry<TailwindNoArbitraryValue>;
2848
2848
  /**
2849
2849
  * Avoid contradicting Tailwind CSS classnames (e.g. "w-3 w-5")
2850
2850
  * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/no-contradicting-classname.md
2851
2851
  */
2852
- "tailwindcss/no-contradicting-classname"?: Linter.RuleEntry<TailwindcssNoContradictingClassname>;
2852
+ "tailwind/no-contradicting-classname"?: Linter.RuleEntry<TailwindNoContradictingClassname>;
2853
2853
  /**
2854
2854
  * Detect classnames which do not belong to Tailwind CSS
2855
2855
  * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/no-custom-classname.md
2856
2856
  */
2857
- "tailwindcss/no-custom-classname"?: Linter.RuleEntry<TailwindcssNoCustomClassname>;
2857
+ "tailwind/no-custom-classname"?: Linter.RuleEntry<TailwindNoCustomClassname>;
2858
2858
  /**
2859
2859
  * Forbid using arbitrary values in classnames when an equivalent preset exists
2860
2860
  * @see https://github.com/francoismassart/eslint-plugin-tailwindcss/tree/master/docs/rules/no-unnecessary-arbitrary-value.md
2861
2861
  */
2862
- "tailwindcss/no-unnecessary-arbitrary-value"?: Linter.RuleEntry<TailwindcssNoUnnecessaryArbitraryValue>;
2862
+ "tailwind/no-unnecessary-arbitrary-value"?: Linter.RuleEntry<TailwindNoUnnecessaryArbitraryValue>;
2863
2863
  /**
2864
2864
  * require .spec test file pattern
2865
2865
  * @see https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/consistent-test-filename.md
@@ -10233,8 +10233,8 @@ type StyleYieldStarSpacing = [
10233
10233
  after?: boolean;
10234
10234
  })
10235
10235
  ];
10236
- // ----- tailwindcss-readable/multiline -----
10237
- type TailwindcssReadableMultiline = [
10236
+ // ----- tailwind-readable/multiline -----
10237
+ type TailwindReadableMultiline = [
10238
10238
  ] | [
10239
10239
  {
10240
10240
  callees?: ([
@@ -10316,8 +10316,8 @@ type TailwindcssReadableMultiline = [
10316
10316
  printWidth?: number;
10317
10317
  }
10318
10318
  ];
10319
- // ----- tailwindcss-readable/no-duplicate-classes -----
10320
- type TailwindcssReadableNoDuplicateClasses = [
10319
+ // ----- tailwind-readable/no-duplicate-classes -----
10320
+ type TailwindReadableNoDuplicateClasses = [
10321
10321
  ] | [
10322
10322
  {
10323
10323
  callees?: ([
@@ -10394,8 +10394,8 @@ type TailwindcssReadableNoDuplicateClasses = [
10394
10394
  ] | string)[];
10395
10395
  }
10396
10396
  ];
10397
- // ----- tailwindcss-readable/no-unnecessary-whitespace -----
10398
- type TailwindcssReadableNoUnnecessaryWhitespace = [
10397
+ // ----- tailwind-readable/no-unnecessary-whitespace -----
10398
+ type TailwindReadableNoUnnecessaryWhitespace = [
10399
10399
  ] | [
10400
10400
  {
10401
10401
  allowMultiline?: boolean;
@@ -10473,8 +10473,8 @@ type TailwindcssReadableNoUnnecessaryWhitespace = [
10473
10473
  ] | string)[];
10474
10474
  }
10475
10475
  ];
10476
- // ----- tailwindcss-readable/sort-classes -----
10477
- type TailwindcssReadableSortClasses = [
10476
+ // ----- tailwind-readable/sort-classes -----
10477
+ type TailwindReadableSortClasses = [
10478
10478
  ] | [
10479
10479
  {
10480
10480
  callees?: ([
@@ -10553,8 +10553,8 @@ type TailwindcssReadableSortClasses = [
10553
10553
  tailwindConfig?: string;
10554
10554
  }
10555
10555
  ];
10556
- // ----- tailwindcss/classnames-order -----
10557
- type TailwindcssClassnamesOrder = [
10556
+ // ----- tailwind/classnames-order -----
10557
+ type TailwindClassnamesOrder = [
10558
10558
  ] | [
10559
10559
  {
10560
10560
  callees?: string[];
@@ -10567,8 +10567,8 @@ type TailwindcssClassnamesOrder = [
10567
10567
  [k: string]: unknown | undefined;
10568
10568
  }
10569
10569
  ];
10570
- // ----- tailwindcss/enforces-negative-arbitrary-values -----
10571
- type TailwindcssEnforcesNegativeArbitraryValues = [
10570
+ // ----- tailwind/enforces-negative-arbitrary-values -----
10571
+ type TailwindEnforcesNegativeArbitraryValues = [
10572
10572
  ] | [
10573
10573
  {
10574
10574
  callees?: string[];
@@ -10580,8 +10580,8 @@ type TailwindcssEnforcesNegativeArbitraryValues = [
10580
10580
  [k: string]: unknown | undefined;
10581
10581
  }
10582
10582
  ];
10583
- // ----- tailwindcss/enforces-shorthand -----
10584
- type TailwindcssEnforcesShorthand = [
10583
+ // ----- tailwind/enforces-shorthand -----
10584
+ type TailwindEnforcesShorthand = [
10585
10585
  ] | [
10586
10586
  {
10587
10587
  callees?: string[];
@@ -10593,8 +10593,8 @@ type TailwindcssEnforcesShorthand = [
10593
10593
  [k: string]: unknown | undefined;
10594
10594
  }
10595
10595
  ];
10596
- // ----- tailwindcss/migration-from-tailwind-2 -----
10597
- type TailwindcssMigrationFromTailwind2 = [
10596
+ // ----- tailwind/migration-from-tailwind-2 -----
10597
+ type TailwindMigrationFromTailwind2 = [
10598
10598
  ] | [
10599
10599
  {
10600
10600
  callees?: string[];
@@ -10606,8 +10606,8 @@ type TailwindcssMigrationFromTailwind2 = [
10606
10606
  [k: string]: unknown | undefined;
10607
10607
  }
10608
10608
  ];
10609
- // ----- tailwindcss/no-arbitrary-value -----
10610
- type TailwindcssNoArbitraryValue = [
10609
+ // ----- tailwind/no-arbitrary-value -----
10610
+ type TailwindNoArbitraryValue = [
10611
10611
  ] | [
10612
10612
  {
10613
10613
  callees?: string[];
@@ -10619,8 +10619,8 @@ type TailwindcssNoArbitraryValue = [
10619
10619
  [k: string]: unknown | undefined;
10620
10620
  }
10621
10621
  ];
10622
- // ----- tailwindcss/no-contradicting-classname -----
10623
- type TailwindcssNoContradictingClassname = [
10622
+ // ----- tailwind/no-contradicting-classname -----
10623
+ type TailwindNoContradictingClassname = [
10624
10624
  ] | [
10625
10625
  {
10626
10626
  callees?: string[];
@@ -10632,8 +10632,8 @@ type TailwindcssNoContradictingClassname = [
10632
10632
  [k: string]: unknown | undefined;
10633
10633
  }
10634
10634
  ];
10635
- // ----- tailwindcss/no-custom-classname -----
10636
- type TailwindcssNoCustomClassname = [
10635
+ // ----- tailwind/no-custom-classname -----
10636
+ type TailwindNoCustomClassname = [
10637
10637
  ] | [
10638
10638
  {
10639
10639
  callees?: string[];
@@ -10648,8 +10648,8 @@ type TailwindcssNoCustomClassname = [
10648
10648
  [k: string]: unknown | undefined;
10649
10649
  }
10650
10650
  ];
10651
- // ----- tailwindcss/no-unnecessary-arbitrary-value -----
10652
- type TailwindcssNoUnnecessaryArbitraryValue = [
10651
+ // ----- tailwind/no-unnecessary-arbitrary-value -----
10652
+ type TailwindNoUnnecessaryArbitraryValue = [
10653
10653
  ] | [
10654
10654
  {
10655
10655
  callees?: string[];
@@ -14498,7 +14498,9 @@ type OptionsStylistic = {
14498
14498
  type RequiredOptionsStylistic = {
14499
14499
  stylistic: Required<StylisticConfig> | false;
14500
14500
  };
14501
- type StylisticConfig = {} & Pick<StylisticCustomizeOptions, "indent" | "quotes" | "jsx" | "semi">;
14501
+ type StylisticConfig = {
14502
+ printWidth?: number;
14503
+ } & Pick<StylisticCustomizeOptions, "indent" | "quotes" | "jsx" | "semi">;
14502
14504
  type OptionsOverrides = {
14503
14505
  overrides?: FlatConfigItem["rules"];
14504
14506
  };
@@ -14664,7 +14666,7 @@ declare const StylisticConfigDefaults: Required<StylisticConfig>;
14664
14666
  declare function stylistic(options: Readonly<Required<{
14665
14667
  stylistic: Required<StylisticConfig>;
14666
14668
  } & OptionsOverrides & OptionsHasTypeScript>>): Promise<FlatConfigItem[]>;
14667
- declare function tailwind(options: Readonly<Required<OptionsTailwindCSS>>): Promise<FlatConfigItem[]>;
14669
+ declare function tailwind(options: Readonly<Required<OptionsTailwindCSS> & RequiredOptionsStylistic>): Promise<FlatConfigItem[]>;
14668
14670
  declare function test(options: Readonly<Required<OptionsFiles & OptionsOverrides>>): Promise<FlatConfigItem[]>;
14669
14671
  declare function toml(options: Readonly<Required<OptionsOverrides & RequiredOptionsStylistic & OptionsFiles>>): Promise<FlatConfigItem[]>;
14670
14672
  declare const defaultFilesTypesAware: string[];
package/dist/index.mjs CHANGED
@@ -206,10 +206,10 @@ async function formatters(opts, stylistic) {
206
206
  if (options.slidev !== false && options.slidev !== undefined && options.markdown !== true) {
207
207
  throw new Error("`slidev` option only works when `markdown` is enabled with `prettier`");
208
208
  }
209
- const { indent, quotes, semi } = stylistic;
209
+ const { indent, printWidth, quotes, semi } = stylistic;
210
210
  const prettierOptions = Object.assign({
211
211
  endOfLine: "lf",
212
- printWidth: 120,
212
+ printWidth: printWidth ?? 120,
213
213
  semi: semi ?? true,
214
214
  singleQuote: quotes === "single",
215
215
  tabWidth: typeof indent === "number" ? indent : 2,
@@ -2462,6 +2462,7 @@ const StylisticConfigDefaults = {
2462
2462
  jsx: true,
2463
2463
  quotes: "double",
2464
2464
  semi: true,
2465
+ printWidth: 120,
2465
2466
  };
2466
2467
  async function stylistic(options) {
2467
2468
  const { stylistic: { indent, jsx, quotes, semi }, overrides, typescript, } = options;
@@ -2694,7 +2695,7 @@ async function stylistic(options) {
2694
2695
  }
2695
2696
 
2696
2697
  async function tailwind(options) {
2697
- const { overrides } = options;
2698
+ const { overrides, stylistic } = options;
2698
2699
  const [pluginTailwindCSS, pluginReadableTailwind] = (await loadPackages([
2699
2700
  "eslint-plugin-tailwindcss",
2700
2701
  "eslint-plugin-readable-tailwind",
@@ -2703,19 +2704,30 @@ async function tailwind(options) {
2703
2704
  {
2704
2705
  name: "js:tailwindcss",
2705
2706
  plugins: {
2706
- tailwindcss: pluginTailwindCSS,
2707
- "tailwindcss-readable": pluginReadableTailwind,
2707
+ tailwind: pluginTailwindCSS,
2708
+ "tailwind-readable": pluginReadableTailwind,
2708
2709
  },
2709
2710
  rules: {
2710
- "tailwindcss/classnames-order": "warn",
2711
- "tailwindcss/enforces-negative-arbitrary-values": "warn",
2712
- "tailwindcss/enforces-shorthand": "warn",
2713
- "tailwindcss/no-arbitrary-value": "off",
2714
- "tailwindcss/no-custom-classname": "off",
2715
- "tailwindcss/no-contradicting-classname": "error",
2716
- "tailwindcss/no-unnecessary-arbitrary-value": "warn",
2717
- "tailwindcss-readable/multiline": "warn",
2718
- "tailwindcss-readable/no-unnecessary-whitespace": "warn",
2711
+ "tailwind/no-contradicting-classname": "error",
2712
+ "tailwind/no-arbitrary-value": "off",
2713
+ "tailwind/no-custom-classname": "off",
2714
+ ...(stylistic === false
2715
+ ? {}
2716
+ : {
2717
+ "tailwind/classnames-order": "warn",
2718
+ "tailwind/enforces-negative-arbitrary-values": "warn",
2719
+ "tailwind/enforces-shorthand": "warn",
2720
+ "tailwind/no-unnecessary-arbitrary-value": "warn",
2721
+ "tailwind-readable/multiline": [
2722
+ "warn",
2723
+ {
2724
+ group: "newLine",
2725
+ indent: stylistic.indent,
2726
+ printWidth: stylistic.printWidth,
2727
+ },
2728
+ ],
2729
+ "tailwind-readable/no-unnecessary-whitespace": "warn",
2730
+ }),
2719
2731
  ...overrides,
2720
2732
  },
2721
2733
  },
@@ -3122,21 +3134,21 @@ async function typescript(options) {
3122
3134
  modifiers: ["destructured"],
3123
3135
  },
3124
3136
  {
3125
- selector: "memberLike",
3137
+ selector: ["autoAccessor", "parameterProperty", "property"],
3126
3138
  filter: { regex: "^[A-Z0-9_]+$", match: true },
3127
3139
  format: ["UPPER_CASE"],
3128
3140
  leadingUnderscore: "forbid",
3129
3141
  trailingUnderscore: "forbid",
3130
3142
  },
3131
3143
  {
3132
- selector: "memberLike",
3144
+ selector: ["autoAccessor", "parameterProperty", "property"],
3133
3145
  format: ["camelCase", "PascalCase"],
3134
3146
  prefix: ["m_", "M_"],
3135
3147
  leadingUnderscore: "forbid",
3136
3148
  trailingUnderscore: "forbid",
3137
3149
  },
3138
3150
  {
3139
- selector: "memberLike",
3151
+ selector: ["autoAccessor", "parameterProperty", "property"],
3140
3152
  filter: { regex: "_[^_]+", match: true },
3141
3153
  format: ["camelCase", "PascalCase"],
3142
3154
  modifiers: ["readonly"],
@@ -3145,7 +3157,7 @@ async function typescript(options) {
3145
3157
  trailingUnderscore: "forbid",
3146
3158
  },
3147
3159
  {
3148
- selector: "memberLike",
3160
+ selector: ["autoAccessor", "parameterProperty", "property"],
3149
3161
  format: ["camelCase", "PascalCase", "UPPER_CASE"],
3150
3162
  modifiers: ["readonly"],
3151
3163
  leadingUnderscore: "allow",
@@ -3743,6 +3755,7 @@ async function rsEslint(options, ...userConfigs) {
3743
3755
  }
3744
3756
  if (tailwindOptions !== false) {
3745
3757
  m_configs.push(tailwind({
3758
+ stylistic: stylisticOptions,
3746
3759
  overrides: getOverrides(options, "tailwind"),
3747
3760
  }));
3748
3761
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rebeccastevens/eslint-config",
3
- "version": "3.2.0",
3
+ "version": "3.2.2",
4
4
  "description": "My ESLint shareable config.",
5
5
  "keywords": [
6
6
  "eslint config"