oxlint-tailwindcss 1.15.1 → 1.17.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 CHANGED
@@ -4,7 +4,7 @@ let node_crypto = require("node:crypto");
4
4
  let node_fs = require("node:fs");
5
5
  let node_path = require("node:path");
6
6
  let node_os = require("node:os");
7
- //#region ../../node_modules/.pnpm/@oxlint+plugins@1.87.0/node_modules/@oxlint/plugins/index.js
7
+ // ../../node_modules/.pnpm/@oxlint+plugins@1.89.0/node_modules/@oxlint/plugins/index.js
8
8
  /**
9
9
  * Define a plugin.
10
10
  *
@@ -68,8 +68,7 @@ Object.freeze({
68
68
  throw Error("Cannot access `context.parserPath` in `createOnce`");
69
69
  }
70
70
  });
71
- //#endregion
72
- //#region src/utils/rule-docs.ts
71
+ // src/utils/rule-docs.ts
73
72
  const DOCS_URL = "https://oxlint-tailwindcss.pages.dev";
74
73
  function ruleDocs(name, docs) {
75
74
  return {
@@ -77,8 +76,7 @@ function ruleDocs(name, docs) {
77
76
  url: `${DOCS_URL}/rules/${name}`
78
77
  };
79
78
  }
80
- //#endregion
81
- //#region src/utils/allowlist.ts
79
+ // src/utils/allowlist.ts
82
80
  /**
83
81
  * Shared regex-allowlist helpers for options and settings that take regex
84
82
  * source strings: the directional rules' `allowlist`, `no-conflicting-classes`'
@@ -98,8 +96,7 @@ function compileRegexList(patterns) {
98
96
  function matchesAny(value, list) {
99
97
  return list.some((re) => re.test(value));
100
98
  }
101
- //#endregion
102
- //#region src/utils/context.ts
99
+ // src/utils/context.ts
103
100
  /**
104
101
  * Safely read `context.options[0]`. Returns `undefined` if the getter throws
105
102
  * (oxlint < 1.31.0) or if options aren't populated yet.
@@ -247,8 +244,7 @@ function createLazySettings(context, compile) {
247
244
  function settingsKey(settings) {
248
245
  return JSON.stringify(settings?.tailwindcss) ?? "";
249
246
  }
250
- //#endregion
251
- //#region src/utils/css-properties.ts
247
+ // src/utils/css-properties.ts
252
248
  /**
253
249
  * CSS property names (standard, SVG and `-ms-`), from csstype's `*PropertiesHyphen`
254
250
  * interfaces, minus the 15 that are also Tailwind classes (`flex`, `grid`, `border`,
@@ -365,8 +361,7 @@ const CSS_PROPERTY_NAMES = new Set(`
365
361
  view-transition-name visibility white-space white-space-collapse widows width will-change
366
362
  word-break word-spacing word-wrap writing-mode x y z-index zoom
367
363
  `.trim().split(/\s+/));
368
- //#endregion
369
- //#region src/utils/levenshtein.ts
364
+ // src/utils/levenshtein.ts
370
365
  let bufA = /* @__PURE__ */ new Int32Array(64);
371
366
  let bufB = /* @__PURE__ */ new Int32Array(64);
372
367
  let bufC = /* @__PURE__ */ new Int32Array(64);
@@ -445,8 +440,7 @@ function findBestSuggestion(input, candidates, maxDistance = 3) {
445
440
  }
446
441
  return best;
447
442
  }
448
- //#endregion
449
- //#region src/utils/settings-check.ts
443
+ // src/utils/settings-check.ts
450
444
  const SETTINGS_MESSAGE_ID = "invalidSetting";
451
445
  /** Pre-shaped entry for `meta.messages`: `messages: { ..., ...SETTINGS_MESSAGE }`. */
452
446
  const SETTINGS_MESSAGE = { [SETTINGS_MESSAGE_ID]: "{{message}}" };
@@ -462,6 +456,7 @@ const CHECKS = {
462
456
  calleeExtractors: "extractors",
463
457
  tags: "strings",
464
458
  variablePatterns: "regexes",
459
+ lookupTablePatterns: "regexes",
465
460
  exclude: "exclude"
466
461
  };
467
462
  const EXCLUDE_KEYS = {
@@ -559,8 +554,7 @@ function reportSettingsProblems(context, program) {
559
554
  }
560
555
  });
561
556
  }
562
- //#endregion
563
- //#region src/utils/extractors.ts
557
+ // src/utils/extractors.ts
564
558
  /**
565
559
  * Whether this string is the element's FINAL, self-contained class list — the
566
560
  * only position where a RELATIONAL rule (one whose verdict for a class depends
@@ -617,6 +611,7 @@ const DEFAULT_EXTRACTOR_CONFIG = {
617
611
  /^classes$/,
618
612
  /^styles?$/
619
613
  ],
614
+ lookupTablePatterns: [],
620
615
  calleeExtractors: /* @__PURE__ */ new Map()
621
616
  };
622
617
  /**
@@ -708,6 +703,7 @@ function compileExtractorConfig(tw) {
708
703
  callees: mergeUnique(DEFAULT_EXTRACTOR_CONFIG.callees, [...tw.callees ?? [], ...calleeExtractors.keys()], exclude?.callees),
709
704
  tags: mergeUnique(DEFAULT_EXTRACTOR_CONFIG.tags, tw.tags, exclude?.tags),
710
705
  variablePatterns: [...filteredPatterns, ...compileRegexList(tw.variablePatterns)],
706
+ lookupTablePatterns: compileRegexList(tw.lookupTablePatterns),
711
707
  calleeExtractors
712
708
  };
713
709
  }
@@ -984,13 +980,41 @@ function getPropertyName(key) {
984
980
  /**
985
981
  * Extracts class locations from a VariableDeclarator whose name matches variablePatterns.
986
982
  * e.g. const className = "flex items-center"
983
+ *
984
+ * A name matching lookupTablePatterns whose initializer is an object literal is
985
+ * a lookup table instead: its values are read, not its keys.
986
+ * e.g. const TONE_CLASSES = { warning: "text-amber-700" }
987
987
  */
