pasika 0.10.155 → 0.10.157
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/eslint/pasika/index.d.ts +2 -0
- package/dist/eslint/pasika/index.js +100 -40
- package/package.json +1 -1
|
@@ -122,6 +122,7 @@ declare const nextjsPackageJsonRules: {
|
|
|
122
122
|
declare const tailwindRules: {
|
|
123
123
|
"at-rule-spacing": _eslint_css.CSSRuleDefinition;
|
|
124
124
|
"theme-reset": _eslint_css.CSSRuleDefinition;
|
|
125
|
+
"tailwind-default-comment": _eslint_css.CSSRuleDefinition;
|
|
125
126
|
"theme-token-order": _eslint_css.CSSRuleDefinition;
|
|
126
127
|
"theme-mode": _eslint_css.CSSRuleDefinition;
|
|
127
128
|
"color-role-usage": _eslint_css.CSSRuleDefinition;
|
|
@@ -168,6 +169,7 @@ declare const pasikaPlugin: {
|
|
|
168
169
|
"vitest-coverage": _eslint_json.JSONRuleDefinition;
|
|
169
170
|
"at-rule-spacing": _eslint_css.CSSRuleDefinition;
|
|
170
171
|
"theme-reset": _eslint_css.CSSRuleDefinition;
|
|
172
|
+
"tailwind-default-comment": _eslint_css.CSSRuleDefinition;
|
|
171
173
|
"theme-token-order": _eslint_css.CSSRuleDefinition;
|
|
172
174
|
"theme-mode": _eslint_css.CSSRuleDefinition;
|
|
173
175
|
"color-role-usage": _eslint_css.CSSRuleDefinition;
|
|
@@ -5408,8 +5408,8 @@ import ts9 from "typescript";
|
|
|
5408
5408
|
import { readFileSync as readFileSync9 } from "fs";
|
|
5409
5409
|
import ts8 from "typescript";
|
|
5410
5410
|
var MIN_SHARED_CLASSES = 5;
|
|
5411
|
-
function moduleInfo(file, index,
|
|
5412
|
-
if (
|
|
5411
|
+
function moduleInfo(file, index, cache7) {
|
|
5412
|
+
if (cache7.has(file)) return cache7.get(file);
|
|
5413
5413
|
try {
|
|
5414
5414
|
const source = ts8.createSourceFile(
|
|
5415
5415
|
file,
|
|
@@ -5458,10 +5458,10 @@ function moduleInfo(file, index, cache6) {
|
|
|
5458
5458
|
}
|
|
5459
5459
|
}
|
|
5460
5460
|
}
|
|
5461
|
-
|
|
5461
|
+
cache7.set(file, result);
|
|
5462
5462
|
return result;
|
|
5463
5463
|
} catch {
|
|
5464
|
-
|
|
5464
|
+
cache7.set(file, void 0);
|
|
5465
5465
|
return void 0;
|
|
5466
5466
|
}
|
|
5467
5467
|
}
|
|
@@ -5490,11 +5490,11 @@ function staticText(expression, info, visited) {
|
|
|
5490
5490
|
}
|
|
5491
5491
|
return void 0;
|
|
5492
5492
|
}
|
|
5493
|
-
function resolveExport(file, name, index,
|
|
5493
|
+
function resolveExport(file, name, index, cache7, seen) {
|
|
5494
5494
|
const key = `${file}\0${name}`;
|
|
5495
5495
|
if (seen.has(key)) return void 0;
|
|
5496
5496
|
seen.add(key);
|
|
5497
|
-
const info = moduleInfo(file, index,
|
|
5497
|
+
const info = moduleInfo(file, index, cache7);
|
|
5498
5498
|
if (!info) return void 0;
|
|
5499
5499
|
const localName = info.exports.get(name);
|
|
5500
5500
|
if (localName) {
|
|
@@ -5505,21 +5505,21 @@ function resolveExport(file, name, index, cache6, seen) {
|
|
|
5505
5505
|
if (classes.length >= MIN_SHARED_CLASSES) return { origin: file, name: localName, classes };
|
|
5506
5506
|
}
|
|
5507
5507
|
const imported = info.imports.get(localName);
|
|
5508
|
-
if (imported) return resolveExport(imported.file, imported.name, index,
|
|
5508
|
+
if (imported) return resolveExport(imported.file, imported.name, index, cache7, seen);
|
|
5509
5509
|
}
|
|
5510
5510
|
for (const reexport of info.reexports) {
|
|
5511
5511
|
if (reexport.exported !== name) continue;
|
|
5512
|
-
const target = resolveExport(reexport.file, reexport.name, index,
|
|
5512
|
+
const target = resolveExport(reexport.file, reexport.name, index, cache7, seen);
|
|
5513
5513
|
if (target) return target;
|
|
5514
5514
|
}
|
|
5515
5515
|
for (const target of info.stars) {
|
|
5516
|
-
const found = resolveExport(target, name, index,
|
|
5516
|
+
const found = resolveExport(target, name, index, cache7, seen);
|
|
5517
5517
|
if (found) return found;
|
|
5518
5518
|
}
|
|
5519
5519
|
return void 0;
|
|
5520
5520
|
}
|
|
5521
|
-
function usagesInFile(file, index,
|
|
5522
|
-
const info = moduleInfo(file, index,
|
|
5521
|
+
function usagesInFile(file, index, cache7) {
|
|
5522
|
+
const info = moduleInfo(file, index, cache7);
|
|
5523
5523
|
if (!info) return [];
|
|
5524
5524
|
const result = [];
|
|
5525
5525
|
const visit = (node) => {
|
|
@@ -5537,7 +5537,7 @@ function usagesInFile(file, index, cache6) {
|
|
|
5537
5537
|
const collect = (part) => {
|
|
5538
5538
|
if (ts8.isIdentifier(part)) {
|
|
5539
5539
|
const imported = info.imports.get(part.text);
|
|
5540
|
-
const resolved = imported ? resolveExport(imported.file, imported.name, index,
|
|
5540
|
+
const resolved = imported ? resolveExport(imported.file, imported.name, index, cache7, /* @__PURE__ */ new Set()) : void 0;
|
|
5541
5541
|
if (resolved) {
|
|
5542
5542
|
const symbol = `${resolved.origin}\0${resolved.name}`;
|
|
5543
5543
|
if (!identified.has(symbol)) {
|
|
@@ -5575,11 +5575,11 @@ function usagesInFile(file, index, cache6) {
|
|
|
5575
5575
|
return result;
|
|
5576
5576
|
}
|
|
5577
5577
|
function sharedClassReuses(index) {
|
|
5578
|
-
const
|
|
5578
|
+
const cache7 = /* @__PURE__ */ new Map();
|
|
5579
5579
|
const bySymbol = /* @__PURE__ */ new Map();
|
|
5580
5580
|
for (const file of [...index.modules.keys()].sort()) {
|
|
5581
5581
|
if (!/\.(?:tsx|jsx)$/u.test(file) || /\.(?:test|spec)\.(?:tsx|jsx)$/u.test(file)) continue;
|
|
5582
|
-
for (const occurrence of usagesInFile(file, index,
|
|
5582
|
+
for (const occurrence of usagesInFile(file, index, cache7)) {
|
|
5583
5583
|
const members = bySymbol.get(occurrence.symbol) ?? [];
|
|
5584
5584
|
members.push(occurrence);
|
|
5585
5585
|
bySymbol.set(occurrence.symbol, members);
|
|
@@ -11442,9 +11442,67 @@ var stylesheetOrderingRule = {
|
|
|
11442
11442
|
}
|
|
11443
11443
|
};
|
|
11444
11444
|
|
|
11445
|
+
// eslint/rules/tailwind/tailwind-default-comment.ts
|
|
11446
|
+
import { readFileSync as readFileSync16 } from "fs";
|
|
11447
|
+
import { createRequire } from "module";
|
|
11448
|
+
import { generate as generate4 } from "@eslint/css-tree";
|
|
11449
|
+
var cache6 = /* @__PURE__ */ new Map();
|
|
11450
|
+
var COMMENT = /;\s*\/\*\s*Tailwind default\s*\*\/\s*$/u;
|
|
11451
|
+
function normalize2(value) {
|
|
11452
|
+
return value.replace(/\s+/gu, " ").trim();
|
|
11453
|
+
}
|
|
11454
|
+
function tailwindDefaults(filename) {
|
|
11455
|
+
const require3 = createRequire(filename);
|
|
11456
|
+
let file;
|
|
11457
|
+
try {
|
|
11458
|
+
file = require3.resolve("tailwindcss/theme.css");
|
|
11459
|
+
} catch {
|
|
11460
|
+
return /* @__PURE__ */ new Map();
|
|
11461
|
+
}
|
|
11462
|
+
const existing = cache6.get(file);
|
|
11463
|
+
if (existing) return existing;
|
|
11464
|
+
const defaults = /* @__PURE__ */ new Map();
|
|
11465
|
+
for (const match of readFileSync16(file, "utf8").matchAll(/^\s*(?<token>--[\w-]+):\s*(?<value>[^;\r\n]+);/gmu)) {
|
|
11466
|
+
const { token, value } = match.groups ?? {};
|
|
11467
|
+
if (token && value) defaults.set(token, normalize2(value));
|
|
11468
|
+
}
|
|
11469
|
+
cache6.set(file, defaults);
|
|
11470
|
+
return defaults;
|
|
11471
|
+
}
|
|
11472
|
+
var tailwindDefaultCommentRule = {
|
|
11473
|
+
meta: {
|
|
11474
|
+
schema: [],
|
|
11475
|
+
type: "problem",
|
|
11476
|
+
docs: {
|
|
11477
|
+
description: "Require an inline Tailwind default comment on re-declared theme tokens matching installed Tailwind defaults."
|
|
11478
|
+
}
|
|
11479
|
+
},
|
|
11480
|
+
create(context) {
|
|
11481
|
+
const defaults = tailwindDefaults(context.filename);
|
|
11482
|
+
const lines = context.sourceCode.text.split(/\r?\n/u);
|
|
11483
|
+
return {
|
|
11484
|
+
"StyleSheet:exit"(sheet) {
|
|
11485
|
+
for (const theme of atrulesNamed(sheet, "theme")) {
|
|
11486
|
+
for (const child of blockChildren2(theme)) {
|
|
11487
|
+
if (child.type !== "Declaration" || !child.loc) continue;
|
|
11488
|
+
const expected = defaults.get(child.property);
|
|
11489
|
+
if (expected === void 0 || normalize2(generate4(child.value)) !== expected) continue;
|
|
11490
|
+
const line = lines[child.loc.end.line - 1] ?? "";
|
|
11491
|
+
if (COMMENT.test(line)) continue;
|
|
11492
|
+
context.report({
|
|
11493
|
+
node: child,
|
|
11494
|
+
message: `Tailwind default token ${child.property} MUST end with /* Tailwind default */ on the declaration line.`
|
|
11495
|
+
});
|
|
11496
|
+
}
|
|
11497
|
+
}
|
|
11498
|
+
}
|
|
11499
|
+
};
|
|
11500
|
+
}
|
|
11501
|
+
};
|
|
11502
|
+
|
|
11445
11503
|
// eslint/rules/tailwind/theme-mode.ts
|
|
11446
11504
|
import path75 from "path";
|
|
11447
|
-
import { generate as
|
|
11505
|
+
import { generate as generate5 } from "@eslint/css-tree";
|
|
11448
11506
|
var MODE_NAME = /^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/u;
|
|
11449
11507
|
var MODE_REFERENCE = /(?:^|[^a-z0-9-])(?<name>[a-z][a-z0-9]*(?:-[a-z0-9]+)*):(?=[a-z[(])/gu;
|
|
11450
11508
|
var MODE_ATTRIBUTE = /data-theme\s*=\s*["'](?<name>[a-z][a-z0-9]*(?:-[a-z0-9]+)*)["']/gu;
|
|
@@ -11491,7 +11549,7 @@ var themeModeRule = {
|
|
|
11491
11549
|
const registered = /* @__PURE__ */ new Set();
|
|
11492
11550
|
for (const variant of atrulesNamed(node, "custom-variant")) {
|
|
11493
11551
|
if (variant.type !== "Atrule") continue;
|
|
11494
|
-
const prelude = variant.prelude ?
|
|
11552
|
+
const prelude = variant.prelude ? generate5(variant.prelude) : "";
|
|
11495
11553
|
const name = variantName(prelude);
|
|
11496
11554
|
if (!name) continue;
|
|
11497
11555
|
if (!isModeVariant(name, prelude)) continue;
|
|
@@ -11520,14 +11578,14 @@ var themeModeRule = {
|
|
|
11520
11578
|
const globalRegistrations = current === globalFile ? registered : registeredModes(read(globalFile));
|
|
11521
11579
|
for (const variant of atrulesNamed(node, "variant")) {
|
|
11522
11580
|
if (variant.type !== "Atrule" || !variant.prelude) continue;
|
|
11523
|
-
const name = variantName(
|
|
11581
|
+
const name = variantName(generate5(variant.prelude));
|
|
11524
11582
|
if (name && (name === "dark" || name.startsWith("theme-") || globalRegistrations.has(name) || modeHints.has(name)) && !globalRegistrations.has(name)) {
|
|
11525
11583
|
context.report({ node: variant, message: MISSING_CSS_VARIANT(name) });
|
|
11526
11584
|
}
|
|
11527
11585
|
}
|
|
11528
11586
|
for (const rule of rules(node)) {
|
|
11529
11587
|
if (rule.type !== "Rule") continue;
|
|
11530
|
-
const selector =
|
|
11588
|
+
const selector = generate5(rule.prelude);
|
|
11531
11589
|
if (/\[\s*data-theme(?:\s*[~|^$*]?=|\s*\])/u.test(selector)) {
|
|
11532
11590
|
context.report({ node: rule, message: SELECTOR_OVERRIDE });
|
|
11533
11591
|
} else if (/\.dark(?![\w-])/u.test(selector)) {
|
|
@@ -11536,7 +11594,7 @@ var themeModeRule = {
|
|
|
11536
11594
|
}
|
|
11537
11595
|
walkNodes(node, (child) => {
|
|
11538
11596
|
if (child.type !== "Atrule" || child.name !== "media" || !child.prelude) return;
|
|
11539
|
-
if (/\bprefers-color-scheme\b/u.test(
|
|
11597
|
+
if (/\bprefers-color-scheme\b/u.test(generate5(child.prelude))) {
|
|
11540
11598
|
context.report({ node: child, message: SYSTEM_OVERRIDE });
|
|
11541
11599
|
}
|
|
11542
11600
|
});
|
|
@@ -11566,10 +11624,10 @@ var themeModeRule = {
|
|
|
11566
11624
|
|
|
11567
11625
|
// eslint/rules/tailwind/theme-reset.ts
|
|
11568
11626
|
import path76 from "path";
|
|
11569
|
-
import { generate as
|
|
11627
|
+
import { generate as generate6 } from "@eslint/css-tree";
|
|
11570
11628
|
function isThemeReset(node) {
|
|
11571
11629
|
if (!node) return false;
|
|
11572
|
-
if (node.type === "Declaration") return node.property === "--*" &&
|
|
11630
|
+
if (node.type === "Declaration") return node.property === "--*" && generate6(node.value).trim() === "initial";
|
|
11573
11631
|
if (node.type === "Raw") return /(?:^|[;{])\s*--\*\s*:\s*initial\s*(?:;|$)/u.test(node.value);
|
|
11574
11632
|
return false;
|
|
11575
11633
|
}
|
|
@@ -11625,7 +11683,7 @@ import path78 from "path";
|
|
|
11625
11683
|
|
|
11626
11684
|
// eslint/rules/tailwind/css-consumers.ts
|
|
11627
11685
|
import path77 from "path";
|
|
11628
|
-
import { generate as
|
|
11686
|
+
import { generate as generate7, parse as parse7 } from "@eslint/css-tree";
|
|
11629
11687
|
import * as ts17 from "typescript";
|
|
11630
11688
|
function contains2(text, name) {
|
|
11631
11689
|
return new RegExp(`(?<![\\w-])${escapeRegExp(name)}(?![\\w-])`, "u").test(text);
|
|
@@ -11729,7 +11787,7 @@ function inferCssConsumerPaths(options) {
|
|
|
11729
11787
|
const ast = parse7(src.content, { positions: true, parseAtrulePrelude: false });
|
|
11730
11788
|
if (ast.type !== "StyleSheet") continue;
|
|
11731
11789
|
for (const node of ast.children) {
|
|
11732
|
-
if (node.type !== "Atrule" || node.name !== "layer" || !node.loc || !node.prelude ||
|
|
11790
|
+
if (node.type !== "Atrule" || node.name !== "layer" || !node.loc || !node.prelude || generate7(node.prelude).trim() !== "base") {
|
|
11733
11791
|
continue;
|
|
11734
11792
|
}
|
|
11735
11793
|
const body = src.content.slice(node.loc.start.offset, node.loc.end.offset);
|
|
@@ -13002,7 +13060,7 @@ var utilityMappingRule = {
|
|
|
13002
13060
|
import { spawnSync as spawnSync3 } from "child_process";
|
|
13003
13061
|
import { existsSync as existsSync13 } from "fs";
|
|
13004
13062
|
import path83 from "path";
|
|
13005
|
-
import { generate as
|
|
13063
|
+
import { generate as generate8, parse as parse8, toPlainObject as toPlainObject2 } from "@eslint/css-tree";
|
|
13006
13064
|
function numericPart(value) {
|
|
13007
13065
|
const match = /^(?<negative>-?)(?<number>(?:\d+(?:\.\d+)?|\.\d+))(?<unit>%|px|rem|em|vw|vh|dvw|dvh|ch|fr|s|ms|deg|turn)?$/u.exec(
|
|
13008
13066
|
value
|
|
@@ -13029,7 +13087,7 @@ function simpleValueSlug(value) {
|
|
|
13029
13087
|
}
|
|
13030
13088
|
const variable = /^var\(--(?<name>[a-z][a-z0-9-]*)\)$/u.exec(word)?.groups?.name;
|
|
13031
13089
|
if (variable) {
|
|
13032
|
-
parts.push(
|
|
13090
|
+
parts.push(variable);
|
|
13033
13091
|
continue;
|
|
13034
13092
|
}
|
|
13035
13093
|
if (/^[a-z][a-z0-9-]*$/iu.test(word)) {
|
|
@@ -13108,10 +13166,10 @@ function compiledOperation(compiled, index) {
|
|
|
13108
13166
|
(child) => child.type === "Declaration" && child.property === "--tw-shadow"
|
|
13109
13167
|
);
|
|
13110
13168
|
if (shadow?.type === "Declaration") {
|
|
13111
|
-
return { property: "box-shadow", value:
|
|
13169
|
+
return { property: "box-shadow", value: generate8(shadow.value).trim() };
|
|
13112
13170
|
}
|
|
13113
13171
|
}
|
|
13114
|
-
return { property: declaration.property, value:
|
|
13172
|
+
return { property: declaration.property, value: generate8(declaration.value).trim() };
|
|
13115
13173
|
}
|
|
13116
13174
|
function propertyPrefix(property) {
|
|
13117
13175
|
return property.replace(/^-+/u, "").replace(/^background-/u, "bg-");
|
|
@@ -13194,6 +13252,7 @@ var utilityNameParityRule = {
|
|
|
13194
13252
|
var tailwindRules = {
|
|
13195
13253
|
"at-rule-spacing": atRuleSpacingRule,
|
|
13196
13254
|
"theme-reset": themeResetRule,
|
|
13255
|
+
"tailwind-default-comment": tailwindDefaultCommentRule,
|
|
13197
13256
|
"theme-token-order": themeTokenOrderRule,
|
|
13198
13257
|
"theme-mode": themeModeRule,
|
|
13199
13258
|
"color-role-usage": colorRoleUsageRule,
|
|
@@ -13367,8 +13426,8 @@ var uiStateRule = {
|
|
|
13367
13426
|
};
|
|
13368
13427
|
|
|
13369
13428
|
// eslint/rules/unknown-utility.ts
|
|
13370
|
-
import { existsSync as existsSync14, readdirSync as readdirSync6, readFileSync as
|
|
13371
|
-
import { createRequire } from "module";
|
|
13429
|
+
import { existsSync as existsSync14, readdirSync as readdirSync6, readFileSync as readFileSync17, statSync as statSync6 } from "fs";
|
|
13430
|
+
import { createRequire as createRequire2 } from "module";
|
|
13372
13431
|
import path85 from "path";
|
|
13373
13432
|
var PREFIX_NAMESPACES = {
|
|
13374
13433
|
bg: ["color", "background-image"],
|
|
@@ -13623,7 +13682,7 @@ var STATIC_COLOR_SPECIALS = /* @__PURE__ */ new Set(["transparent", "current", "
|
|
|
13623
13682
|
var NUMERIC_TOKEN_RE = /^-?(?:\d+\.?\d*|\.\d+)(?:%|px|rem|em)?$/;
|
|
13624
13683
|
var SIDE_WIDTH_TOKEN_RE = /^(?:x|y|t|r|b|l|s|e)-(?:\d+\.?\d*|\.\d+)(?:%|px|rem|em)?$/;
|
|
13625
13684
|
var OFFSET_TOKEN_RE = /^offset-(?:\d+\.?\d*|\.\d+)(?:%|px|rem|em)?$/;
|
|
13626
|
-
var require2 =
|
|
13685
|
+
var require2 = createRequire2(import.meta.url);
|
|
13627
13686
|
var tailwindMerge;
|
|
13628
13687
|
function getTailwindMerge() {
|
|
13629
13688
|
if (tailwindMerge !== void 0) return tailwindMerge ?? void 0;
|
|
@@ -13682,7 +13741,7 @@ function resolvePackageStylesheet(fromFile, specifier) {
|
|
|
13682
13741
|
const manifestPath = path85.join(packageRoot, "package.json");
|
|
13683
13742
|
if (existsSync14(manifestPath)) {
|
|
13684
13743
|
try {
|
|
13685
|
-
const manifest =
|
|
13744
|
+
const manifest = readFileSync17(manifestPath, "utf8");
|
|
13686
13745
|
const stylesheet = /"style"\s*:\s*"(?<file>[^"]+\.css)"/.exec(manifest)?.groups?.file;
|
|
13687
13746
|
const main = /"main"\s*:\s*"(?<file>[^"]+\.css)"/.exec(manifest)?.groups?.file;
|
|
13688
13747
|
const target = stylesheet ?? main;
|
|
@@ -13702,7 +13761,7 @@ function inventoryStylesheetFiles(projectFiles) {
|
|
|
13702
13761
|
for (const file of projectFiles) {
|
|
13703
13762
|
let css2;
|
|
13704
13763
|
try {
|
|
13705
|
-
css2 =
|
|
13764
|
+
css2 = readFileSync17(file, "utf8");
|
|
13706
13765
|
} catch {
|
|
13707
13766
|
continue;
|
|
13708
13767
|
}
|
|
@@ -13769,7 +13828,7 @@ function readInventory(files) {
|
|
|
13769
13828
|
for (const file of files) {
|
|
13770
13829
|
let css2;
|
|
13771
13830
|
try {
|
|
13772
|
-
css2 =
|
|
13831
|
+
css2 = readFileSync17(file, "utf8");
|
|
13773
13832
|
} catch {
|
|
13774
13833
|
continue;
|
|
13775
13834
|
}
|
|
@@ -14048,7 +14107,7 @@ var valueExtractionRule = {
|
|
|
14048
14107
|
};
|
|
14049
14108
|
|
|
14050
14109
|
// eslint/rules/vulyk/tracked-docs.ts
|
|
14051
|
-
import { existsSync as existsSync15, readFileSync as
|
|
14110
|
+
import { existsSync as existsSync15, readFileSync as readFileSync18 } from "fs";
|
|
14052
14111
|
import path88 from "path";
|
|
14053
14112
|
var PASIKA_REPO = "Bredansky/pasika";
|
|
14054
14113
|
var BASE_REQUIRED_TRACKED_DOCS = [
|
|
@@ -14091,7 +14150,7 @@ var trackedDocsRule = {
|
|
|
14091
14150
|
});
|
|
14092
14151
|
return;
|
|
14093
14152
|
}
|
|
14094
|
-
const config =
|
|
14153
|
+
const config = readFileSync18(configPath, "utf8");
|
|
14095
14154
|
if (!config.includes(PASIKA_REPO)) {
|
|
14096
14155
|
context.report({
|
|
14097
14156
|
node,
|
|
@@ -14415,14 +14474,14 @@ var zodSchemaValidationRule = {
|
|
|
14415
14474
|
};
|
|
14416
14475
|
|
|
14417
14476
|
// eslint/ts-alignment.ts
|
|
14418
|
-
import { readFileSync as
|
|
14419
|
-
import { createRequire as
|
|
14477
|
+
import { readFileSync as readFileSync19 } from "fs";
|
|
14478
|
+
import { createRequire as createRequire3 } from "module";
|
|
14420
14479
|
import { join } from "path";
|
|
14421
|
-
var ownRequire =
|
|
14480
|
+
var ownRequire = createRequire3(import.meta.url);
|
|
14422
14481
|
var majorOf = (version) => Number(version.split(".")[0]);
|
|
14423
14482
|
function versionOf(packagePath) {
|
|
14424
14483
|
try {
|
|
14425
|
-
const parsed = JSON.parse(
|
|
14484
|
+
const parsed = JSON.parse(readFileSync19(packagePath, "utf8"));
|
|
14426
14485
|
if (typeof parsed !== "object" || parsed === null || !("version" in parsed)) return null;
|
|
14427
14486
|
return typeof parsed.version === "string" ? parsed.version : null;
|
|
14428
14487
|
} catch {
|
|
@@ -14438,7 +14497,7 @@ function resolveTypescriptAlignment() {
|
|
|
14438
14497
|
}
|
|
14439
14498
|
let resolved = null;
|
|
14440
14499
|
try {
|
|
14441
|
-
const consumerRequire =
|
|
14500
|
+
const consumerRequire = createRequire3(join(process.cwd(), "package.json"));
|
|
14442
14501
|
resolved = versionOf(consumerRequire.resolve("typescript/package.json"));
|
|
14443
14502
|
} catch {
|
|
14444
14503
|
resolved = null;
|
|
@@ -14621,6 +14680,7 @@ var tailwindImportGraph = {
|
|
|
14621
14680
|
"pasika/at-rule-spacing": "error",
|
|
14622
14681
|
"pasika/no-attribute-selector": "error",
|
|
14623
14682
|
"pasika/no-simple-class-rule": "error",
|
|
14683
|
+
"pasika/tailwind-default-comment": "error",
|
|
14624
14684
|
"pasika/unused-css-definition": "error",
|
|
14625
14685
|
"pasika/css-entry-point": "error",
|
|
14626
14686
|
"pasika/feature-css-placement": "error",
|