@atomicsmash/coding-standards 16.0.0-beta.1 → 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 CHANGED
@@ -1,5 +1,25 @@
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
+
13
+ ## 16.0.0
14
+
15
+ ### Patch Changes
16
+
17
+ - [#445](https://github.com/AtomicSmash/packages/pull/445) [`90629ab`](https://github.com/AtomicSmash/packages/commit/90629aba40fe2e06200a6294f66b870cd60864e5) Thanks [@mikeybinns](https://github.com/mikeybinns)! - Update deps
18
+
19
+ - Updated dependencies [[`90629ab`](https://github.com/AtomicSmash/packages/commit/90629aba40fe2e06200a6294f66b870cd60864e5), [`79639f3`](https://github.com/AtomicSmash/packages/commit/79639f3f019487297d39b8debe0b88292e143474)]:
20
+ - @atomicsmash/browserslist-config@16.0.0
21
+ - @atomicsmash/eslint-config@16.0.0
22
+
3
23
  ## 16.0.0-beta.1
4
24
 
5
25
  ### 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.0-beta.1",
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.0-beta.1",
12
- "@atomicsmash/eslint-config": "^16.0.0-beta.1",
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.24.0",
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",