988
988
  function extractFromVariableDeclarator(node, config = DEFAULT_EXTRACTOR_CONFIG) {
989
989
  if (node.id.type !== "Identifier") return [];
990
- if (!config.variablePatterns.some((p) => p.test(node.id.name))) return [];
990
+ const name = node.id.name;
991
+ if (node.init && config.lookupTablePatterns.some((p) => p.test(name))) {
992
+ const table = withoutTypeAssertion(node.init);
993
+ if (table.type === "ObjectExpression") return withOrigin(extractLookupTable(table), "variable");
994
+ }
995
+ if (!config.variablePatterns.some((p) => p.test(name))) return [];
991
996
  if (!node.init) return [];
992
997
  return withOrigin(extractFromExpression(node.init), "variable");
993
998
  }
999
+ /** `{…} as const` and `{…} satisfies T` are the same object literal. */
1000
+ function withoutTypeAssertion(node) {
1001
+ let inner = node;
1002
+ while (inner.type === "TSAsExpression" || inner.type === "TSSatisfiesExpression") inner = inner.expression;
1003
+ return inner;
1004
+ }
1005
+ /**
1006
+ * A lookup table's values, recursing into nested tables
1007
+ * (`{ sm: { root: "…", label: "…" } }`): there, too, the keys are names.
1008
+ */
1009
+ function extractLookupTable(node, out = []) {
1010
+ for (const prop of node.properties) {
1011
+ if (prop.type !== "Property") continue;
1012
+ const value = withoutTypeAssertion(prop.value);
1013
+ if (value.type === "ObjectExpression") extractLookupTable(value, out);
1014
+ else extractFromExpression(value, out);
1015
+ }
1016
+ return out;
1017
+ }
994
1018
  /**
995
1019
  * Walk an expression and append every class-bearing location to `out`.
996
1020
  *
@@ -1014,7 +1038,18 @@ function extractFromExpression(node, out = []) {
1014
1038
  extractFromExpression(node.alternate, out);
1015
1039
  return out;
1016
1040
  }
1017
- if (node.type === "LogicalExpression") return extractFromExpression(node.right, out);
1041
+ if (node.type === "LogicalExpression") {
1042
+ const { operator, left, right } = node;
1043
+ if (operator !== "&&") extractFromExpression(left, out);
1044
+ return extractFromExpression(right, out);
1045
+ }
1046
+ if (node.type === "MemberExpression" && node.computed) {
1047
+ const object = withoutTypeAssertion(node.object);
1048
+ if (object.type === "ObjectExpression") {
1049
+ for (const prop of object.properties) if (prop.type === "Property") extractFromExpression(prop.value, out);
1050
+ } else if (object.type === "ArrayExpression") extractFromExpression(object, out);
1051
+ return out;
1052
+ }
1018
1053
  if (node.type === "BinaryExpression" && node.operator === "+") return appendFromConcatenation(node, out);
1019
1054
  if (node.type === "ArrayExpression") {
1020
1055
  for (const element of node.elements) if (element && element.type !== "SpreadElement") extractFromExpression(element, out);
@@ -1157,8 +1192,7 @@ function getCalleeName(node) {
1157
1192
  if (prop.type === "Identifier") return prop.name;
1158
1193
  }
1159
1194
  }
1160
- //#endregion
1161
- //#region src/utils/class-splitter.ts
1195
+ // src/utils/class-splitter.ts
1162
1196
  function isWhitespace(char) {
1163
1197
  return char === " " || char === " " || char === "\n" || char === "\r" || char === "\f" || char === "\v";
1164
1198
  }
@@ -1292,8 +1326,7 @@ function rebuildClassString(split, newClasses, sourceIndices) {
1292
1326
  const join = separators.slice(1, -1).find((s) => s.includes("\n")) ?? " ";
1293
1327
  return separators[0] + newClasses.join(join) + separators[separators.length - 1];
1294
1328
  }
1295
- //#endregion
1296
- //#region src/rules/no-duplicate-classes.ts
1329
+ // src/rules/no-duplicate-classes.ts
1297
1330
  const noDuplicateClasses = defineRule({
1298
1331
  meta: {
1299
1332
  type: "problem",
@@ -1341,8 +1374,7 @@ const noDuplicateClasses = defineRule({
1341
1374
  return createExtractorVisitors(context, check);
1342
1375
  }
1343
1376
  });
1344
- //#endregion
1345
- //#region src/rules/no-unnecessary-whitespace.ts
1377
+ // src/rules/no-unnecessary-whitespace.ts
1346
1378
  const noUnnecessaryWhitespace = defineRule({
1347
1379
  meta: {
1348
1380
  type: "suggestion",
@@ -1385,8 +1417,7 @@ const noUnnecessaryWhitespace = defineRule({
1385
1417
  return createExtractorVisitors(context, check, { raw: true });
1386
1418
  }
1387
1419
  });
1388
- //#endregion
1389
- //#region src/utils/report.ts
1420
+ // src/utils/report.ts
1390
1421
  /**
1391
1422
  * Shared reporters: `reportClassReplacements` for the "first-as-fix,
1392
1423
  * rest-as-suggestion" pattern, `reportClassSuggestion` for a suggestion alone.
@@ -1478,8 +1509,7 @@ function reportClassSuggestion(context, loc, split, classes, { cls, replacement
1478
1509
  }]
1479
1510
  });
1480
1511
  }
1481
- //#endregion
1482
- //#region src/utils/class-parser.ts
1512
+ // src/utils/class-parser.ts
1483
1513
  /**
1484
1514
  * Extracts variants from a class string, respecting bracket depth.
1485
1515
  * e.g. "[&>svg]:hover:w-4" → ["[&>svg]", "hover"]
@@ -1749,8 +1779,7 @@ function isSelectorBarrier(variant, facts) {
1749
1779
  function changesTarget(variant, facts) {
1750
1780
  return isPseudoElementVariant(variant, facts) || isSelectorBarrier(variant, facts);
1751
1781
  }
1752
- //#endregion
1753
- //#region src/design-system/css-declarations.ts
1782
+ // src/design-system/css-declarations.ts
1754
1783
  const EMPTY_DECLS = [];
1755
1784
  const EMPTY_VARS = [];
1756
1785
  /** Splits a scope token into its decoded parts. Unknown tokens degrade to `element`. */
@@ -1845,8 +1874,7 @@ function isCssDeclarationIndex(value) {
1845
1874
  const i = value;
1846
1875
  return Array.isArray(i.scopes) && i.scopes.length > 0 && i.scopes[0] === "" && Array.isArray(i.props) && Array.isArray(i.values) && Array.isArray(i.vars) && Array.isArray(i.table) && Array.isArray(i.pureValues) && Array.isArray(i.partial) && typeof i.byClass === "object" && i.byClass !== null && typeof i.valueVars === "object" && i.valueVars !== null && typeof i.valueFallbackVars === "object" && i.valueFallbackVars !== null;
1847
1876
  }
