@atomicsmash/coding-standards 18.0.0-beta.8 → 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,102 +1,25 @@
1
1
  # @atomicsmash/coding-standards
2
2
 
3
- ## 18.0.0-beta.8
4
-
5
- ### Patch Changes
6
-
7
- - [#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
8
-
9
- - Updated dependencies []:
10
- - @atomicsmash/browserslist-config@18.0.0-beta.8
11
-
12
- ## 18.0.0-beta.7
13
-
14
- ### Major Changes
15
-
16
- - [#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
17
-
18
- - [#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
19
-
20
- ### Patch Changes
21
-
22
- - [#548](https://github.com/AtomicSmash/packages/pull/548) [`3cbb8b8`](https://github.com/AtomicSmash/packages/commit/3cbb8b8b7b1e588a30786cae9f4675ebcf143492) Thanks [@mikeybinns](https://github.com/mikeybinns)! - Update deps
23
-
24
- - Updated dependencies []:
25
- - @atomicsmash/browserslist-config@18.0.0-beta.7
26
-
27
- ## 18.0.0-beta.6
28
-
29
- ### Patch Changes
30
-
31
- - [#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
32
-
33
- - Updated dependencies []:
34
- - @atomicsmash/eslint-config@18.0.0-beta.6
35
- - @atomicsmash/browserslist-config@18.0.0-beta.6
36
-
37
- ## 18.0.0-beta.5
38
-
39
- ### Patch Changes
40
-
41
- - [#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
42
-
43
- - Updated dependencies []:
44
- - @atomicsmash/eslint-config@18.0.0-beta.5
45
- - @atomicsmash/browserslist-config@18.0.0-beta.5
46
-
47
- ## 18.0.0-beta.4
48
-
49
- ### Patch Changes
50
-
51
- - [#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
52
-
53
- - Updated dependencies [[`01ebb55`](https://github.com/AtomicSmash/packages/commit/01ebb5548e71a6380b086514e091cf0f39a264d3)]:
54
- - @atomicsmash/eslint-config@18.0.0-beta.4
55
- - @atomicsmash/browserslist-config@18.0.0-beta.4
56
-
57
- ## 18.0.0-beta.3
3
+ ## 18.0.0
58
4
 
59
5
  ### Major Changes
60
6
 
61
- - [#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
62
8
 
63
- ### Patch Changes
9
+ - Remove @atomicsmash/eslint-config package as a peer dependency to avoid conflicts with new config
64
10
 
65
- - Updated dependencies []:
66
- - @atomicsmash/eslint-config@18.0.0-beta.3
67
- - @atomicsmash/browserslist-config@18.0.0-beta.3
68
-
69
- ## 18.0.0-beta.2
11
+ - Convert configs to typescript and use proper exports setup
70
12
 
71
13
  ### Minor Changes
72
14
 
73
- - [#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
74
-
75
- ### Patch Changes
76
-
77
- - Updated dependencies []:
78
- - @atomicsmash/eslint-config@18.0.0-beta.2
79
- - @atomicsmash/browserslist-config@18.0.0-beta.2
80
-
81
- ## 17.0.3-beta.1
82
-
83
- ### Patch Changes
84
-
85
- - [#524](https://github.com/AtomicSmash/packages/pull/524) [`b7b83b5`](https://github.com/AtomicSmash/packages/commit/b7b83b5414d7e6899a5ad0805d5d47390d233a78) Thanks [@mikeybinns](https://github.com/mikeybinns)! - Dependency updates
86
-
87
- - Updated dependencies [[`b7b83b5`](https://github.com/AtomicSmash/packages/commit/b7b83b5414d7e6899a5ad0805d5d47390d233a78)]:
88
- - @atomicsmash/eslint-config@17.0.3-beta.1
89
- - @atomicsmash/browserslist-config@17.0.3-beta.1
90
-
91
- ## 17.0.3-beta.0
15
+ - New ESLint flat config
92
16
 
93
17
  ### Patch Changes
94
18
 
95
- - [#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
96
20
 
97
- - Updated dependencies [[`41bea20`](https://github.com/AtomicSmash/packages/commit/41bea20b7bca144214f348ec45cdd1d608dc1c33)]:
98
- - @atomicsmash/eslint-config@17.0.3-beta.0
99
- - @atomicsmash/browserslist-config@17.0.3-beta.0
21
+ - Updated dependencies:
22
+ - @atomicsmash/browserslist-config@18.0.0
100
23
 
101
24
  ## 17.0.2
102
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.8",
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,9 +51,9 @@
39
51
  "@cspell/cspell-types": "^9.7.0"
40
52
  },
41
53
  "peerDependencies": {
42
- "@atomicsmash/browserslist-config": "^18.0.0-beta.8",
54
+ "@atomicsmash/browserslist-config": "^18.0.0",
43
55
  "@eslint-community/eslint-plugin-eslint-comments": "^4.7.1",
44
- "@eslint/js": "^10.0.1",
56
+ "@eslint/js": "^9.39.4",
45
57
  "@wordpress/stylelint-config": "^23.33.0",
46
58
  "eslint": "^9.0.0",
47
59
  "eslint-import-resolver-typescript": "^4.4.4",