Skip to content

Commit b93ae2d

Browse files
committed
Installed missing ESLint dependencies
1 parent fdc2673 commit b93ae2d

File tree

4 files changed

+2600
-88
lines changed

4 files changed

+2600
-88
lines changed

.eslintrc.js

Lines changed: 0 additions & 41 deletions
This file was deleted.

eslint.config.js

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
import js from '@eslint/js';
2+
import typescript from '@typescript-eslint/eslint-plugin';
3+
import typescriptParser from '@typescript-eslint/parser';
4+
import react from 'eslint-plugin-react';
5+
import reactHooks from 'eslint-plugin-react-hooks';
6+
import jsxA11y from 'eslint-plugin-jsx-a11y';
7+
import importPlugin from 'eslint-plugin-import';
8+
import storybook from 'eslint-plugin-storybook';
9+
import globals from 'globals';
10+
11+
export default [
12+
js.configs.recommended,
13+
{
14+
files: ['src/**/*.{js,ts,tsx}', 'stories/**/*.{js,ts,tsx}'],
15+
languageOptions: {
16+
parser: typescriptParser,
17+
parserOptions: {
18+
project: './tsconfig.json',
19+
ecmaFeatures: {
20+
jsx: true,
21+
},
22+
},
23+
globals: {
24+
...globals.browser,
25+
...globals.jest,
26+
...globals.node,
27+
},
28+
},
29+
plugins: {
30+
'@typescript-eslint': typescript,
31+
react,
32+
'react-hooks': reactHooks,
33+
'jsx-a11y': jsxA11y,
34+
import: importPlugin,
35+
storybook,
36+
},
37+
settings: {
38+
'import/resolver': {
39+
typescript: {
40+
project: './tsconfig.json',
41+
},
42+
},
43+
react: {
44+
version: 'detect',
45+
},
46+
},
47+
rules: {
48+
...typescript.configs.recommended.rules,
49+
...react.configs.recommended.rules,
50+
...reactHooks.configs.recommended.rules,
51+
...jsxA11y.configs.recommended.rules,
52+
'react/prop-types': 0,
53+
'react/react-in-jsx-scope': 0,
54+
'jsx-a11y/anchor-has-content': 0,
55+
'jsx-a11y/alt-text': 0,
56+
'jsx-a11y/heading-has-content': 0,
57+
'react-hooks/exhaustive-deps': 0,
58+
},
59+
},
60+
{
61+
files: ['*.stories.tsx'],
62+
rules: {
63+
'@typescript-eslint/no-unused-vars': 'off',
64+
},
65+
},
66+
];

package.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
},
4040
"devDependencies": {
4141
"@babel/core": "^7.24.1",
42+
"@eslint/js": "^9.36.0",
4243
"@rollup/plugin-commonjs": "^25.0.7",
4344
"@rollup/plugin-node-resolve": "^15.2.3",
4445
"@rollup/plugin-terser": "^0.4.4",
@@ -47,12 +48,23 @@
4748
"@storybook/addon-links": "^9.1.3",
4849
"@storybook/react-vite": "^9.1.3",
4950
"@testing-library/react": "^16.3.0",
51+
"@types/eslint-plugin-jsx-a11y": "^6",
5052
"@types/jest": "^30.0.0",
5153
"@types/lodash": "^4",
5254
"@types/react": "^19.1.12",
5355
"@types/react-dom": "^19",
5456
"@types/stylus": "^0",
57+
"@typescript-eslint/eslint-plugin": "^8.44.0",
58+
"@typescript-eslint/parser": "^8.44.0",
59+
"eslint": "^9.36.0",
60+
"eslint-config-prettier": "^10.1.8",
61+
"eslint-import-resolver-typescript": "^4.4.4",
62+
"eslint-plugin-import": "^2.32.0",
63+
"eslint-plugin-jsx-a11y": "^6.10.2",
64+
"eslint-plugin-react": "^7.37.5",
65+
"eslint-plugin-react-hooks": "^5.2.0",
5566
"eslint-plugin-storybook": "9.1.3",
67+
"globals": "^16.4.0",
5668
"less": "^4.4.1",
5769
"nhsuk-frontend": "^9.0.1",
5870
"react": "^19.1.1",

0 commit comments

Comments
 (0)