arui-presets-lint 9.5.1 → 9.6.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ ## 9.6.0
2
+
3
+ ### Minor Changes
4
+
5
+ - [#125](https://github.com/core-ds/arui-presets-lint/pull/125) [`292ec32`](https://github.com/core-ds/arui-presets-lint/commit/292ec32d3f412dcb8f174256c73fe86b12951b02) Thanks [@dmitrbrvsk](https://github.com/dmitrbrvsk)! - В пресет stylelint добавлен плагин `stylelint-order` и правила `order/properties-order` и `order/order`.
6
+ За счёт них выравнивается порядок css свойств и выстраивается единообразный порядок вложенности в блоке.
7
+
8
+ ### Patch Changes
9
+
10
+ - Updated dependencies []:
11
+ - @alfalab/stylelint-core-vars@2.1.1
12
+
1
13
  ## 9.5.1
2
14
 
3
15
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arui-presets-lint",
3
- "version": "9.5.1",
3
+ "version": "9.6.0",
4
4
  "description": "Config files for arui-apps",
5
5
  "author": "core-ds contributors",
6
6
  "license": "MIT",
@@ -35,6 +35,7 @@
35
35
  "lefthook": "2.1.6",
36
36
  "prettier": "3.8.3",
37
37
  "stylelint": "16.26.1",
38
+ "stylelint-order": "8.1.1",
38
39
  "typescript-eslint": "8.59.1"
39
40
  },
40
41
  "engines": {
@@ -51,6 +51,18 @@ declare const _default: {
51
51
  except: string[];
52
52
  ignore: string[];
53
53
  })[];
54
+ 'order/properties-order': string[];
55
+ 'order/order': ((string | {
56
+ type: string;
57
+ name: string;
58
+ selector?: undefined;
59
+ } | {
60
+ type: string;
61
+ selector: string;
62
+ name?: undefined;
63
+ })[] | {
64
+ severity: string;
65
+ })[];
54
66
  };
55
67
  plugins: string[];
56
68
  overrides: {
@@ -125,8 +125,39 @@ export default {
125
125
  ignore: ['after-comment'],
126
126
  },
127
127
  ],
128
+ // Задаёт порядок перечисленных свойств относительно друг друга
129
+ // https://github.com/hudochenkov/stylelint-order/blob/master/rules/properties-order/README.md
130
+ 'order/properties-order': ['position', 'z-index', 'top', 'right', 'bottom', 'left'],
131
+ // Требует порядок вложенности: декларации > @media > псевдоэлементы > псевдоклассы > &__ > вложенные классы
132
+ // https://github.com/hudochenkov/stylelint-order/blob/master/rules/order/README.md
133
+ 'order/order': [
134
+ [
135
+ 'declarations',
136
+ {
137
+ type: 'at-rule',
138
+ name: 'media',
139
+ },
140
+ {
141
+ type: 'rule',
142
+ selector: '^&::(before|after)',
143
+ },
144
+ {
145
+ type: 'rule',
146
+ selector: String.raw `^&:\w`,
147
+ },
148
+ {
149
+ type: 'rule',
150
+ selector: '^&_',
151
+ },
152
+ {
153
+ type: 'rule',
154
+ selector: '^.',
155
+ },
156
+ ],
157
+ { severity: 'warning' },
158
+ ],
128
159
  },
129
- plugins: ['@alfalab/stylelint-core-vars'],
160
+ plugins: ['stylelint-order', '@alfalab/stylelint-core-vars'],
130
161
  overrides: [
131
162
  {
132
163
  files: ['*.module.css'],