@atomicsmash/coding-standards 16.0.0 → 16.0.1
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 +10 -0
- package/MIGRATING.md +80 -2
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @atomicsmash/coding-standards
|
|
2
2
|
|
|
3
|
+
## 16.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#467](https://github.com/AtomicSmash/packages/pull/467) [`81e2759`](https://github.com/AtomicSmash/packages/commit/81e27596d29f566f781cdba92ba6e5f494826a17) Thanks [@mikeybinns](https://github.com/mikeybinns)! - Update deps
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`81e2759`](https://github.com/AtomicSmash/packages/commit/81e27596d29f566f781cdba92ba6e5f494826a17)]:
|
|
10
|
+
- @atomicsmash/browserslist-config@16.0.1
|
|
11
|
+
- @atomicsmash/eslint-config@16.0.1
|
|
12
|
+
|
|
3
13
|
## 16.0.0
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
package/MIGRATING.md
CHANGED
|
@@ -2,6 +2,82 @@
|
|
|
2
2
|
|
|
3
3
|
This document contains information on how to migrate from one version to the next version.
|
|
4
4
|
|
|
5
|
+
## v15 --> v16
|
|
6
|
+
|
|
7
|
+
Browserslist query has been updated to exclude Chrome versions older than 120.
|
|
8
|
+
|
|
9
|
+
## v14 --> v15
|
|
10
|
+
|
|
11
|
+
We recently introduced a change in order which says media queries should come after declarations but before other rules, like so:
|
|
12
|
+
|
|
13
|
+
Incorrect code:
|
|
14
|
+
|
|
15
|
+
```scss
|
|
16
|
+
.class {
|
|
17
|
+
margin: 0;
|
|
18
|
+
|
|
19
|
+
@media (width >= 100px) {
|
|
20
|
+
margin: 1rem;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.nested-class {
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
This leads to a potential issue where the media query is used to nest rules and output styles out of order, like this:
|
|
29
|
+
|
|
30
|
+
```scss
|
|
31
|
+
.class {
|
|
32
|
+
margin: 0;
|
|
33
|
+
|
|
34
|
+
@media (width >= 100px) {
|
|
35
|
+
margin: 1rem;
|
|
36
|
+
|
|
37
|
+
.nested-class {
|
|
38
|
+
padding: 1rem;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.nested-class {
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
This makes rules harder to read because everything is split up instead of together (which is what we're trying to solve with the order change). To solve this, you now cannot nest rules within media queries unless the media query is at the root.
|
|
48
|
+
|
|
49
|
+
An example of the correct code for the above would be this:
|
|
50
|
+
|
|
51
|
+
```scss
|
|
52
|
+
.class {
|
|
53
|
+
margin: 0;
|
|
54
|
+
|
|
55
|
+
@media (width >= 100px) {
|
|
56
|
+
margin: 1rem;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.nested-class {
|
|
60
|
+
@media (width >= 100px) {
|
|
61
|
+
padding: 1rem;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## v13 --> v14
|
|
68
|
+
|
|
69
|
+
If your project has tailwind, you should now extend a second config file for stylelint.
|
|
70
|
+
|
|
71
|
+
```ts
|
|
72
|
+
/** @type {import('stylelint').Config} */
|
|
73
|
+
module.exports = {
|
|
74
|
+
extends: [
|
|
75
|
+
"@atomicsmash/coding-standards/stylelint/classic",
|
|
76
|
+
"@atomicsmash/coding-standards/stylelint/tailwind",
|
|
77
|
+
],
|
|
78
|
+
};
|
|
79
|
+
```
|
|
80
|
+
|
|
5
81
|
## v12 --> v13
|
|
6
82
|
|
|
7
83
|
### Stabilise stylelint config
|
|
@@ -67,7 +143,8 @@ No breaking changes (this shouldn't have been a major release).
|
|
|
67
143
|
|
|
68
144
|
## v9 --> v10
|
|
69
145
|
|
|
70
|
-
### We have stabilised the PHPCS config.
|
|
146
|
+
### We have stabilised the PHPCS config.
|
|
147
|
+
|
|
71
148
|
- If you were previously referencing this file, you must target the new stable config.
|
|
72
149
|
|
|
73
150
|
```
|
|
@@ -82,7 +159,8 @@ becomes:
|
|
|
82
159
|
|
|
83
160
|
## v8 --> v9
|
|
84
161
|
|
|
85
|
-
### All dependencies were changed to peer dependencies.
|
|
162
|
+
### All dependencies were changed to peer dependencies.
|
|
163
|
+
|
|
86
164
|
- You may need to explicitly install the packages if they are not installed automatically for you:
|
|
87
165
|
|
|
88
166
|
```sh
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atomicsmash/coding-standards",
|
|
3
|
-
"version": "16.0.
|
|
3
|
+
"version": "16.0.1",
|
|
4
4
|
"description": "A collection of coding standards configurations.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
"@cspell/cspell-types": "^8.19.4"
|
|
9
9
|
},
|
|
10
10
|
"peerDependencies": {
|
|
11
|
-
"@atomicsmash/browserslist-config": "^16.0.
|
|
12
|
-
"@atomicsmash/eslint-config": "^16.0.
|
|
11
|
+
"@atomicsmash/browserslist-config": "^16.0.1",
|
|
12
|
+
"@atomicsmash/eslint-config": "^16.0.1",
|
|
13
13
|
"@commitlint/cli": "^19.8.1",
|
|
14
14
|
"@commitlint/config-conventional": "^19.8.1",
|
|
15
|
-
"@wordpress/stylelint-config": "^23.
|
|
15
|
+
"@wordpress/stylelint-config": "^23.27.0",
|
|
16
16
|
"prettier": "^3.6.2",
|
|
17
17
|
"stylelint": "^16.25.0",
|
|
18
18
|
"stylelint-config-standard": "^36.0.1",
|