1848
- //#endregion
1849
- //#region src/utils/floating-point.ts
1877
+ // src/utils/floating-point.ts
1850
1878
  /**
1851
1879
  * Rounds rem/em/px values in class strings to avoid
1852
1880
  * JavaScript floating point issues.
@@ -1860,8 +1888,7 @@ function roundRemValue(className) {
1860
1888
  return `[${Number.parseFloat(Number.parseFloat(num).toFixed(6))}${unit}]`;
1861
1889
  });
1862
1890
  }
1863
- //#endregion
1864
- //#region src/design-system/cache.ts
1891
+ // src/design-system/cache.ts
1865
1892
  const EMPTY_DECLARATIONS = [];
1866
1893
  const EMPTY_TOKEN_VALUES = [];
1867
1894
  /** Off-scale numeric value: `w-45`, `min-h-17.5`, `gap-13`. */
@@ -2421,8 +2448,7 @@ var DesignSystemCache = class DesignSystemCache {
2421
2448
  return null;
2422
2449
  }
2423
2450
  };
2424
- //#endregion
2425
- //#region src/utils/fatal.ts
2451
+ // src/utils/fatal.ts
2426
2452
  /**
2427
2453
  * Fatal error types and reporter for the deterministic v1 design.
2428
2454
  *
@@ -2535,8 +2561,7 @@ function softGetDS(getDS) {
2535
2561
  throw err;
2536
2562
  }
2537
2563
  }
2538
- //#endregion
2539
- //#region src/design-system/tailwind-node.ts
2564
+ // src/design-system/tailwind-node.ts
2540
2565
  /**
2541
2566
  * Resolves the Tailwind engine (`@tailwindcss/node`) the plugin runs against.
2542
2567
  *
@@ -2680,8 +2705,7 @@ function resolveTailwindNodeFor(cssPath) {
2680
2705
  resolutionCache.set(cssDir, result);
2681
2706
  return result;
2682
2707
  }
2683
- //#endregion
2684
- //#region src/design-system/sync-loader.ts
2708
+ // src/design-system/sync-loader.ts
2685
2709
  /**
2686
2710
  * Synchronous design system loader using a worker_thread.
2687
2711
  *
@@ -3600,6 +3624,18 @@ async function main() {
3600
3624
  // SINGLE because a class that declares more than the original is not an
3601
3625
  // equivalent: \`text-sm\` sets \`line-height\` too, so \`text-[14px]\` is not it.
3602
3626
  const NUMERIC_LITERAL = /^-?\\d*\\.?\\d+(rem|px|em|%|s|ms|deg)?$/;
3627
+ // The utility a token class belongs to is the class minus the token's own
3628
+ // name: \`p-brand-md\` reads \`--spacing-brand-md\`, so its utility is \`p\`, not
3629
+ // \`p-brand\`. Cutting at the last dash only works for one-word token names.
3630
+ // A class whose variable shares no suffix with it keeps that last-dash cut.
3631
+ function tokenPrefix(cls, variable) {
3632
+ const name = variable.slice(2);
3633
+ for (let dash = cls.indexOf('-'); dash > 0; dash = cls.indexOf('-', dash + 1)) {
3634
+ if (name.endsWith(cls.slice(dash))) return cls.slice(0, dash);
3635
+ }
3636
+ const last = cls.lastIndexOf('-');
3637
+ return last > 0 ? cls.slice(0, last) : '';
3638
+ }
3603
3639
  const tokenValues = {};
3604
3640
  for (const cls of validClasses) {
3605
3641
  if (cls.includes('[') || cls.includes('/')) continue;
@@ -3611,11 +3647,13 @@ async function main() {
3611
3647
  const body = css.slice(open + 1, close).replace(/\\s+/g, ' ').replace(/;\\s*$/, '').trim();
3612
3648
  const m = /^([a-z-]+):\\s*var\\((--[\\w-]+)\\)$/.exec(body);
3613
3649
  if (!m) continue;
3650
+ // \`mt-1\` reads the bare \`--spacing\`: it is a step of the scale, the second
3651
+ // family, not a named token. Filed here it would tie with a project token
3652
+ // of the same value and win on name order.
3653
+ if (m[2] === '--spacing') continue;
3614
3654
  const value = themeValues.get(m[2]);
3615
3655
  if (!value || !NUMERIC_LITERAL.test(value)) continue;
3616
- const dash = cls.lastIndexOf('-');
3617
- if (dash <= 0) continue;
3618
- const prefix = unpfx(cls).slice(0, unpfx(cls).lastIndexOf('-'));
3656
+ const prefix = tokenPrefix(unpfx(cls), m[2]);
3619
3657
  if (!prefix) continue;
3620
3658
  if (!tokenValues[prefix]) tokenValues[prefix] = [];
3621
3659
  tokenValues[prefix].push([value, unpfx(cls)]);
@@ -4121,8 +4159,7 @@ function loadDesignSystemSync(cssPath, timeout, onPrecompute) {
4121
4159
  pruneCacheDir();
4122
4160
  return data;
4123
4161
  }
4124
- //#endregion
4125
- //#region src/design-system/debug.ts
4162
+ // src/design-system/debug.ts
4126
4163
  const PREFIX = "[oxlint-tailwindcss]";
4127
4164
  let _enabled = null;
4128
4165
  /**
@@ -4149,8 +4186,7 @@ function setDebugEnabled(enabled) {
4149
4186
  function debugLog(message) {
4150
4187
  if (_enabled || process.env.DEBUG === "oxlint-tailwindcss") console.error(`${PREFIX} ${message}`);
4151
4188
  }
4152
- //#endregion
4153
- //#region src/design-system/engine-guard.ts
4189
+ // src/design-system/engine-guard.ts
4154
4190
  /**
4155
4191
  * Version safeguards for the consumer-resolved Tailwind engine.
4156
4192
  *
@@ -4364,8 +4400,7 @@ function allowUntestedEngineFromSettings(settings) {
4364
4400
  if (tw && typeof tw === "object" && "allowUntestedEngine" in tw) return tw.allowUntestedEngine === true;
4365
4401
  return false;
4366
4402
  }
4367
- //#endregion
4368
- //#region src/design-system/ds-worker.ts
4403
+ // src/design-system/ds-worker.ts
4369
4404
  /**
4370
4405
  * Generic worker-thread service wrapping `__unstable__loadDesignSystem`.
4371
4406
  *
@@ -4721,8 +4756,7 @@ var DesignSystemWorker = class {
4721
4756
  } catch {}
4722
4757
  }
4723
4758
  };
4724
- //#endregion
4725
- //#region src/design-system/canonicalize-service.ts
4759
+ // src/design-system/canonicalize-service.ts
4726
4760
  /**
4727
4761
  * Persistent canonicalize service backed by `DesignSystemWorker`.
4728
4762
  *
@@ -5158,8 +5192,7 @@ function canonicalizeClassesSync(cssPath, classes, rem) {
5158
5192
  }
5159
5193
  return out;
5160
5194
  }
5161
- //#endregion
5162
- //#region src/design-system/loader.ts
5195
+ // src/design-system/loader.ts
5163
5196
  const dsCache = /* @__PURE__ */ new Map();
