@maz-ui/stylelint-config 5.0.0-beta.4 → 5.0.0-beta.47

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.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { Config } from 'stylelint';
1
+ import { Config as Config$1 } from 'stylelint';
2
2
 
3
3
  /**
4
4
  * Mirror of `@maz-ui/node`'s LogLevel — kept inline here to avoid making this
@@ -9,9 +9,9 @@ import { Config } from 'stylelint';
9
9
  */
10
10
  type LogLevel = 'silent' | 'error' | 'warning' | 'normal' | 'default' | 'debug' | 'trace' | 'verbose';
11
11
 
12
- type StylelintConfig = Config;
13
- type StylelintRules = Config['rules'];
14
- type StylelintOverride = NonNullable<Config['overrides']>[number];
12
+ type StylelintConfig = Config$1;
13
+ type StylelintRules = Config$1['rules'];
14
+ type StylelintOverride = NonNullable<Config$1['overrides']>[number];
15
15
  /**
16
16
  * Property order strategy.
17
17
  *
@@ -124,7 +124,7 @@ interface MazStylelintOptions {
124
124
  /**
125
125
  * Additional plugins merged on top of the resolved configuration.
126
126
  */
127
- plugins?: NonNullable<Config['plugins']>;
127
+ plugins?: NonNullable<Config$1['plugins']>;
128
128
  /**
129
129
  * Additional shareable configs to extend, appended after the built-in
130
130
  * extends so user configs win the cascade (e.g. `stylelint-config-clean-order`
@@ -170,7 +170,7 @@ declare const baseRules: StylelintRules;
170
170
  * Glob patterns Stylelint should ignore by default. Mirrors the eslint-config
171
171
  * defaults plus a few CSS-specific build outputs.
172
172
  */
173
- declare const GLOBAL_IGNORES: string[];
173
+ declare const GLOBAL_IGNORES: Config;
174
174
 
175
175
  /**
176
176
  * Flag every physical property/value that has a logical equivalent.
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Config } from 'stylelint';
1
+ import { Config as Config$1 } from 'stylelint';
2
2
 
3
3
  /**
4
4
  * Mirror of `@maz-ui/node`'s LogLevel — kept inline here to avoid making this
@@ -9,9 +9,9 @@ import { Config } from 'stylelint';
9
9
  */
10
10
  type LogLevel = 'silent' | 'error' | 'warning' | 'normal' | 'default' | 'debug' | 'trace' | 'verbose';
11
11
 
12
- type StylelintConfig = Config;
13
- type StylelintRules = Config['rules'];
14
- type StylelintOverride = NonNullable<Config['overrides']>[number];
12
+ type StylelintConfig = Config$1;
13
+ type StylelintRules = Config$1['rules'];
14
+ type StylelintOverride = NonNullable<Config$1['overrides']>[number];
15
15
  /**
16
16
  * Property order strategy.
17
17
  *
@@ -124,7 +124,7 @@ interface MazStylelintOptions {
124
124
  /**
125
125
  * Additional plugins merged on top of the resolved configuration.
126
126
  */
127
- plugins?: NonNullable<Config['plugins']>;
127
+ plugins?: NonNullable<Config$1['plugins']>;
128
128
  /**
129
129
  * Additional shareable configs to extend, appended after the built-in
130
130
  * extends so user configs win the cascade (e.g. `stylelint-config-clean-order`
@@ -170,7 +170,7 @@ declare const baseRules: StylelintRules;
170
170
  * Glob patterns Stylelint should ignore by default. Mirrors the eslint-config
171
171
  * defaults plus a few CSS-specific build outputs.
172
172
  */
173
- declare const GLOBAL_IGNORES: string[];
173
+ declare const GLOBAL_IGNORES: Config;
174
174
 
