stylelint-order 7.0.0 → 8.0.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/README.md CHANGED
@@ -52,7 +52,7 @@ Every rule supports autofixing with `stylelint --fix`. [postcss-sorting] is used
52
52
 
53
53
  Automatic sorting has some limitations that are described for every rule, if any. Please, take a look at [how comments are handled](https://github.com/hudochenkov/postcss-sorting#handling-comments) by `postcss-sorting`.
54
54
 
55
- CSS-in-JS styles with template interpolation [could be ignored by autofixing](https://github.com/hudochenkov/postcss-sorting#css-in-js) to avoid style corruption.
55
+ CSS-in-JS styles with template interpolation [has limited autofixing](https://github.com/hudochenkov/postcss-sorting#css-in-js) to avoid style corruption.
56
56
 
57
57
  Autofixing in Less syntax may work but isn't officially supported.
58
58
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stylelint-order",
3
- "version": "7.0.0",
3
+ "version": "8.0.0",
4
4
  "description": "A collection of order related linting rules for Stylelint.",
5
5
  "keywords": [
6
6
  "stylelint-plugin",
@@ -26,33 +26,33 @@
26
26
  "node": ">=20.19.0"
27
27
  },
28
28
  "dependencies": {
29
- "postcss": "^8.5.3",
30
- "postcss-sorting": "^9.1.0"
29
+ "postcss": "^8.5.8",
30
+ "postcss-sorting": "^10.0.0"
31
31
  },
32
32
  "peerDependencies": {
33
- "stylelint": "^16.18.0"
33
+ "stylelint": "^16.18.0 || ^17.0.0"
34
34
  },
35
35
  "devDependencies": {
36
- "eslint": "^9.24.0",
37
- "eslint-config-hudochenkov": "^11.0.0",
38
- "eslint-config-prettier": "^10.1.2",
39
- "globals": "^16.0.0",
36
+ "eslint": "^9.39.4",
37
+ "eslint-config-hudochenkov": "^13.0.0",
38
+ "eslint-config-prettier": "^10.1.8",
39
+ "globals": "^17.4.0",
40
40
  "husky": "^9.1.7",
41
- "jest": "^29.7.0",
42
- "jest-light-runner": "^0.7.4",
43
- "jest-preset-stylelint": "^7.3.0",
44
- "jest-watch-typeahead": "^2.2.2",
45
- "lint-staged": "^15.5.1",
46
- "postcss-html": "^1.8.0",
41
+ "jest": "^30.2.0",
42
+ "jest-light-runner": "^0.7.11",
43
+ "jest-preset-stylelint": "^9.1.0",
44
+ "jest-watch-typeahead": "^3.0.1",
45
+ "lint-staged": "^16.3.2",
46
+ "postcss-html": "^1.8.1",
47
47
  "postcss-less": "^6.0.0",
48
48
  "postcss-styled-syntax": "^0.7.1",
49
- "prettier": "~3.5.3",
49
+ "prettier": "~3.8.1",
50
50
  "prettier-config-hudochenkov": "^0.4.0",
51
- "stylelint": "^16.18.0"
51
+ "stylelint": "^17.4.0"
52
52
  },
53
53
  "scripts": {
54
54
  "lint": "eslint . --max-warnings 0 && prettier '**/*.js' --check",
55
- "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
55
+ "test": "jest",
56
56
  "watch": "npm run test -- --watch",
57
57
  "coverage": "npm run test -- --coverage",
58
58
  "fix": "eslint . --fix --max-warnings 0 && prettier '**/*.js' --write",
@@ -15,7 +15,14 @@ Specify the order of content within declaration blocks.
15
15
  ```ts
16
16
  type PrimaryOption = Array<Keyword | AtRule | Rule>;
17
17
 
18
- type Keyword = "custom-properties" | "dollar-variables" | "at-variables" | "declarations" | "rules" | "at-rules" | "less-mixins";
18
+ type Keyword =
19
+ | 'custom-properties'
20
+ | 'dollar-variables'
21
+ | 'at-variables'
22
+ | 'declarations'
23
+ | 'rules'
24
+ | 'at-rules'
25
+ | 'less-mixins';
19
26
 
20
27
  type AtRule = {
21
28
  type: 'at-rule';
@@ -63,4 +63,5 @@ rule.messages = messages;
63
63
  rule.primaryOptionArray = true;
64
64
  rule.meta = {
65
65
  fixable: true,
66
+ url: 'https://github.com/hudochenkov/stylelint-order/blob/master/rules/order/README.md',
66
67
  };
@@ -59,4 +59,5 @@ rule.ruleName = ruleName;
59
59
  rule.messages = messages;
60
60
  rule.meta = {
61
61
  fixable: true,
62
+ url: 'https://github.com/hudochenkov/stylelint-order/blob/master/rules/properties-alphabetical-order/README.md',
62
63
  };
@@ -78,4 +78,5 @@ rule.ruleName = ruleName;
78
78
  rule.messages = messages;
79
79
  rule.meta = {
80
80
  fixable: true,
81
+ url: 'https://github.com/hudochenkov/stylelint-order/blob/master/rules/properties-order/README.md',
81
82
  };
@@ -8,7 +8,7 @@ export function getContainingNode(node) {
8
8
  return node.parent;
9
9
  }
10
10
 
11
- // @stylelint/postcss-css-in-js: declarations are children of Root node
11
+ // postcss-html `style` attributes: declarations are children of Root node
12
12
  if (node.parent?.document?.nodes?.some((item) => item.type === 'root')) {
13
13
  return node.parent;
14
14
  }
@@ -4,7 +4,7 @@
4
4
  * @returns {boolean}
5
5
  */
6
6
  export function isBoolean(value) {
7
- return typeof value === 'boolean' || value instanceof Boolean;
7
+ return typeof value === 'boolean';
8
8
  }
9
9
 
10
10
  /**
@@ -13,7 +13,7 @@ export function isBoolean(value) {
13
13
  * @returns {boolean}
14
14
  */
15
15
  export function isNumber(value) {
16
- return typeof value === 'number' || value instanceof Number;
16
+ return typeof value === 'number';
17
17
  }
18
18
 
19
19
  /**
@@ -31,7 +31,7 @@ export function isRegExp(value) {
31
31
  * @returns {boolean}
32
32
  */
33
33
  export function isString(value) {
34
- return typeof value === 'string' || value instanceof String;
34
+ return typeof value === 'string';
35
35
  }
36
36
 
37
37
  /**