5164
5197
  /**
5165
5198
  * Memoizes DS-load FAILURES per entry point, keyed by `(resolvedPath, mtime)`.
@@ -5251,7 +5284,7 @@ function resolveByGlobMapping(mappings, filePath, baseDir) {
5251
5284
  }
5252
5285
  /**
5253
5286
  * oxlint discovers nested configuration by walking up from each linted file
5254
- * looking for files with these names (oxlint 1.87: JSON, JSONC, and the JS
5287
+ * looking for files with these names (oxlint 1.89: JSON, JSONC, and the JS
5255
5288
  * configs it loads through Node). We mirror that walk to find the config
5256
5289
  * directory a relative `entryPoint` should be anchored to — which is also
5257
5290
  * where an `oxlint.config.ts` passes it through `oxlint-tailwindcss/config`.
@@ -5598,8 +5631,7 @@ function validateClassesSync(cssPath, cache, classes) {
5598
5631
  ask(cssPath, cache, classes);
5599
5632
  return answersFor(cache);
5600
5633
  }
5601
- //#endregion
5602
- //#region src/rules/no-unknown-classes.ts
5634
+ // src/rules/no-unknown-classes.ts
5603
5635
  /**
5604
5636
  * Utility used to probe a variant chain. Any always-valid utility works; `flex`
5605
5637
  * is the shortest one every Tailwind build has.
@@ -5836,8 +5868,7 @@ const noUnknownClasses = defineRule({
5836
5868
  return createExtractorVisitors(context, check);
5837
5869
  }
5838
5870
  });
5839
- //#endregion
5840
- //#region src/rules/no-conflicting-classes/spec.ts
5871
+ // src/rules/no-conflicting-classes/spec.ts
5841
5872
  const COMPLEMENTARY_GROUPS = [{
5842
5873
  pattern: /^prose(?:-|$)/,
5843
5874
  reason: "`prose` + `prose-sm`/`prose-lg`/`prose-xl` modify the same scope and are designed to compose."
@@ -5864,8 +5895,7 @@ const COMPOSITION_PAIRS = [
5864
5895
  reason: "`mask-{add,subtract,intersect,exclude}` are mask-composite modes that compose with mask-gradient utilities."
5865
5896
  }
5866
5897
  ];
5867
- //#endregion
5868
- //#region src/rules/no-conflicting-classes/decide.ts
5898
+ // src/rules/no-conflicting-classes/decide.ts
5869
5899
  /** Builds the comparison key. Same property on two different boxes never clashes. */
5870
5900
  function declKey(decl) {
5871
5901
  return decl.scope === "element" ? decl.prop : `${decl.pseudo || ">"}|${decl.prop}`;
@@ -6061,8 +6091,7 @@ function redundantSide(verdict) {
6061
6091
  };
6062
6092
  return null;
6063
6093
  }
6064
- //#endregion
6065
- //#region src/rules/no-conflicting-classes.ts
6094
+ // src/rules/no-conflicting-classes.ts
6066
6095
  /**
6067
6096
  * Compiles the `allow` option.
6068
6097
  *
@@ -6278,8 +6307,7 @@ const noConflictingClasses = defineRule({
6278
6307
  return createExtractorVisitors(context, check);
6279
6308
  }
6280
6309
  });
6281
- //#endregion
6282
- //#region src/utils/replacement.ts
6310
+ // src/utils/replacement.ts
6283
6311
  /**
6284
6312
  * Returns a predicate that answers "would this replacement produce CSS?".
6285
6313
  *
@@ -6292,8 +6320,7 @@ function makeReplacementGuard(cache) {
6292
6320
  if (!cache) return () => true;
6293
6321
  return (replacement) => cache.isValid(replacement);
6294
6322
  }
6295
- //#endregion
6296
- //#region src/rules/no-deprecated-classes.ts
6323
+ // src/rules/no-deprecated-classes.ts
6297
6324
  /**
6298
6325
  * Fallback rename map, for when no design system is available.
6299
6326
  *
@@ -6371,8 +6398,7 @@ const noDeprecatedClasses = defineRule({
6371
6398
  return createExtractorVisitors(context, check);
6372
6399
  }
6373
6400
  });
6374
- //#endregion
6375
- //#region src/rules/enforce-canonical.ts
6401
+ // src/rules/enforce-canonical.ts
6376
6402
  /**
6377
6403
  * Preserve the user's `!` position after canonicalization.
6378
6404
  *
@@ -6561,8 +6587,7 @@ const sortWorker = new DesignSystemWorker({
6561
6587
  function sortClassesSync(cssPath, classes) {
6562
6588
  return sortWorker.callSync(cssPath, classes);
6563
6589
  }
6564
- //#endregion
6565
- //#region src/rules/enforce-sort-order.ts
6590
+ // src/rules/enforce-sort-order.ts
6566
6591
  const enforceSortOrder = defineRule({
6567
6592
  meta: {
6568
6593
  type: "suggestion",
@@ -6660,8 +6685,7 @@ const enforceSortOrder = defineRule({
6660
6685
  return createExtractorVisitors(context, check);
6661
6686
  }
6662
6687
  });
6663
- //#endregion
6664
- //#region src/utils/declared-values.ts
6688
+ // src/utils/declared-values.ts
6665
6689
  /** A plain number or fraction: always the shared numeric/`--spacing` scale. */
6666
6690
  const NUMERIC_VALUE_RE = /^\d+(?:\.\d+)?(?:\/\d+(?:\.\d+)?)?$/;
