@guardian/eslint-config 12.0.1 → 13.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,5 +1,25 @@
1
1
  # @guardian/eslint-config
2
2
 
3
+ ## 13.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - 816eebd:
8
+ - Peer Dependency: Update `eslint` to `9.39.1`
9
+ - Add storybook configuration from `eslint-plugin-storybook` to config
10
+
11
+ ```ts
12
+ import guardian from '@guardian/eslint-config';
13
+
14
+ const config = [
15
+ // other eslint configuration
16
+
17
+ ...guardian.configs.storybook,
18
+ ];
19
+
20
+ export default config;
21
+ ```
22
+
3
23
  ## 12.0.1
4
24
 
5
25
  ### Patch Changes
@@ -105,7 +125,6 @@ See the [README](README.md) for full details.
105
125
  ### Major Changes
106
126
 
107
127
  - 80eea1d: ## Update packages to use
108
-
109
128
  - "@typescript-eslint/eslint-plugin": "8.1.0",
110
129
  - "@typescript-eslint/parser": "8.1.0",
111
130
  - "@stylistic/eslint-plugin": "2.6.2",
@@ -136,7 +155,6 @@ See the [README](README.md) for full details.
136
155
  ### Patch Changes
137
156
 
138
157
  - 225e542: Dependencies updates:
139
-
140
158
  - `@typescript-eslint/eslint-plugin` from 6.14.0 to 6.18.0
141
159
  - `@typescript-eslint/parser` from 6.14.0 to 6.18.0
142
160
 
@@ -200,7 +218,6 @@ See the [README](README.md) for full details.
200
218
  ### Major Changes
201
219
 
202
220
  - 0f0888d: _tl;dr_
203
-
204
221
  - linting for conformance with our `prettier` config is slow
205
222
  - to speed up linting, we will stop doing that
206
223
  - you should use `prettier` directly
@@ -208,7 +225,6 @@ See the [README](README.md) for full details.
208
225
  ### Before
209
226
 
210
227
  We extended `plugin:prettier/recommended` which
211
-
212
228
  1. used `eslint-config-prettier` to disable any white-space formatting rules that would conflict with our prettier
213
229
  config
214
230
  2. used `eslint-plugin-prettier` to lint for formatting errors that did not match our prettier config
@@ -224,7 +240,6 @@ See the [README](README.md) for full details.
224
240
  ### Recommendations
225
241
 
226
242
  Your project should handle `prettier` formatting in another way, e.g.
227
-
228
243
  - via [editor integration](https://prettier.io/docs/en/editors.html)
229
244
  - via a [pre-commit hook](https://prettier.io/docs/en/precommit.html)
230
245
 
@@ -1,8 +1,9 @@
1
- // awaiting support https://github.com/storybookjs/eslint-plugin-storybook/issues/157
1
+ import storybook from 'eslint-plugin-storybook';
2
2
 
3
3
  export default [
4
4
  {
5
5
  name: '@guardian/storybook',
6
6
  files: ['**/*.stories.{js,mjs,cjs,jsx,mjsx,ts,mts,cts,tsx,mtsx,mdx}'],
7
7
  },
8
+ ...storybook.configs['flat/recommended'],
8
9
  ];
@@ -1,10 +1,9 @@
1
1
  // https://typescript-eslint.io/getting-started/
2
-
2
+ import { defineConfig } from 'eslint/config';
3
3
  import importX from 'eslint-plugin-import-x';
4
- // eslint-disable-next-line import/no-unresolved -- why can't this be resolved? literally no one knows
5
- import { config, configs } from 'typescript-eslint';
4
+ import { configs } from 'typescript-eslint';
6
5
 
7
- export default config({
6
+ export default defineConfig({
8
7
  files: ['**/*.{ts,tsx,mtsx,mts,cts}'],
9
8
  extends: [
10
9
  ...configs.recommended,
package/eslint.config.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import guardian from './index.js';
2
2
 
3
- export default [
3
+ /** @type {import('eslint').Linter.Config} */
4
+ const config = [
4
5
  ...guardian.configs.recommended,
5
6
  {
6
7
  ignores: ['.wireit'],
@@ -12,3 +13,5 @@ export default [
12
13
  },
13
14
  },
14
15
  ];
16
+
17
+ export default config;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@guardian/eslint-config",
3
- "version": "12.0.1",
3
+ "version": "13.0.0",
4
4
  "description": "ESLint config for Guardian JavaScript projects",
5
5
  "repository": {
6
6
  "url": "https://github.com/guardian/csnx",
@@ -9,26 +9,26 @@
9
9
  "type": "module",
10
10
  "main": "index.js",
11
11
  "dependencies": {
12
- "@eslint-community/eslint-plugin-eslint-comments": "4.4.1",
13
- "@eslint/js": "9.19.0",
14
- "@stylistic/eslint-plugin": "2.11.0",
15
- "eslint-config-prettier": "9.1.0",
16
- "eslint-import-resolver-typescript": "3.7.0",
17
- "eslint-plugin-import-x": "4.6.1",
12
+ "@eslint-community/eslint-plugin-eslint-comments": "4.5.0",
13
+ "@eslint/js": "9.39.1",
14
+ "@stylistic/eslint-plugin": "5.5.0",
15
+ "eslint-config-prettier": "10.1.8",
16
+ "eslint-import-resolver-typescript": "4.4.4",
17
+ "eslint-plugin-import-x": "4.16.1",
18
18
  "eslint-plugin-jsx-a11y": "6.10.2",
19
- "eslint-plugin-react": "7.37.2",
20
- "eslint-plugin-react-hooks": "5.1.0",
21
- "eslint-plugin-storybook": "0.11.1",
22
- "globals": "15.14.0",
23
- "read-package-up": "11.0.0",
24
- "typescript-eslint": "8.22.0"
19
+ "eslint-plugin-react": "7.37.5",
20
+ "eslint-plugin-react-hooks": "7.0.1",
21
+ "eslint-plugin-storybook": "10.0.6",
22
+ "globals": "16.5.0",
23
+ "read-package-up": "12.0.0",
24
+ "typescript-eslint": "8.46.3"
25
25
  },
26
26
  "devDependencies": {
27
- "eslint": "9.19.0",
27
+ "eslint": "9.39.1",
28
28
  "wireit": "0.14.12"
29
29
  },
30
30
  "peerDependencies": {
31
- "eslint": "^9.19.0"
31
+ "eslint": "^9.39.1"
32
32
  },
33
33
  "wireit": {
34
34
  "lint": {