pasika 0.10.32 → 0.10.33
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.
|
@@ -142,7 +142,7 @@ declare const vulykRules: {
|
|
|
142
142
|
* One plugin object every preset block references. ESLint only permits a
|
|
143
143
|
* plugin name to be redefined across configs when the value is the same
|
|
144
144
|
* object reference, and several blocks share file scopes (`src/**`, the
|
|
145
|
-
* manifest, `globals.css`), so a per-block plugin object would collide when
|
|
145
|
+
* manifest, `src/app/styles/globals.css`), so a per-block plugin object would collide when
|
|
146
146
|
* the blocks merge.
|
|
147
147
|
*/
|
|
148
148
|
declare const pasikaPlugin: {
|
|
@@ -7197,12 +7197,14 @@ function buildStylesheetGraph(options) {
|
|
|
7197
7197
|
}
|
|
7198
7198
|
|
|
7199
7199
|
// eslint/rules/tailwind/css-entry-point.ts
|
|
7200
|
+
var APP_STYLES_DIR = path54.join("app", "styles");
|
|
7201
|
+
var GLOBAL_STYLESHEET_PATH = path54.join(APP_STYLES_DIR, "globals.css");
|
|
7200
7202
|
var cssEntryPointRule = {
|
|
7201
7203
|
meta: {
|
|
7202
7204
|
schema: [],
|
|
7203
7205
|
type: "problem",
|
|
7204
7206
|
docs: {
|
|
7205
|
-
description: "Require one global entry point
|
|
7207
|
+
description: "Require the app/styles CSS root, one global entry point, and direct project-CSS imports."
|
|
7206
7208
|
}
|
|
7207
7209
|
},
|
|
7208
7210
|
create(context) {
|
|
@@ -7223,6 +7225,7 @@ var cssEntryPointRule = {
|
|
|
7223
7225
|
"StyleSheet:exit"(node) {
|
|
7224
7226
|
if (globals.length === 0) return;
|
|
7225
7227
|
const current = path54.normalize(path54.resolve(context.filename));
|
|
7228
|
+
const relative = path54.relative(sourceRoot, current);
|
|
7226
7229
|
if (globals.includes(current)) {
|
|
7227
7230
|
if (globals.length > 1) {
|
|
7228
7231
|
context.report({
|
|
@@ -7231,6 +7234,13 @@ var cssEntryPointRule = {
|
|
|
7231
7234
|
});
|
|
7232
7235
|
return;
|
|
7233
7236
|
}
|
|
7237
|
+
if (relative !== GLOBAL_STYLESHEET_PATH) {
|
|
7238
|
+
context.report({
|
|
7239
|
+
node,
|
|
7240
|
+
message: "The global stylesheet entry point must be src/app/styles/globals.css."
|
|
7241
|
+
});
|
|
7242
|
+
return;
|
|
7243
|
+
}
|
|
7234
7244
|
const basename = path54.basename(current);
|
|
7235
7245
|
const importCount = moduleFiles.filter((modulePath) => moduleImports(textOf(modulePath), basename)).length;
|
|
7236
7246
|
if (importCount !== 1) {
|
|
@@ -7241,6 +7251,14 @@ var cssEntryPointRule = {
|
|
|
7241
7251
|
}
|
|
7242
7252
|
return;
|
|
7243
7253
|
}
|
|
7254
|
+
const isInAppStyles = relative === APP_STYLES_DIR || relative.startsWith(`${APP_STYLES_DIR}${path54.sep}`);
|
|
7255
|
+
if (!isInAppStyles) {
|
|
7256
|
+
context.report({
|
|
7257
|
+
node,
|
|
7258
|
+
message: "Project stylesheets must live under src/app/styles/."
|
|
7259
|
+
});
|
|
7260
|
+
return;
|
|
7261
|
+
}
|
|
7244
7262
|
const hasProjectCss = node.children.some((child) => {
|
|
7245
7263
|
if (child.type === "Atrule" && child.name === "import") return false;
|
|
7246
7264
|
if (child.type === "Comment") return false;
|
|
@@ -8049,7 +8067,7 @@ var pasikaNextjsAppConfig = {
|
|
|
8049
8067
|
rules: Object.fromEntries(pasikaNextjsAppRuleIds.map((id) => [id, "error"]))
|
|
8050
8068
|
};
|
|
8051
8069
|
var tailwindStructureRules = {
|
|
8052
|
-
files: ["src
|
|
8070
|
+
files: ["src/app/styles/globals.css"],
|
|
8053
8071
|
plugins: {
|
|
8054
8072
|
css,
|
|
8055
8073
|
pasika: pasikaPlugin
|