175
175
  /**
176
176
  * Flag every physical property/value that has a logical equivalent.
package/dist/index.mjs CHANGED
@@ -1,6 +1,7 @@
1
1
  import { readFileSync } from 'node:fs';
2
2
  import { createRequire } from 'node:module';
3
3
  import { join } from 'node:path';
4
+ import { fileURLToPath } from 'node:url';
4
5
  import { createConsola } from 'consola';
5
6
  import { noInvalidApplyPlugin, noInvalidThemeFunctionPlugin, noAtomicClassPlugin, noApplyPlugin, noArbitraryValuePlugin, noThemeFunctionPlugin, noScreenDirectivePlugin, noTailwindDirectivePlugin, noImportDirectivePlugin, noCssLayerPlugin } from 'stylelint-plugin-tailwindcss';
6
7
 
@@ -127,6 +128,14 @@ const TAILWIND_AT_RULES = [
127
128
  ];
128
129
  const tailwindRules = {
129
130
  "at-rule-no-deprecated": [true, { ignoreAtRules: ["apply"] }],
131
+ /**
132
+ * `stylelint-config-recommended@18` enables the core rule
133
+ * `at-rule-prelude-no-invalid`, which validates the prelude of `@apply`
134
+ * against css-tree. A list of Tailwind utilities (`@apply maz:flex …`) is
135
+ * not a valid prelude grammar, so every `@apply` triggers a false positive.
136
+ * Whitelist Tailwind's at-rules (keeping `media`, ignored by recommended).
137
+ */
138
+ "at-rule-prelude-no-invalid": [true, { ignoreAtRules: [...TAILWIND_AT_RULES, "media"] }],
130
139
  /**
131
140
  * Tailwind v4 only parses the `prefix(...)` modifier on the bare-string
132
141
  * `@import "..."` form; wrapping the URL in `url(...)` swallows the modifier
@@ -215,9 +224,14 @@ const TAG = "[@maz-ui/stylelint-config]";
215
224
  const internalRequire = createRequire(import.meta.url);
216
225
  function resolveInternal(name) {
217
226
  try {
218
- return internalRequire.resolve(name);
227
+ const resolved = import.meta.resolve(name);
228
+ return resolved.startsWith("file:") ? fileURLToPath(resolved) : resolved;
219
229
  } catch {
220
- return name;
230
+ try {
231
+ return internalRequire.resolve(name);
232
+ } catch {
233
+ return name;
234
+ }
221
235
  }
222
236
  }
223
237
  function readConsumerPackageJson() {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@maz-ui/stylelint-config",
3
3
  "type": "module",
4
- "version": "5.0.0-beta.4",
4
+ "version": "5.0.0-beta.47",
5
5
  "description": "Stylelint configuration for CSS, SCSS, Vue and Tailwind CSS projects",
6
6
  "author": "Louis Mazel <me@loicmazuel.com>",
7
7
  "license": "MIT",
@@ -27,7 +27,8 @@
27
27
  "exports": {
28
28
  ".": {
29
29
  "types": "./dist/index.d.ts",
30
- "import": "./dist/index.mjs"
30
+ "import": "./dist/index.mjs",
31
+ "default": "./dist/index.mjs"
31
32
  }
32
33
  },
33
34
  "main": "./dist/index.mjs",
@@ -45,23 +46,22 @@
45
46
  },
46
47
  "dependencies": {
47
48
  "consola": "^3.4.2",
48
- "postcss-html": "^1.8.1",
49
+ "postcss-html": "^2.0.0",
49
50
  "postcss-scss": "^4.0.9",
50
- "stylelint-config-html": "^1.1.0",
51
- "stylelint-config-recess-order": "^7.7.0",
52
- "stylelint-config-recommended-vue": "^1.6.1",
51
+ "stylelint-config-html": "^2.0.0",
52
+ "stylelint-config-recess-order": "^7.8.0",
53
+ "stylelint-config-recommended-vue": "^2.0.0",
53
54
  "stylelint-config-standard": "^40.0.0",
54
55
  "stylelint-config-standard-scss": "^17.0.0",
55
56
  "stylelint-order": "^8.1.1",
56
- "stylelint-plugin-tailwindcss": "^2.0.3",
57
+ "stylelint-plugin-tailwindcss": "^3.1.3",
57
58
  "stylelint-use-logical-spec": "^5.0.1"
58
59
  },
59
60
  "devDependencies": {
60
- "@vitest/coverage-v8": "^4.1.5",
61
- "stylelint": "^17.11.0",
62
- "unbuild": "^3.6.1",
63
- "vitest": "^4.1.5",
64
- "@maz-ui/eslint-config": "5.0.0-beta.4"
61
+ "@maz-ui/eslint-config": "5.0.0-beta.47",
62
+ "@vitest/coverage-v8": "^5.0.3",
63
+ "stylelint": "^17.16.0",
64
+ "unbuild": "^3.6.1"
65
65
  },
66
66
  "lint-staged": {
67
67
  "*.{js,jsx,ts,tsx,mjs,mts,cjs,md,yml,json}": [
@@ -69,7 +69,6 @@
69
69
  ]
70
70
  },
71
71
  "scripts": {
72
- "codegen": "nx build",
73
72
  "build": "unbuild",
74
73
  "dev": "unbuild --stub",
75
74
  "typecheck": "tsc --build",