@itcase/lint 1.1.133 → 1.1.134

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/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## [1.1.134](https://github.com/ITCase/itcase-lint/compare/v1.1.133...v1.1.134) (2026-11-07)
2
+
3
+ ### Features
4
+
5
+ * **stylelint:** allow postcss-each tokens in custom property and selector patterns ([5eecfdc](https://github.com/ITCase/itcase-lint/commit/5eecfdce9e713f903be4cfac81617cb698891d71))
6
+
1
7
  ## [1.1.133](https://github.com/ITCase/itcase-lint/compare/v1.1.132...v1.1.133) (2026-11-07)
2
8
 
3
9
  ### Refactoring
@@ -79,9 +79,7 @@ declare const _default: {
79
79
  severity: string;
80
80
  })[];
81
81
  'selector-nested-pattern': string;
82
- 'selector-type-no-unknown': (boolean | {
83
- ignoreTypes: string[];
84
- })[];
82
+ 'selector-type-no-unknown': null;
85
83
  'shorthand-property-no-redundant-values': null;
86
84
  };
87
85
  };
@@ -65,7 +65,8 @@ var index = {
65
65
  },
66
66
  ],
67
67
  'custom-property-empty-line-before': null,
68
- 'custom-property-pattern': '[a-z].*',
68
+ // kebab-case, плюс $(token) из postcss-each.
69
+ 'custom-property-pattern': '^(?:[a-z]|\\$\\([A-Za-z0-9-]+\\))(?:[a-z0-9-]|\\$\\([A-Za-z0-9-]+\\))*$',
69
70
  'declaration-empty-line-before': 'never',
70
71
  'declaration-property-value-no-unknown': [
71
72
  true,
@@ -249,19 +250,16 @@ var index = {
249
250
  ignore: ['after-comment'],
250
251
  },
251
252
  ],
253
+ // block[-part][__element]*[_modifier]*[--modifier]*, $(token) в частях.
252
254
  'selector-class-pattern': [
253
- '^[a-z]([-]?[a-z0-9]+)*(__[a-z0-9]([-]?[a-z0-9]+)*)?(--[a-z0-9]([-]?[a-z0-9]+)*)?$',
255
+ '^[a-z][a-z0-9]*(-[a-z0-9]+)*(?:__[a-zA-Z0-9$()-]+)*(?:_[a-zA-Z0-9$()-]+)*(?:--[a-zA-Z0-9$()-]+)*$',
254
256
  {
255
257
  severity: 'warning',
256
258
  },
257
259
  ],
258
- 'selector-nested-pattern': '&_*',
259
- 'selector-type-no-unknown': [
260
- true,
261
- {
262
- ignoreTypes: ['/^/'],
263
- },
264
- ],
260
+ // Вложенный селектор: & / ^& / &&, дальше БЭМ, псевдо, атрибут или комбинатор.
261
+ 'selector-nested-pattern': '^(?:[a-z]+&+|\\.[a-z][\\w-]*&+|>\\s+\\^+&+|&+\\^+&+|\\^+&+|&+)(?:(?:__|--|_|-)[\\w$().-]*|::[\\w-]+|:[\\w-]+(?:\\([^)]*\\))?|\\[[^\\]]+\\]|\\.[\\w$().-]+|[A-Za-z0-9]+)?(?:\\s*[>~+]\\s+\\S+|\\s+\\S+|\\.[\\w$().-]+|::[\\w-]+|:[\\w-]+(?:\\([^)]*\\))?|\\[[^\\]]+\\])*$',
262
+ 'selector-type-no-unknown': null,
265
263
  'shorthand-property-no-redundant-values': null,
266
264
  },
267
265
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itcase/lint",
3
- "version": "1.1.133",
3
+ "version": "1.1.134",
4
4
  "author": "ITCase",
5
5
  "description": "Code style linter configuration presets ",
6
6
  "engines": {