Skip to content

Commit 57b13b4

Browse files
Bump the lint group with 5 updates (#364)
* Bump the lint group with 5 updates Bumps the lint group with 5 updates: | Package | From | To | | --- | --- | --- | | [@eslint/compat](https://github.com/eslint/rewrite/tree/HEAD/packages/compat) | `2.0.3` | `2.0.5` | | [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `24.12.0` | `24.12.2` | | [globals](https://github.com/sindresorhus/globals) | `17.4.0` | `17.5.0` | | [prettier](https://github.com/prettier/prettier) | `3.8.1` | `3.8.3` | | [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) | `8.58.0` | `8.58.2` | Updates `@eslint/compat` from 2.0.3 to 2.0.5 - [Release notes](https://github.com/eslint/rewrite/releases) - [Changelog](https://github.com/eslint/rewrite/blob/main/packages/compat/CHANGELOG.md) - [Commits](https://github.com/eslint/rewrite/commits/compat-v2.0.5/packages/compat) Updates `@types/node` from 24.12.0 to 24.12.2 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Updates `globals` from 17.4.0 to 17.5.0 - [Release notes](https://github.com/sindresorhus/globals/releases) - [Commits](sindresorhus/globals@v17.4.0...v17.5.0) Updates `prettier` from 3.8.1 to 3.8.3 - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](prettier/prettier@3.8.1...3.8.3) Updates `typescript-eslint` from 8.58.0 to 8.58.2 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.58.2/packages/typescript-eslint) --- updated-dependencies: - dependency-name: "@eslint/compat" dependency-version: 2.0.5 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: lint - dependency-name: "@types/node" dependency-version: 24.12.2 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: lint - dependency-name: globals dependency-version: 17.5.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: lint - dependency-name: prettier dependency-version: 3.8.3 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: lint - dependency-name: typescript-eslint dependency-version: 8.58.2 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: lint ... Signed-off-by: dependabot[bot] <support@github.com> * Configure Prettier to sort imports * Run `npm run lint:prettier:fix` * Migrate to `eslint-plugin-node-import` * Update Dependabot config * Remove ESLint import plugin --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Colin Rotherham <work@colinr.com>
1 parent 8f628ef commit 57b13b4

99 files changed

Lines changed: 396 additions & 466 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/dependabot.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ updates:
2525
lint:
2626
patterns:
2727
- '@eslint/*'
28+
- '@trivago/prettier-plugin-*'
2829
- '@types/*'
2930
- 'eslint'
3031
- 'eslint-*'

.prettierrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
{
2+
"importOrder": ["<BUILTIN_MODULES>", "<THIRD_PARTY_MODULES>", "^#(.*)$", "^[./]"],
3+
"importOrderSeparation": true,
4+
"importOrderSortSpecifiers": true,
5+
"plugins": ["@trivago/prettier-plugin-sort-imports"],
26
"printWidth": 100,
37
"quoteProps": "consistent",
48
"semi": true,

.storybook/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { type StorybookConfig } from '@storybook/react-vite';
22
import preserveDirectives from 'rollup-preserve-directives';
3-
import { mergeConfig, type InlineConfig } from 'vite';
3+
import { type InlineConfig, mergeConfig } from 'vite';
44
import tsConfigPaths from 'vite-tsconfig-paths';
55

66
const config: StorybookConfig = {

.storybook/preview.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
import './storybook.scss';
21
import { type Preview } from '@storybook/react-vite';
32

43
import { Col, Container, Row } from '#components/layout/index.js';
54

5+
import './storybook.scss';
6+
67
const preview: Preview = {
78
decorators: (Story, { parameters }) =>
89
parameters.width === false ? (

eslint.config.js

Lines changed: 3 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ import { join } from 'node:path';
22

33
import { includeIgnoreFile } from '@eslint/compat';
44
import eslint from '@eslint/js';
5-
import { defineConfig, globalIgnores } from 'eslint/config';
65
import configPrettier from 'eslint-config-prettier/flat';
7-
import pluginImport from 'eslint-plugin-import';
86
import pluginJsxA11y from 'eslint-plugin-jsx-a11y';
7+
import pluginNodeImport from 'eslint-plugin-node-import';
98
import pluginReact from 'eslint-plugin-react';
109
import pluginReactHooks from 'eslint-plugin-react-hooks';
10+
import { defineConfig, globalIgnores } from 'eslint/config';
1111
import globals from 'globals';
1212
import pluginTypeScript from 'typescript-eslint';
1313

@@ -19,9 +19,8 @@ export default defineConfig([
1919
files: ['**/*.{js,mjs,ts,tsx}'],
2020
extends: [
2121
eslint.configs.recommended,
22-
pluginImport.flatConfigs.recommended,
23-
pluginImport.flatConfigs.typescript,
2422
pluginTypeScript.configs.recommended,
23+
pluginNodeImport.configs['flat/recommended'],
2524
configPrettier,
2625
],
2726
languageOptions: {
@@ -33,30 +32,6 @@ export default defineConfig([
3332
},
3433
},
3534
rules: {
36-
// Turn off rules that are handled by TypeScript
37-
// https://typescript-eslint.io/troubleshooting/typed-linting/performance/#eslint-plugin-import
38-
'import/default': 'off',
39-
'import/named': 'off',
40-
'import/namespace': 'off',
41-
'import/no-cycle': 'off',
42-
'import/no-deprecated': 'off',
43-
'import/no-named-as-default': 'off',
44-
'import/no-named-as-default-member': 'off',
45-
'import/no-unresolved': 'off',
46-
'import/no-unused-modules': 'off',
47-
48-
// Always import Node.js packages from `node:*`
49-
'import/enforce-node-protocol-usage': ['error', 'always'],
50-
51-
// Check import or require statements are A-Z ordered
52-
'import/order': [
53-
'error',
54-
{
55-
'alphabetize': { order: 'asc' },
56-
'newlines-between': 'always',
57-
},
58-
],
59-
6035
// Prefer rules that are type aware
6136
'no-redeclare': 'off',
6237
'no-undef': 'off',
@@ -71,12 +46,6 @@ export default defineConfig([
7146
},
7247
],
7348
},
74-
settings: {
75-
'import/resolver': {
76-
node: true,
77-
typescript: true,
78-
},
79-
},
8049
},
8150
{
8251
files: ['**/*.{ts,tsx}'],

package.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
"@babel/preset-env": "^7.29.2",
6969
"@babel/preset-react": "^7.28.5",
7070
"@babel/preset-typescript": "^7.28.5",
71-
"@eslint/compat": "^2.0.3",
71+
"@eslint/compat": "^2.0.5",
7272
"@eslint/js": "^9.39.4",
7373
"@rollup/plugin-babel": "^7.0.0",
7474
"@rollup/plugin-commonjs": "^29.0.2",
@@ -80,11 +80,12 @@
8080
"@testing-library/dom": "^10.4.1",
8181
"@testing-library/jest-dom": "^6.9.1",
8282
"@testing-library/react": "^16.3.2",
83+
"@trivago/prettier-plugin-sort-imports": "^6.0.2",
8384
"@types/eslint": "^9.6.1",
8485
"@types/eslint-plugin-jsx-a11y": "^6.10.1",
8586
"@types/jest": "^30.0.0",
8687
"@types/jest-axe": "^3.5.9",
87-
"@types/node": "^24.12.0",
88+
"@types/node": "^24.12.2",
8889
"@types/react": "^19.2.14",
8990
"@types/react-dom": "^19.2.3",
9091
"babel-jest": "^30.3.0",
@@ -94,17 +95,17 @@
9495
"eslint": "^9.39.4",
9596
"eslint-config-prettier": "^10.1.8",
9697
"eslint-import-resolver-typescript": "^4.4.4",
97-
"eslint-plugin-import": "^2.32.0",
9898
"eslint-plugin-jsx-a11y": "^6.10.2",
99+
"eslint-plugin-node-import": "^1.2.0",
99100
"eslint-plugin-react": "^7.37.5",
100101
"eslint-plugin-react-hooks": "^7.0.1",
101-
"globals": "^17.3.0",
102+
"globals": "^17.5.0",
102103
"jest": "^30.3.0",
103104
"jest-axe": "^10.0.0",
104105
"jest-environment-jsdom": "^30.3.0",
105106
"nhsuk-frontend": "^10.3.1",
106107
"outdent": "^0.8.0",
107-
"prettier": "^3.8.0",
108+
"prettier": "^3.8.3",
108109
"react": "^19.2.5",
109110
"react-dom": "^19.2.5",
110111
"rollup": "^4.60.0",
@@ -113,7 +114,7 @@
113114
"storybook": "^10.2.14",
114115
"tslib": "^2.8.1",
115116
"typescript": "^6.0.2",
116-
"typescript-eslint": "^8.58.0",
117+
"typescript-eslint": "^8.58.2",
117118
"vite": "^7.3.2",
118119
"vite-tsconfig-paths": "^6.1.1"
119120
},

src/components/content-presentation/details/Details.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import classNames from 'classnames';
2-
import { forwardRef, type ComponentPropsWithoutRef, type FC } from 'react';
2+
import { type ComponentPropsWithoutRef, type FC, forwardRef } from 'react';
33

44
export interface DetailsProps extends ComponentPropsWithoutRef<'details'> {
55
expander?: boolean;

src/components/content-presentation/details/__tests__/Details.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { render } from '@testing-library/react';
22
import { createRef } from 'react';
33

4-
import { Details } from '..';
5-
64
import { renderClient, renderServer } from '#util/components';
75

6+
import { Details } from '..';
7+
88
describe('Details', () => {
99
it('matches snapshot', async () => {
1010
const { container } = await renderClient(<Details />, {

src/components/content-presentation/do-and-dont-list/DoAndDontList.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
'use client';
22

33
import classNames from 'classnames';
4-
import { forwardRef, type ComponentPropsWithoutRef } from 'react';
4+
import { type ComponentPropsWithoutRef, forwardRef } from 'react';
5+
6+
import { Heading, type HeadingProps } from '#components/typography/Heading.js';
57

68
import { DoAndDontListContext, type DoAndDontListType } from './DoAndDontListContext.js';
79
import { DoAndDontListItem } from './components/index.js';
810

9-
import { Heading, type HeadingProps } from '#components/typography/Heading.js';
10-
1111
export interface DoAndDontListProps
1212
extends ComponentPropsWithoutRef<'div'>, Pick<HeadingProps, 'headingLevel'> {
1313
listType: DoAndDontListType;

src/components/content-presentation/do-and-dont-list/__tests__/DoAndDontList.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { render } from '@testing-library/react';
22
import { createRef } from 'react';
33

4-
import { DoAndDontList } from '..';
5-
64
import { renderClient, renderServer } from '#util/components';
75

6+
import { DoAndDontList } from '..';
7+
88
describe('DoAndDontList', () => {
99
describe('list type "do"', () => {
1010
it('matches snapshot', async () => {

0 commit comments

Comments
 (0)