pasika 0.10.132 → 0.10.133
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.
|
@@ -120,6 +120,7 @@ declare const nextjsPackageJsonRules: {
|
|
|
120
120
|
};
|
|
121
121
|
|
|
122
122
|
declare const tailwindRules: {
|
|
123
|
+
"at-rule-spacing": _eslint_css.CSSRuleDefinition;
|
|
123
124
|
"theme-reset": _eslint_css.CSSRuleDefinition;
|
|
124
125
|
"theme-mode": _eslint_css.CSSRuleDefinition;
|
|
125
126
|
"color-role-usage": _eslint_css.CSSRuleDefinition;
|
|
@@ -161,6 +162,7 @@ declare const pasikaPlugin: {
|
|
|
161
162
|
"exact-version": _eslint_json.JSONRuleDefinition;
|
|
162
163
|
"lint-setup": _eslint_json.JSONRuleDefinition;
|
|
163
164
|
"vitest-coverage": _eslint_json.JSONRuleDefinition;
|
|
165
|
+
"at-rule-spacing": _eslint_css.CSSRuleDefinition;
|
|
164
166
|
"theme-reset": _eslint_css.CSSRuleDefinition;
|
|
165
167
|
"theme-mode": _eslint_css.CSSRuleDefinition;
|
|
166
168
|
"color-role-usage": _eslint_css.CSSRuleDefinition;
|
|
@@ -9720,6 +9720,46 @@ var applyUsageRule = {
|
|
|
9720
9720
|
}
|
|
9721
9721
|
};
|
|
9722
9722
|
|
|
9723
|
+
// eslint/rules/tailwind/at-rule-spacing.ts
|
|
9724
|
+
var EMPTY_LINE = /\n[ \t]*\n/u;
|
|
9725
|
+
var LINE_BREAK = /\r\n|\n|\r/u;
|
|
9726
|
+
var atRuleSpacingRule = {
|
|
9727
|
+
meta: {
|
|
9728
|
+
schema: [],
|
|
9729
|
+
type: "layout",
|
|
9730
|
+
fixable: "whitespace",
|
|
9731
|
+
docs: {
|
|
9732
|
+
description: "Require a blank line between adjacent top-level CSS at-rules, excluding grouped imports."
|
|
9733
|
+
}
|
|
9734
|
+
},
|
|
9735
|
+
create(context) {
|
|
9736
|
+
return {
|
|
9737
|
+
"StyleSheet:exit"(node) {
|
|
9738
|
+
const source = context.sourceCode.text;
|
|
9739
|
+
const newline = source.includes("\r\n") ? "\r\n" : "\n";
|
|
9740
|
+
for (let index = 1; index < node.children.length; index += 1) {
|
|
9741
|
+
const previous = node.children[index - 1];
|
|
9742
|
+
const current = node.children[index];
|
|
9743
|
+
if (previous?.type !== "Atrule" || current?.type !== "Atrule") continue;
|
|
9744
|
+
if (previous.name === "import" && current.name === "import") continue;
|
|
9745
|
+
if (!previous.loc || !current.loc) continue;
|
|
9746
|
+
const start = previous.loc.end.offset;
|
|
9747
|
+
const end = current.loc.start.offset;
|
|
9748
|
+
const between = source.slice(start, end);
|
|
9749
|
+
if (EMPTY_LINE.test(between.replace(/\r\n|\r/gu, "\n"))) continue;
|
|
9750
|
+
context.report({
|
|
9751
|
+
node: current,
|
|
9752
|
+
message: "Adjacent top-level @ rules must have a blank line between them.",
|
|
9753
|
+
fix(fixer) {
|
|
9754
|
+
return fixer.insertTextBeforeRange([end, end], LINE_BREAK.test(between) ? newline : newline + newline);
|
|
9755
|
+
}
|
|
9756
|
+
});
|
|
9757
|
+
}
|
|
9758
|
+
}
|
|
9759
|
+
};
|
|
9760
|
+
}
|
|
9761
|
+
};
|
|
9762
|
+
|
|
9723
9763
|
// eslint/rules/tailwind/base-layer-pair.ts
|
|
9724
9764
|
import { existsSync as existsSync8 } from "fs";
|
|
9725
9765
|
import path66 from "path";
|
|
@@ -12183,6 +12223,7 @@ var utilityNameParityRule = {
|
|
|
12183
12223
|
|
|
12184
12224
|
// eslint/rules/tailwind/index.ts
|
|
12185
12225
|
var tailwindRules = {
|
|
12226
|
+
"at-rule-spacing": atRuleSpacingRule,
|
|
12186
12227
|
"theme-reset": themeResetRule,
|
|
12187
12228
|
"theme-mode": themeModeRule,
|
|
12188
12229
|
"color-role-usage": colorRoleUsageRule,
|
|
@@ -13592,6 +13633,7 @@ var tailwindImportGraph = {
|
|
|
13592
13633
|
language: "css/css",
|
|
13593
13634
|
languageOptions: { tolerant: true },
|
|
13594
13635
|
rules: {
|
|
13636
|
+
"pasika/at-rule-spacing": "error",
|
|
13595
13637
|
"pasika/css-entry-point": "error",
|
|
13596
13638
|
"pasika/feature-css-placement": "error",
|
|
13597
13639
|
"pasika/unique-css-definition": "error",
|