@maz-ui/stylelint-config 5.2.0 → 5.3.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.
Files changed (3) hide show
  1. package/README.md +4 -1
  2. package/dist/index.mjs +66 -24
  3. package/package.json +10 -10
package/README.md CHANGED
@@ -44,7 +44,10 @@ defineConfig({
44
44
  'no-descending-specificity': null,
45
45
  },
46
46
  overrides: [
47
- { files: ['**/*.legacy.css'], rules: { 'color-no-invalid-hex': null } },
47
+ {
48
+ files: ['**/*.legacy.css'],
49
+ rules: { 'color-no-invalid-hex': null }
50
+ },
48
51
  ],
49
52
  extends: ['stylelint-config-clean-order'], // layer extra shareable configs
50
53
  logLevel: 'default', // 'silent' | 'default' | 'debug' | 'verbose' — see "Logging" below
package/dist/index.mjs CHANGED
@@ -22,9 +22,12 @@ const baseRules = {
22
22
  * Allow author-time use of Vue's `v-bind()` and the (now widely supported)
23
23
  * native `light-dark()` color function.
24
24
  */
25
- "function-no-unknown": [true, {
26
- ignoreFunctions: ["v-bind", "light-dark"]
27
- }],
25
+ "function-no-unknown": [
26
+ true,
27
+ {
28
+ ignoreFunctions: ["v-bind", "light-dark"]
29
+ }
30
+ ],
28
31
  /**
29
32
  * Native CSS nesting now allows scoping inside another at-rule without an
30
33
  * explicit selector — the `& selector` form is valid in 2026 browsers and
@@ -35,9 +38,12 @@ const baseRules = {
35
38
  * Allow `:deep()` (Vue scoped-style descent) and `:global()` (CSS Modules)
36
39
  * out of the box.
37
40
  */
38
- "selector-pseudo-class-no-unknown": [true, {
39
- ignorePseudoClasses: ["deep", "global", "slotted", "where"]
40
- }],
41
+ "selector-pseudo-class-no-unknown": [
42
+ true,
43
+ {
44
+ ignorePseudoClasses: ["deep", "global", "slotted", "where"]
45
+ }
46
+ ],
41
47
  /**
42
48
  * Custom property names follow kebab-case in our public CSS APIs
43
49
  * (`--maz-primary`, `--m-btn-bg`). Standard config already allows this but
@@ -53,9 +59,12 @@ const baseRules = {
53
59
  * Be lenient on shorthand collapsing — `grid-template`/`grid-template-areas`
54
60
  * and the `inset` longhands are routinely written long-form for readability.
55
61
  */
56
- "declaration-block-no-redundant-longhand-properties": [true, {
57
- ignoreShorthands: ["grid-template", "inset"]
58
- }]
62
+ "declaration-block-no-redundant-longhand-properties": [
63
+ true,
64
+ {
65
+ ignoreShorthands: ["grid-template", "inset"]
66
+ }
67
+ ]
59
68
  };
60
69
 
61
70
  const GLOBAL_IGNORES = [
@@ -127,7 +136,12 @@ const TAILWIND_AT_RULES = [
127
136
  "responsive"
128
137
  ];
129
138
  const tailwindRules = {
130
- "at-rule-no-deprecated": [true, { ignoreAtRules: ["apply"] }],
139
+ "at-rule-no-deprecated": [
140
+ true,
141
+ {
142
+ ignoreAtRules: ["apply"]
143
+ }
144
+ ],
131
145
  /**
132
146
  * `stylelint-config-recommended@18` enables the core rule
133
147
  * `at-rule-prelude-no-invalid`, which validates the prelude of `@apply`
@@ -135,7 +149,12 @@ const tailwindRules = {
135
149
  * not a valid prelude grammar, so every `@apply` triggers a false positive.
136
150
  * Whitelist Tailwind's at-rules (keeping `media`, ignored by recommended).
137
151
  */
138
- "at-rule-prelude-no-invalid": [true, { ignoreAtRules: [...TAILWIND_AT_RULES, "media"] }],
152
+ "at-rule-prelude-no-invalid": [
153
+ true,
154
+ {
155
+ ignoreAtRules: [...TAILWIND_AT_RULES, "media"]
156
+ }
157
+ ],
139
158
  /**
140
159
  * Tailwind v4 only parses the `prefix(...)` modifier on the bare-string
141
160
  * `@import "..."` form; wrapping the URL in `url(...)` swallows the modifier
@@ -144,7 +163,10 @@ const tailwindRules = {
144
163
  "import-notation": "string"
145
164
  };
146
165
  const tailwindAtRuleNoUnknown = {
147
- "at-rule-no-unknown": [true, { ignoreAtRules: TAILWIND_AT_RULES }]
166
+ "at-rule-no-unknown": [
167
+ true,
168
+ { ignoreAtRules: TAILWIND_AT_RULES }
169
+ ]
148
170
  };
149
171
  const tailwindPluginMinimal = {};
150
172
  const tailwindPluginMinimalInstances = [];
@@ -205,12 +227,15 @@ const SCSS_AT_RULES = [
205
227
  ];
206
228
  function scssRules(includeTailwind) {
207
229
  return {
208
- "scss/at-rule-no-unknown": [true, {
209
- ignoreAtRules: [
210
- ...SCSS_AT_RULES,
211
- ...includeTailwind ? TAILWIND_AT_RULES : []
212
- ]
213
- }],
230
+ "scss/at-rule-no-unknown": [
231
+ true,
232
+ {
233
+ ignoreAtRules: [
234
+ ...SCSS_AT_RULES,
235
+ ...includeTailwind ? TAILWIND_AT_RULES : []
236
+ ]
237
+ }
238
+ ],
214
239
  /**
215
240
  * SCSS `@use` is forbidden by default in some configs because it must be
216
241
  * at the very top of the file. We trust authors here — the SCSS compiler
@@ -255,7 +280,10 @@ function resolveTailwind(option, pkg) {
255
280
  if (typeof option === "string")
256
281
  return { value: option, source: "explicit" };
257
282
  const detected = hasDependency(pkg, "tailwindcss", "@tailwindcss/vite");
258
- return { value: detected ? "minimal" : false, source: "auto-detected" };
283
+ return {
284
+ value: detected ? "minimal" : false,
285
+ source: "auto-detected"
286
+ };
259
287
  }
260
288
  function resolveBoolean(explicit, detected) {
261
289
  if (explicit !== void 0)
@@ -277,8 +305,14 @@ function formatResolutionBox(resolved) {
277
305
  ["html", `${resolved.html}${formatSourceTag(resolved.htmlSource)}`],
278
306
  ["tailwind", `${tailwindLabel}${formatSourceTag(resolved.tailwindSource)}`],
279
307
  ["scss", `${resolved.scss}${formatSourceTag(resolved.scssSource)}`],
280
- ["logical", String(resolved.logical)],
281
- ["order", String(orderLabel)]
308
+ [
309
+ "logical",
310
+ String(resolved.logical)
311
+ ],
312
+ [
313
+ "order",
314
+ String(orderLabel)
315
+ ]
282
316
  ];
283
317
  const labelWidth = Math.max(...rows.map(([k]) => k.length));
284
318
  return rows.map(([k, v]) => `${k.padEnd(labelWidth)} ${v}`).join("\n");
@@ -328,7 +362,10 @@ function applyVueAndHtml(resolved, ctx) {
328
362
  const vueGlobs = resolved.vue ? ["**/*.vue"] : [];
329
363
  const htmlGlobs = resolved.html ? ["**/*.html"] : [];
330
364
  ctx.overrides.push({
331
- files: [...vueGlobs, ...htmlGlobs],
365
+ files: [
366
+ ...vueGlobs,
367
+ ...htmlGlobs
368
+ ],
332
369
  customSyntax: resolveInternal("postcss-html")
333
370
  });
334
371
  }
@@ -387,7 +424,9 @@ function defineConfig(options = {}) {
387
424
  style: { borderColor: "cyan", padding: 1 }
388
425
  });
389
426
  const ctx = {
390
- extends: [resolveInternal("stylelint-config-standard")],
427
+ extends: [
428
+ resolveInternal("stylelint-config-standard")
429
+ ],
391
430
  plugins: [],
392
431
  rules: { ...baseRules },
393
432
  overrides: [],
@@ -406,7 +445,10 @@ function defineConfig(options = {}) {
406
445
  applyTailwind(resolved, ctx);
407
446
  applyLogical(resolved, ctx);
408
447
  applyUserOverrides(options, ctx);
409
- const ignoreFiles = options.ignoresOverride ?? [...GLOBAL_IGNORES, ...options.ignores ?? []];
448
+ const ignoreFiles = options.ignoresOverride ?? [
449
+ ...GLOBAL_IGNORES,
450
+ ...options.ignores ?? []
451
+ ];
410
452
  log.verbose(`${TAG} Final extends (${ctx.extends.length}): ${ctx.extends.join(", ")}`);
411
453
  log.verbose(`${TAG} Final plugin count: ${ctx.plugins.length}, rule count: ${Object.keys(ctx.rules).length}, override count: ${ctx.overrides.length}, ignore globs: ${ignoreFiles.length}`);
412
454
  return {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@maz-ui/stylelint-config",
3
3
  "type": "module",
4
- "version": "5.2.0",
4
+ "version": "5.3.0",
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",
@@ -39,7 +39,7 @@
39
39
  "dist"
40
40
  ],
41
41
  "engines": {
42
- "node": ">=22.12.0"
42
+ "node": "^22.23.4 || ^24.22.1 || >=26.12.1"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "stylelint": ">=16.0.0 <18.0.0"
@@ -49,24 +49,24 @@
49
49
  "postcss-html": "^2.0.0",
50
50
  "postcss-scss": "^4.0.9",
51
51
  "stylelint-config-html": "^2.0.0",
52
- "stylelint-config-recess-order": "^7.8.2",
52
+ "stylelint-config-recess-order": "^7.10.0",
53
53
  "stylelint-config-recommended-vue": "^2.0.0",
54
54
  "stylelint-config-standard": "^40.0.0",
55
55
  "stylelint-config-standard-scss": "^17.0.0",
56
- "stylelint-order": "^8.1.2",
57
- "stylelint-plugin-tailwindcss": "^3.1.3",
56
+ "stylelint-order": "^8.1.3",
57
+ "stylelint-plugin-tailwindcss": "^3.1.5",
58
58
  "stylelint-use-logical-spec": "^5.0.1"
59
59
  },
60
60
  "devDependencies": {
61
- "@maz-ui/eslint-config": "^5.0.0",
62
- "@types/node": "^22.20.5",
63
- "@vitest/coverage-v8": "^5.0.5",
61
+ "@maz-ui/eslint-config": "^5.3.0",
62
+ "@types/node": "^26.6.6",
63
+ "@vitest/coverage-v8": "^5.1.0",
64
64
  "cross-env": "^10.1.0",
65
- "eslint": "^10.13.0",
65
+ "eslint": "^10.14.0",
66
66
  "stylelint": "^17.16.0",
67
67
  "typescript": "^6.0.3",
68
68
  "unbuild": "^3.6.1",
69
- "vitest": "5.0.5"
69
+ "vitest": "5.1.0"
70
70
  },
71
71
  "lint-staged": {
72
72
  "*.{js,jsx,ts,tsx,mjs,mts,cjs,md,yml,json}": [