6667
6691
  /** The value is a literal the user wrote, injected verbatim into every part. */
@@ -6685,8 +6709,7 @@ function sameValues(a, b) {
6685
6709
  for (const value of a) if (!b.has(value)) return false;
6686
6710
  return true;
6687
6711
  }
6688
- //#endregion
6689
- //#region src/rules/enforce-shorthand.ts
6712
+ // src/rules/enforce-shorthand.ts
6690
6713
  /**
6691
6714
  * The `m`/`p` shape, shared by `margin`, `padding`, `scroll-margin` and
6692
6715
  * `scroll-padding`: four sides, each axis, and the logical pairs (`ms`+`me` IS
@@ -7054,8 +7077,7 @@ const enforceShorthand = defineRule({
7054
7077
  return createExtractorVisitors(context, check);
7055
7078
  }
7056
7079
  });
7057
- //#endregion
7058
- //#region src/rules/enforce-logical.ts
7080
+ // src/rules/enforce-logical.ts
7059
7081
  const LOGICAL_PHYSICAL_SCHEMA = {
7060
7082
  type: "object",
7061
7083
  properties: {
@@ -7534,8 +7556,7 @@ const enforceLogical = defineRule({
7534
7556
  return createExtractorVisitors(context, check);
7535
7557
  }
7536
7558
  });
7537
- //#endregion
7538
- //#region src/rules/enforce-physical.ts
7559
+ // src/rules/enforce-physical.ts
7539
7560
  const PHYSICAL_MAPPINGS = invertAxisMappings(PHYSICAL_TO_LOGICAL_MAPPINGS);
7540
7561
  const enforcePhysical = defineRule({
7541
7562
  meta: {
@@ -7568,8 +7589,7 @@ const enforcePhysical = defineRule({
7568
7589
  return createExtractorVisitors(context, check);
7569
7590
  }
7570
7591
  });
7571
- //#endregion
7572
- //#region src/rules/max-class-count.ts
7592
+ // src/rules/max-class-count.ts
7573
7593
  const DEFAULT_MAX = 20;
7574
7594
  const EXPRESSION = "\0";
7575
7595
  /**
@@ -7632,8 +7652,7 @@ const maxClassCount = defineRule({
7632
7652
  return createExtractorVisitors(context, check, { raw: true });
7633
7653
  }
7634
7654
  });
7635
- //#endregion
7636
- //#region src/rules/no-restricted-classes.ts
7655
+ // src/rules/no-restricted-classes.ts
7637
7656
  const noRestrictedClasses = defineRule({
7638
7657
  meta: {
7639
7658
  type: "problem",
@@ -7725,8 +7744,7 @@ const noRestrictedClasses = defineRule({
7725
7744
  return createExtractorVisitors(context, check);
7726
7745
  }
7727
7746
  });
7728
- //#endregion
7729
- //#region src/utils/measure.ts
7747
+ // src/utils/measure.ts
7730
7748
  /** A length or plain number. Anything else can't be compared arithmetically. */
7731
7749
  const LENGTH_RE = /^(-?\d*\.?\d+)(rem|px|em)?$/;
7732
7750
  /**
@@ -7755,6 +7773,11 @@ function measure(value, rootFontSize) {
7755
7773
  default: return null;
7756
7774
  }
7757
7775
  }
7776
+ /** The unit a length is written in (`'px'`, `'rem'`, `'em'`, `''` for none); null for anything else. */
7777
+ function lengthUnit(value) {
7778
+ const match = LENGTH_RE.exec(value.trim());
7779
+ return match ? match[2] ?? "" : null;
7780
+ }
7758
7781
  /**
7759
7782
  * Same value, allowing for float noise (`0.875rem` × 16 = 13.999999999999998).
7760
7783
  * A unitless number and a length are never the same value, whatever the digits.
@@ -7805,20 +7828,23 @@ function closestOnScale(cache, bare, rootFontSize, limit = 3) {
7805
7828
  distance: Math.abs(px - written.px)
7806
7829
  });
7807
7830
  };
7831
+ const sign = written.px < 0 ? -1 : 1;
7832
+ const named = (className) => sign < 0 ? `-${className}` : className;
7808
7833
  for (const [literal, className] of cache.tokenValuesFor(prefix)) {
7809
7834
  const token = measure(literal, rootFontSize);
7810
- if (token !== null && !token.unitless) add(className, token.px);
7835
+ if (token === null || token.unitless) continue;
7836
+ if (sign > 0 || cache.isValid(named(className))) add(named(className), sign * token.px);
7811
7837
  }
7812
7838
  const scale = cache.scale;
7813
7839
  if (scale && cache.readsScale(prefix)) {
7814
7840
  const unit = measure(scale.unit, rootFontSize);
7815
7841
  if (unit !== null && !unit.unitless && unit.px > 0) {
7816
- const steps = written.px / unit.px / scale.step;
7842
+ const steps = sign * written.px / unit.px / scale.step;
7817
7843
  for (const n of /* @__PURE__ */ new Set([Math.floor(steps + 1e-9), Math.ceil(steps - 1e-9)])) {
7818
7844
  const count = n * scale.step;
7819
- if (count < 0) continue;
7820
- const className = `${prefix}-${formatStep(count)}`;
7821
- if (cache.isValid(className)) add(className, count * unit.px);
7845
+ if (count < 0 || sign < 0 && count === 0) continue;
7846
+ const className = named(`${prefix}-${formatStep(count)}`);
7847
+ if (cache.isValid(className)) add(className, sign * count * unit.px);
7822
7848
  }
7823
7849
  }
7824
7850
  }
@@ -7840,8 +7866,7 @@ function formatOptions(options) {
7840
7866
  const parts = options.map((o) => `${o.className} (${o.value})`);
7841
7867
  return parts.length <= 1 ? parts[0] ?? "" : `${parts.slice(0, -1).join(", ")} or ${parts.at(-1)}`;
7842
7868
  }
7843
- //#endregion
7844
- //#region src/rules/no-arbitrary-value.ts
7869
+ // src/rules/no-arbitrary-value.ts
7845
7870
  const SHORTHAND_VAR = /^-?[a-z][\w-]*?-\((?:[a-z-]+:)?(--[\w-]+)\)(?:\/.+)?$/;
7846
7871
  const EXPLICIT_VAR = /^-?[a-z][\w-]*?-\[(?:[a-z-]+:)?var\((--[\w-]+)(?:,[^\]]*)?\)\](?:\/.+)?$/;
