@atomicsmash/coding-standards 18.0.0-beta.9 → 18.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/CHANGELOG.md CHANGED
@@ -1,111 +1,25 @@
1
1
  # @atomicsmash/coding-standards
2
2
 
3
- ## 18.0.0-beta.9
4
-
5
- ### Patch Changes
6
-
7
- - [#555](https://github.com/AtomicSmash/packages/pull/555) [`26399d1`](https://github.com/AtomicSmash/packages/commit/26399d1cc021f02740d2a2f435c4850227b24f96) Thanks [@mikeybinns](https://github.com/mikeybinns)! - fix incorrect @eslint/js dep version
8
-
9
- - Updated dependencies []:
10
- - @atomicsmash/browserslist-config@18.0.0-beta.9
11
-
12
- ## 18.0.0-beta.8
13
-
14
- ### Patch Changes
15
-
16
- - [#553](https://github.com/AtomicSmash/packages/pull/553) [`f5f0051`](https://github.com/AtomicSmash/packages/commit/f5f0051589f88fda628c714112c2c297cd8ced76) Thanks [@mikeybinns](https://github.com/mikeybinns)! - Fix ESLint config exports
17
-
18
- - Updated dependencies []:
19
- - @atomicsmash/browserslist-config@18.0.0-beta.8
20
-
21
- ## 18.0.0-beta.7
22
-
23
- ### Major Changes
24
-
25
- - [#548](https://github.com/AtomicSmash/packages/pull/548) [`3cbb8b8`](https://github.com/AtomicSmash/packages/commit/3cbb8b8b7b1e588a30786cae9f4675ebcf143492) Thanks [@mikeybinns](https://github.com/mikeybinns)! - Remove AS ESLint config package as an automatic peer dependency to avoid conflicts with new config
26
-
27
- - [#548](https://github.com/AtomicSmash/packages/pull/548) [`3cbb8b8`](https://github.com/AtomicSmash/packages/commit/3cbb8b8b7b1e588a30786cae9f4675ebcf143492) Thanks [@mikeybinns](https://github.com/mikeybinns)! - Convert configs to typescript and use proper exports setup
28
-
29
- ### Patch Changes
30
-
31
- - [#548](https://github.com/AtomicSmash/packages/pull/548) [`3cbb8b8`](https://github.com/AtomicSmash/packages/commit/3cbb8b8b7b1e588a30786cae9f4675ebcf143492) Thanks [@mikeybinns](https://github.com/mikeybinns)! - Update deps
32
-
33
- - Updated dependencies []:
34
- - @atomicsmash/browserslist-config@18.0.0-beta.7
35
-
36
- ## 18.0.0-beta.6
37
-
38
- ### Patch Changes
39
-
40
- - [#544](https://github.com/AtomicSmash/packages/pull/544) [`8e4a0b7`](https://github.com/AtomicSmash/packages/commit/8e4a0b75e2d007c67dd6db0aa8d66d055b62f39e) Thanks [@mikeybinns](https://github.com/mikeybinns)! - More changes to eslint beta config
41
-
42
- - Updated dependencies []:
43
- - @atomicsmash/eslint-config@18.0.0-beta.6
44
- - @atomicsmash/browserslist-config@18.0.0-beta.6
45
-
46
- ## 18.0.0-beta.5
47
-
48
- ### Patch Changes
49
-
50
- - [#542](https://github.com/AtomicSmash/packages/pull/542) [`7b60117`](https://github.com/AtomicSmash/packages/commit/7b60117254724918905e46bfc635bebc6ff7c9ad) Thanks [@mikeybinns](https://github.com/mikeybinns)! - Further fixes to the beta eslint config
51
-
52
- - Updated dependencies []:
53
- - @atomicsmash/eslint-config@18.0.0-beta.5
54
- - @atomicsmash/browserslist-config@18.0.0-beta.5
55
-
56
- ## 18.0.0-beta.4
57
-
58
- ### Patch Changes
59
-
60
- - [#540](https://github.com/AtomicSmash/packages/pull/540) [`01ebb55`](https://github.com/AtomicSmash/packages/commit/01ebb5548e71a6380b086514e091cf0f39a264d3) Thanks [@mikeybinns](https://github.com/mikeybinns)! - Fixes for new ESLint config
61
-
62
- - Updated dependencies [[`01ebb55`](https://github.com/AtomicSmash/packages/commit/01ebb5548e71a6380b086514e091cf0f39a264d3)]:
63
- - @atomicsmash/eslint-config@18.0.0-beta.4
64
- - @atomicsmash/browserslist-config@18.0.0-beta.4
65
-
66
- ## 18.0.0-beta.3
3
+ ## 18.0.0
67
4
 
68
5
  ### Major Changes
69
6
 
70
- - [#533](https://github.com/AtomicSmash/packages/pull/533) [`7fd9db6`](https://github.com/AtomicSmash/packages/commit/7fd9db62a9359be302c865aeacf2e5dfc663c31a) Thanks [@mikeybinns](https://github.com/mikeybinns)! - Update TS base config
7
+ - Update TS base config
71
8
 
72
- ### Patch Changes
73
-
74
- - Updated dependencies []:
75
- - @atomicsmash/eslint-config@18.0.0-beta.3
76
- - @atomicsmash/browserslist-config@18.0.0-beta.3
9
+ - Remove @atomicsmash/eslint-config package as a peer dependency to avoid conflicts with new config
77
10
 
78
- ## 18.0.0-beta.2
11
+ - Convert configs to typescript and use proper exports setup
79
12
 
80
13
  ### Minor Changes
81
14
 
82
- - [#526](https://github.com/AtomicSmash/packages/pull/526) [`45913a9`](https://github.com/AtomicSmash/packages/commit/45913a99257aabfadec1399e0c712fb3afd5f956) Thanks [@mikeybinns](https://github.com/mikeybinns)! - Add beta flat config for ESLint
83
-
84
- ### Patch Changes
85
-
86
- - Updated dependencies []:
87
- - @atomicsmash/eslint-config@18.0.0-beta.2
88
- - @atomicsmash/browserslist-config@18.0.0-beta.2
89
-
90
- ## 17.0.3-beta.1
91
-
92
- ### Patch Changes
93
-
94
- - [#524](https://github.com/AtomicSmash/packages/pull/524) [`b7b83b5`](https://github.com/AtomicSmash/packages/commit/b7b83b5414d7e6899a5ad0805d5d47390d233a78) Thanks [@mikeybinns](https://github.com/mikeybinns)! - Dependency updates
95
-
96
- - Updated dependencies [[`b7b83b5`](https://github.com/AtomicSmash/packages/commit/b7b83b5414d7e6899a5ad0805d5d47390d233a78)]:
97
- - @atomicsmash/eslint-config@17.0.3-beta.1
98
- - @atomicsmash/browserslist-config@17.0.3-beta.1
99
-
100
- ## 17.0.3-beta.0
15
+ - New ESLint flat config
101
16
 
102
17
  ### Patch Changes
103
18
 
104
- - [#519](https://github.com/AtomicSmash/packages/pull/519) [`41bea20`](https://github.com/AtomicSmash/packages/commit/41bea20b7bca144214f348ec45cdd1d608dc1c33) Thanks [@mikeybinns](https://github.com/mikeybinns)! - Update dependencies
19
+ - Update dependencies
105
20
 
106
- - Updated dependencies [[`41bea20`](https://github.com/AtomicSmash/packages/commit/41bea20b7bca144214f348ec45cdd1d608dc1c33)]:
107
- - @atomicsmash/eslint-config@17.0.3-beta.0
108
- - @atomicsmash/browserslist-config@17.0.3-beta.0
21
+ - Updated dependencies:
22
+ - @atomicsmash/browserslist-config@18.0.0
109
23
 
110
24
  ## 17.0.2
111
25
 
package/MIGRATING.md CHANGED
@@ -2,6 +2,83 @@
2
2
 
3
3
  This document contains information on how to migrate from one version to the next version.
4
4
 
5
+ ## v17 --> v18
6
+
7
+ ### Using proper exports
8
+
9
+ All configs are now compiled from a src folder to property generate minified configs and types. Because of this change in structure, the resulting file locations have been changed. To ensure this is handled properly in future, we now provide explicit exports via package.json for each config type
10
+
11
+ e.g.
12
+
13
+ ```ts
14
+ import config from "@atomicsmash/coding-standards/prettier";
15
+ export default config;
16
+ ```
17
+
18
+ All exports are:
19
+ @atomicsmash/coding-standards/prettier
20
+ @atomicsmash/coding-standards/cspell
21
+ @atomicsmash/coding-standards/stylelint
22
+ @atomicsmash/coding-standards/stylelint/classic
23
+ @atomicsmash/coding-standards/stylelint/theme-json
24
+ @atomicsmash/coding-standards/stylelint/tailwind
25
+ @atomicsmash/coding-standards/typescript/base
26
+ @atomicsmash/coding-standards/typescript/cypress
27
+ @atomicsmash/coding-standards/eslint (NEW)
28
+ @atomicsmash/coding-standards/beta/biome (NEW/EXPERIMENTAL)
29
+
30
+ ### New ESLint config
31
+
32
+ Our coding standards now support the new ESLint flat config style, which enables us to update past ESLint v8.
33
+
34
+ The @atomicsmash/eslint-config has been deprecated and will no longer be updated/supported. You must move to the new config which is now contained within the coding-standards config. If your version of this package was installed by peer deps, then it will disappear with this update, otherwise be sure to uninstall it to avoid conflicts with the new config/peer deps.
35
+
36
+ To migrate to the new config, create an `eslint.config.js` file in your project with this initial config:
37
+
38
+ ```js
39
+ import {
40
+ recommendedConfig as recommendedAtomicSmashConfig,
41
+ playwrightConfig as defaultAtomicSmashPlaywrightConfig,
42
+ } from "@atomicsmash/coding-standards/eslint";
43
+ import { defineConfig, globalIgnores } from "@eslint/config-helpers";
44
+
45
+ export default defineConfig([
46
+ globalIgnores([
47
+ // .eslintignore files are no longer supported.
48
+ // Add all the lines from your .eslintignore file here.
49
+ ]),
50
+ {
51
+ files: [
52
+ "**/*.js",
53
+ "**/*.cjs",
54
+ "**/*.mjs",
55
+ "**/*.ts",
56
+ "**/*.cts",
57
+ "**/*.mts",
58
+ ],
59
+ extends: [recommendedAtomicSmashConfig],
60
+ },
61
+ {
62
+ // Only needed if you have playwright tests.
63
+ files: ["**/*.test.ts"],
64
+ extends: [defaultAtomicSmashPlaywrightConfig],
65
+ },
66
+ ]);
67
+ ```
68
+
69
+ Then update the script line in package.json like so:
70
+
71
+ ```diff
72
+ - "lint:eslint": "eslint --cache --cache-strategy=content --cache-location ./node_modules/.cache/eslint_theme . --ext .js,.cjs,.mjs,.jsx,.ts,.cts,.mts,.tsx",
73
+ + "lint:eslint": "eslint",
74
+ ```
75
+
76
+ It's likely there will be new rules for you to fix with this update due to the updates of dependencies and better application of rules by default.
77
+
78
+ ### Updated base TS config
79
+
80
+ The Base TS config has been updated with more modern settings and values. Check the commit history for the changed settings.
81
+
5
82
  ## v16 --> v17
6
83
 
7
84
  ### Removal of commitlint.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/eslint/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAkB,MAAM,EAAE,MAAM,wBAAwB,CAAC;AA2LrE,eAAO,MAAM,gBAAgB,UAe3B,CAAC;AAEH,eAAO,MAAM,iBAAiB,UAK5B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/eslint/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAkB,MAAM,EAAE,MAAM,wBAAwB,CAAC;AA4LrE,eAAO,MAAM,gBAAgB,UAe3B,CAAC;AAEH,eAAO,MAAM,iBAAiB,UAK5B,CAAC"}
@@ -58,6 +58,7 @@ const baseConfig = defineConfig({
58
58
  },
59
59
  settings: {
60
60
  "import/resolver": {
61
+ typescript: true, // This is needed even for js files because of errors with resolving subpaths.
61
62
  node: true,
62
63
  },
63
64
  },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@atomicsmash/coding-standards",
3
3
  "type": "module",
4
- "version": "18.0.0-beta.9",
4
+ "version": "18.0.0",
5
5
  "description": "A collection of coding standards configurations.",
6
6
  "files": [
7
7
  "./dist/**/*",
@@ -28,9 +28,21 @@
28
28
  "types": "./dist/prettier/index.d.ts",
29
29
  "default": "./dist/prettier/index.js"
30
30
  },
31
- "./stylelint/*": {
32
- "types": "./dist/stylelint/*.d.ts",
33
- "default": "./dist/stylelint/*.js"
31
+ "./stylelint": {
32
+ "types": "./dist/stylelint/index.d.ts",
33
+ "default": "./dist/stylelint/index.js"
34
+ },
35
+ "./stylelint/classic": {
36
+ "types": "./dist/stylelint/classic.d.ts",
37
+ "default": "./dist/stylelint/classic.js"
38
+ },
39
+ "./stylelint/theme-json": {
40
+ "types": "./dist/stylelint/theme-json.d.ts",
41
+ "default": "./dist/stylelint/theme-json.js"
42
+ },
43
+ "./stylelint/tailwind": {
44
+ "types": "./dist/stylelint/tailwind.d.ts",
45
+ "default": "./dist/stylelint/tailwind.js"
34
46
  },
35
47
  "./typescript/*": "./typescript/*.json",
36
48
  "./beta/biome": "./beta/biome/biome.jsonc"
@@ -39,7 +51,7 @@
39
51
  "@cspell/cspell-types": "^9.7.0"
40
52
  },
41
53
  "peerDependencies": {
42
- "@atomicsmash/browserslist-config": "^18.0.0-beta.9",
54
+ "@atomicsmash/browserslist-config": "^18.0.0",
43
55
  "@eslint-community/eslint-plugin-eslint-comments": "^4.7.1",
44
56
  "@eslint/js": "^9.39.4",
45
57
  "@wordpress/stylelint-config": "^23.33.0",