7847
7872
  /**
@@ -7958,8 +7983,7 @@ const noArbitraryValue = defineRule({
7958
7983
  return createExtractorVisitors(context, check);
7959
7984
  }
7960
7985
  });
7961
- //#endregion
7962
- //#region src/rules/enforce-consistent-important-position.ts
7986
+ // src/rules/enforce-consistent-important-position.ts
7963
7987
  const enforceConsistentImportantPosition = defineRule({
7964
7988
  meta: {
7965
7989
  type: "suggestion",
@@ -8013,8 +8037,7 @@ const enforceConsistentImportantPosition = defineRule({
8013
8037
  return createExtractorVisitors(context, check);
8014
8038
  }
8015
8039
  });
8016
- //#endregion
8017
- //#region src/rules/enforce-negative-arbitrary-values.ts
8040
+ // src/rules/enforce-negative-arbitrary-values.ts
8018
8041
  const SIMPLE_DIMENSION = /^\d*\.?\d+[a-z%]*$/;
8019
8042
  function fixClass(cls) {
8020
8043
  const { utility, variant } = splitUtilityAndVariant(cls);
@@ -8071,8 +8094,7 @@ const enforceNegativeArbitraryValues = defineRule({
8071
8094
  return createExtractorVisitors(context, check);
8072
8095
  }
8073
8096
  });
8074
- //#endregion
8075
- //#region src/rules/enforce-consistent-variable-syntax.ts
8097
+ // src/rules/enforce-consistent-variable-syntax.ts
8076
8098
  const enforceConsistentVariableSyntax = defineRule({
8077
8099
  meta: {
8078
8100
  type: "suggestion",
@@ -8120,8 +8142,7 @@ const enforceConsistentVariableSyntax = defineRule({
8120
8142
  return createExtractorVisitors(context, check);
8121
8143
  }
8122
8144
  });
8123
- //#endregion
8124
- //#region src/rules/no-dark-without-light.ts
8145
+ // src/rules/no-dark-without-light.ts
8125
8146
  const DEFAULT_VARIANTS = ["dark"];
8126
8147
  const KNOWN_PREFIXES = [
8127
8148
  "rounded-tl",
@@ -8375,8 +8396,7 @@ const noDarkWithoutLight = defineRule({
8375
8396
  return createExtractorVisitors(context, check);
8376
8397
  }
8377
8398
  });
8378
- //#endregion
8379
- //#region src/utils/color-literal.ts
8399
+ // src/utils/color-literal.ts
8380
8400
  /**
8381
8401
  * Does this CSS value contain a hardcoded color literal, anywhere in it?
8382
8402
  *
@@ -8500,8 +8520,7 @@ function containsColorLiteral(value) {
8500
8520
  }
8501
8521
  return false;
8502
8522
  }
8503
- //#endregion
8504
- //#region src/utils/theme-colors.ts
8523
+ // src/utils/theme-colors.ts
8505
8524
  /** How many of the project's colors a message names before `(+N more)`. */
8506
8525
  const LISTED = 12;
8507
8526
  const listed = /* @__PURE__ */ new WeakMap();
@@ -8520,8 +8539,7 @@ function themeColorList(cache) {
8520
8539
  }
8521
8540
  return list;
8522
8541
  }
8523
- //#endregion
8524
- //#region src/rules/no-hardcoded-colors.ts
8542
+ // src/rules/no-hardcoded-colors.ts
8525
8543
  const VAR_REF_RE = /var\(\s*--[\w-]+/i;
8526
8544
  /**
8527
8545
  * Does the arbitrary value the user wrote carry a hardcoded colour?
@@ -8602,8 +8620,7 @@ const noHardcodedColors = defineRule({
8602
8620
  return createExtractorVisitors(context, check);
8603
8621
  }
8604
8622
  });
8605
- //#endregion
8606
- //#region src/rules/no-contradicting-variants.ts
8623
+ // src/rules/no-contradicting-variants.ts
8607
8624
  const STATIC_PROP_GROUPS = /* @__PURE__ */ new Map([
8608
8625
  ["block", "display"],
8609
8626
  ["inline-block", "display"],
@@ -8701,8 +8718,7 @@ const noContradictingVariants = defineRule({
8701
8718
  return createExtractorVisitors(context, check);
8702
8719
  }
8703
8720
  });
8704
- //#endregion
8705
- //#region src/rules/consistent-variant-order.ts
8721
+ // src/rules/consistent-variant-order.ts
8706
8722
  /**
8707
8723
  * The order chains are written in, outermost first: where the page is
8708
8724
  * (viewport, features, color scheme, container, media type, direction), then
@@ -8946,8 +8962,7 @@ const consistentVariantOrder = defineRule({
8946
8962
  return createExtractorVisitors(context, check);
8947
8963
  }
8948
8964
  });
8949
- //#endregion
8950
- //#region src/rules/enforce-consistent-line-wrapping.ts
8965
+ // src/rules/enforce-consistent-line-wrapping.ts
8951
8966
  const DEFAULT_PRINT_WIDTH = 80;
8952
8967
  const DEFAULT_GROUP = "newLine";
8953
8968
  const DEFAULT_WRAP_STRINGS = "never";
@@ -8956,6 +8971,31 @@ function isJsxAttributeString(loc) {
8956
8971
  const node = loc.node;
8957
8972
  return node.type === "Literal" && node.parent?.type === "JSXAttribute";
8958
8973
  }
8974
+ /**
8975
+ * A JS string `wrapStrings: 'all'` turns into a template literal. Its place
8976
+ * takes any expression — a call argument (`cn("…")`), `className={"…"}`, an
8977
+ * array element, an object value, a ternary or `&&` branch, a variable's
8978
+ * initializer — but never an object key or a `+` operand. And a template reads
8979
+ * its text the same way: `raw` is the source between the quotes, so it must
8980
+ * equal the value (no escape sequence, which a template can read differently)
8981
+ * and hold no `` ` `` or `${`.
8982
+ */
8983
+ function isConvertibleJsString(loc, raw) {
8984
+ const node = loc.node;
8985
+ if (node.type !== "Literal" || raw !== loc.value) return false;
8986
+ if (raw.includes("`") || raw.includes("${")) return false;
8987
+ const parent = node.parent;
8988
+ switch (parent?.type) {
8989
+ case "CallExpression": return parent.arguments?.includes(node) === true;
8990
+ case "Property": return parent.value === node;
8991
+ case "VariableDeclarator": return parent.init === node;
8992
+ case "ConditionalExpression": return parent.test !== node;
8993
+ case "ArrayExpression":
8994
+ case "LogicalExpression":
8995
+ case "JSXExpressionContainer": return true;
8996
+ default: return false;
8997
+ }
8998
+ }
8959
8999
  /** One indentation level added below the statement's base indent for wrapped lines. */
8960
9000
  const INDENT_UNIT = " ";
8961
9001
  /** Group `classes` into chunks of at most `n`, each chunk space-joined. */
@@ -9039,7 +9079,7 @@ const enforceConsistentLineWrapping = defineRule({
9039
9079
  recommended: false,
9040
9080
  designSystem: "optional"
9041
9081
  }),
9042
- fixable: "whitespace",
9082
+ fixable: "code",
9043
9083
  schema: [{
9044
9084
  type: "object",
9045
9085
  properties: {
@@ -9060,7 +9100,11 @@ const enforceConsistentLineWrapping = defineRule({
9060
9100
  },
9061
9101
  wrapStrings: {
9062
9102
  type: "string",
9063
- enum: ["never", "jsx"]
9103
+ enum: [
9104
+ "never",
9105
+ "jsx",
9106
+ "all"
9107
+ ]
9064
9108
  }
9065
9109
  },
9066
9110
  additionalProperties: false
@@ -9102,10 +9146,10 @@ const enforceConsistentLineWrapping = defineRule({
9102
9146
  return "";
9103
9147
  }
9104
9148
  /**
9105
- * The line ending a JSX string's fix writes. A JSX attribute keeps the
9106
- * file's `\r\n` in its value (a template's is LF already), so a CRLF file
9107
- * gets CRLF breaks: from the value when it has any, else from the line the
9108
- * string ends on.
9149
+ * The line ending a string's fix writes. A JSX attribute keeps the file's
9150
+ * `\r\n` in its value (a template's is LF already), so a CRLF file gets
9151
+ * CRLF breaks: from the value when it has any, else from the line the
9152
+ * string ends on — the only source for a JS string turned into a template.
9109
9153
  */
9110
9154
  function lineEndingOf(loc) {
9111
9155
  if (loc.value.includes("\r\n")) return "\r\n";
@@ -9200,15 +9244,19 @@ const enforceConsistentLineWrapping = defineRule({
9200
9244
  const group = getGroup();
9201
9245
  const prefix = wrapLines === "all" && group !== "never" && classesPerLine === void 0 ? softGetDS(getDS)?.cache.prefix ?? "" : "";
9202
9246
  const wrapStrings = getWrapStrings();
9247
+ const text = wrapStrings === "all" ? safeSourceCode(context)?.text : void 0;
9203
9248
  for (const written of locations) {
9204
- const wrapsString = wrapStrings === "jsx" && isJsxAttributeString(written);
9205
- const fixable = written.node.type === "TemplateElement" || wrapsString;
9206
- const eol = wrapsString ? lineEndingOf(written) : "\n";
9249
+ const wrapsString = wrapStrings !== "never" && isJsxAttributeString(written);
9250
+ const convertsString = wrapStrings === "all" && !wrapsString && isConvertibleJsString(written, text?.slice(written.range[0], written.range[1]));
9251
+ const fixable = written.node.type === "TemplateElement" || wrapsString || convertsString;
9252
+ const eol = wrapsString || convertsString ? lineEndingOf(written) : "\n";
9207
9253
  const loc = eol === "\n" ? written : {
9208
9254
  ...written,
9209
9255
  value: written.value.replace(/\r\n/g, "\n")
9210
9256
  };
9211
9257
  const toSource = (value) => eol === "\n" ? value : value.replace(/\n/g, eol);
9258
+ const fixRange = convertsString ? loc.node.range : loc.range;
9259
+ const toFix = (value) => convertsString ? "`" + toSource(value) + "`" : toSource(value);
9212
9260
  let maxLine = 0;
9213
9261
  for (const line of loc.value.split("\n")) {
9214
9262
  if (line.length <= maxLine) continue;
@@ -9228,7 +9276,7 @@ const enforceConsistentLineWrapping = defineRule({
9228
9276
  messageId: maxLine > printWidth ? "tooLong" : "inconsistentWrapping",
9229
9277
  data,
9230
9278
  fix(fixer) {
9231
- return fixer.replaceTextRange(loc.range, toSource(fixedValue));
9279
+ return fixer.replaceTextRange(fixRange, toFix(fixedValue));
9232
9280
  }
9233
9281
  });
9234
9282
  } else if (maxLine > printWidth) context.report({
@@ -9255,7 +9303,7 @@ const enforceConsistentLineWrapping = defineRule({
9255
9303
  messageId: "tooManyPerLine",
9256
9304
  data,
9257
9305
  fix(fixer) {
9258
- return fixer.replaceTextRange(loc.range, toSource(preserveSpaces(loc, fixedValue)));
9306
+ return fixer.replaceTextRange(fixRange, toFix(preserveSpaces(loc, fixedValue)));
9259
9307
  }
9260
9308
  });
9261
9309
  } else context.report({
@@ -9270,8 +9318,7 @@ const enforceConsistentLineWrapping = defineRule({
9270
9318
  return createExtractorVisitors(context, check, { raw: true });
9271
9319
  }
9272
9320
  });
9273
- //#endregion
9274
- //#region src/rules/no-unnecessary-arbitrary-value.ts
9321
+ // src/rules/no-unnecessary-arbitrary-value.ts
9275
9322
  const noUnnecessaryArbitraryValue = defineRule({
9276
9323
  meta: {
9277
9324
  type: "suggestion",
@@ -9321,8 +9368,7 @@ const noUnnecessaryArbitraryValue = defineRule({
9321
9368
  return createExtractorVisitors(context, check);
9322
9369
  }
9323
9370
  });
9324
- //#endregion
9325
- //#region src/rules/prefer-theme-tokens.ts
9371
+ // src/rules/prefer-theme-tokens.ts
9326
9372
  /**
9327
9373
  * Match `prefix-(--name)` or `prefix-(--name)/modifier`.
9328
9374
  * Captures: 1=prefix, 2=variable name, 3=optional `/modifier` (kept verbatim).
@@ -9404,8 +9450,7 @@ const preferThemeTokens = defineRule({
9404
9450
  return createExtractorVisitors(context, check);
9405
9451
  }
9406
9452
  });
9407
- //#endregion
9408
- //#region src/rules/prefer-scale-token.ts
9453
+ // src/rules/prefer-scale-token.ts
9409
9454
  const preferScaleToken = defineRule({
9410
9455
  meta: {
9411
9456
  type: "suggestion",
@@ -9424,7 +9469,8 @@ const preferScaleToken = defineRule({
9424
9469
  allow: {
9425
9470
  type: "array",
9426
9471
  items: { type: "string" }
9427
- }
9472
+ },
9473
+ sameUnit: { type: "boolean" }
9428
9474
  },
9429
9475
  additionalProperties: false
9430
9476
  }],
@@ -9440,7 +9486,8 @@ const preferScaleToken = defineRule({
9440
9486
  const getDS = createLazyLoader(context);
9441
9487
  const getOptions = createLazyOptions(context, (o) => ({
9442
9488
  step: typeof o?.step === "number" ? o.step : null,
9443
- allow: o?.allow ?? []
9489
+ allow: o?.allow ?? [],
9490
+ sameUnit: o?.sameUnit === true
9444
9491
  }));
9445
9492
  const rootFontSize = createLazySettings(context, rootFontSizeFromSettings);
9446
9493
  /**
@@ -9452,7 +9499,7 @@ const preferScaleToken = defineRule({
9452
9499
  * from the design system, so neither is a name table.
9453
9500
  */
9454
9501
  function equivalentOf(cache, bare) {
9455
- const { step: stepOverride, allow } = getOptions();
9502
+ const { step: stepOverride, allow, sameUnit } = getOptions();
9456
9503
  if (allow.some((prefix) => bare.startsWith(prefix))) return null;
9457
9504
  if (cache.getNamedEquivalent(bare)) return null;
9458
9505
  const value = getArbitraryValue(bare);
@@ -9461,15 +9508,21 @@ const preferScaleToken = defineRule({
9461
9508
  if (written === null) return null;
9462
9509
  const prefix = arbitraryPrefix(bare);
9463
9510
  if (!prefix) return null;
9511
+ const writtenUnit = lengthUnit(value);
9512
+ const unitAllowed = (literal) => {
9513
+ const unit = lengthUnit(literal);
9514
+ return sameUnit ? unit === writtenUnit : unit === "em" === (writtenUnit === "em");
9515
+ };
9464
9516
  for (const [literal, className] of cache.tokenValuesFor(prefix)) {
9465
9517
  const token = measure(literal, rootFontSize());
9466
- if (token !== null && sameMeasure(written, token)) return className;
9518
+ if (token !== null && sameMeasure(written, token) && unitAllowed(literal)) return className;
9467
9519
  }
9468
9520
  if (!cache.readsScale(prefix)) return null;
9469
9521
  const scale = cache.scale;
9470
9522
  if (!scale) return null;
9471
9523
  const unit = measure(scale.unit, rootFontSize());
9472
9524
  if (unit === null || unit.px <= 0 || unit.unitless !== written.unitless) return null;
9525
+ if (!unitAllowed(scale.unit)) return null;
9473
9526
  const steps = written.px / unit.px;
9474
9527
  if (steps < 0) return null;
9475
9528
  if (!isOnStep(steps, stepOverride ?? scale.step)) return null;
@@ -9506,8 +9559,7 @@ const preferScaleToken = defineRule({
9506
9559
  return createExtractorVisitors(context, check);
9507
9560
  }
9508
9561
  });
9509
- //#endregion
9510
- //#region src/rules/no-dynamic-classes.ts
9562
+ // src/rules/no-dynamic-classes.ts
9511
9563
  const STATIC_UTILITY_ROOTS = [
9512
9564
  "@container",
9513
9565
  "accent",
@@ -9855,8 +9907,7 @@ const noDynamicClasses = defineRule({
9855
9907
  return createExtractorVisitors(context, check, { raw: true });
9856
9908
  }
9857
9909
  });
9858
- //#endregion
9859
- //#region src/rules/no-default-palette.ts
9910
+ // src/rules/no-default-palette.ts
9860
9911
  const COLOR_VAR = "--color-";
9861
9912
  /** `white`, `gray-*` → a test on palette color names. */
9862
9913
  function compileAllow(allow) {
@@ -9931,8 +9982,7 @@ const noDefaultPalette = defineRule({
9931
9982
  return createExtractorVisitors(context, check);
9932
9983
  }
9933
9984
  });
9934
- //#endregion
9935
- //#region src/utils/component-scanner.ts
9985
+ // src/utils/component-scanner.ts
9936
9986
  const PUNCT = /* @__PURE__ */ new Set([
9937
9987
  "(",
9938
9988
  ")",
@@ -10297,8 +10347,7 @@ function rootClasses(p, start, end, definitions) {
10297
10347
  };
10298
10348
  }
10299
10349
  }
10300
- //#endregion
10301
- //#region src/utils/style-signature.ts
10350
+ // src/utils/style-signature.ts
10302
10351
  /**
10303
10352
  * Where the element sits and how it lays out its children — which a copy
10304
10353
  * adapts to its page — rather than what it looks like.
@@ -10524,8 +10573,7 @@ function resemblance(component, element) {
10524
10573
  sharedSurface
10525
10574
  };
10526
10575
  }
10527
- //#endregion
10528
- //#region src/rules/no-borrowed-component-styles.ts
10576
+ // src/rules/no-borrowed-component-styles.ts
10529
10577
  /** Fewer shared declarations than this is a coincidence, not a copy. */
10530
10578
  const MIN_SHARED = 4;
10531
10579
  /** Shared declarations over all the declarations either side sets. */
@@ -10627,8 +10675,7 @@ function nativeTag(attribute) {
10627
10675
  if (element?.type !== "JSXOpeningElement" || element.name.type !== "JSXIdentifier") return null;
10628
10676
  return /^[a-z]/.test(element.name.name) ? element.name : null;
10629
10677
  }
10630
- //#endregion
10631
- //#region src/index.ts
10678
+ // src/index.ts
10632
10679
  const plugin = definePlugin({
10633
10680
  meta: { name: "tailwindcss" },
10634
10681
  rules: {
@@ -10750,5 +10797,4 @@ const plugin = definePlugin({
10750
10797
  })
10751
10798
  }
10752
10799
  });
10753
- //#endregion
10754
10800
  module.exports = plugin;