Skip to content

Commit 6b99280

Browse files
committed
adjusted eslint formatting
1 parent dba533b commit 6b99280

File tree

2 files changed

+66
-58
lines changed

2 files changed

+66
-58
lines changed

.eslintrc.js

Lines changed: 39 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,41 @@
11
module.exports = {
2-
parserOptions: {
3-
project: './tsconfig.json',
4-
tsconfigRootDir: __dirname,
5-
},
6-
env: {
7-
browser: true,
8-
jest: true,
9-
},
10-
settings: {
11-
'import/resolver': {
12-
typescript: {},
13-
},
14-
react: {
15-
version: 'detect',
16-
},
17-
},
18-
extends: ['plugin:react/recommended', 'plugin:@typescript-eslint/recommended', 'prettier', 'plugin:import/errors', 'plugin:import/warnings', 'plugin:import/typescript', 'plugin:jsx-a11y/recommended', 'plugin:react-hooks/recommended', 'plugin:storybook/recommended'],
19-
rules: {
20-
'react/prop-types': 0,
21-
'jsx-a11y/anchor-has-content': 0,
22-
'jsx-a11y/alt-text': 0,
23-
'jsx-a11y/heading-has-content': 0,
24-
'react-hooks/exhaustive-deps': 0,
25-
},
26-
overrides: [
27-
{
28-
files: ['*.stories.tsx'],
29-
rules: { '@typescript-eslint/no-unused-vars': 'off' },
30-
},
31-
],
2+
parserOptions: {
3+
project: './tsconfig.json',
4+
tsconfigRootDir: __dirname,
5+
},
6+
env: {
7+
browser: true,
8+
jest: true,
9+
},
10+
settings: {
11+
'import/resolver': {
12+
typescript: {},
13+
},
14+
react: {
15+
version: 'detect',
16+
},
17+
},
18+
extends: [
19+
'plugin:react/recommended',
20+
'plugin:@typescript-eslint/recommended',
21+
'prettier',
22+
'plugin:import/errors',
23+
'plugin:import/warnings',
24+
'plugin:import/typescript',
25+
'plugin:jsx-a11y/recommended',
26+
'plugin:react-hooks/recommended',
27+
'plugin:storybook/recommended'],
28+
rules: {
29+
'react/prop-types': 0,
30+
'jsx-a11y/anchor-has-content': 0,
31+
'jsx-a11y/alt-text': 0,
32+
'jsx-a11y/heading-has-content': 0,
33+
'react-hooks/exhaustive-deps': 0,
34+
},
35+
overrides: [
36+
{
37+
files: ['*.stories.tsx'],
38+
rules: { '@typescript-eslint/no-unused-vars': 'off' },
39+
},
40+
],
3241
};

.storybook/main.ts

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,36 +3,35 @@ import { mergeConfig } from 'vite';
33
import tsConfigPaths from 'vite-tsconfig-paths';
44

55
const config: StorybookConfig = {
6-
stories: ['../stories/**/*.stories.@(ts|tsx)', '../stories/**/*.mdx'],
7-
addons: ['@storybook/addon-links', '@storybook/addon-docs'],
6+
stories: ['../stories/**/*.stories.@(ts|tsx)', '../stories/**/*.mdx'],
7+
addons: ['@storybook/addon-links', '@storybook/addon-docs'],
8+
framework: {
9+
name: '@storybook/react-vite',
10+
options: {},
11+
},
812

9-
framework: {
10-
name: '@storybook/react-vite',
11-
options: {},
12-
},
13+
typescript: {
14+
reactDocgen: 'react-docgen-typescript',
15+
},
1316

14-
typescript: {
15-
reactDocgen: 'react-docgen-typescript',
16-
},
17-
18-
viteFinal(config) {
19-
return mergeConfig(config, {
20-
plugins: [tsConfigPaths()],
21-
css: {
22-
preprocessorOptions: {
23-
scss: {
24-
// Hide deprecation noise coming from dependencies like nhsuk-frontend
25-
quietDeps: true,
26-
// Specifically silence the Dart Sass "misplaced-rest" deprecation
27-
// (Type cast to any in case your TS types don't include this yet)
28-
silenceDeprecations: ['misplaced-rest'],
29-
// Optional: ensure node_modules is in the Sass load path
30-
// includePaths: ['node_modules'],
31-
} as any,
32-
},
33-
},
34-
});
35-
}
17+
viteFinal(config) {
18+
return mergeConfig(config, {
19+
plugins: [tsConfigPaths()],
20+
css: {
21+
preprocessorOptions: {
22+
scss: {
23+
// Hide deprecation noise coming from dependencies like nhsuk-frontend
24+
quietDeps: true,
25+
// Specifically silence the Dart Sass "misplaced-rest" deprecation
26+
// (Type cast to any in case your TS types don't include this yet)
27+
silenceDeprecations: ['misplaced-rest'],
28+
// Optional: ensure node_modules is in the Sass load path
29+
// includePaths: ['node_modules'],
30+
} as any,
31+
},
32+
},
33+
});
34+
}
3635
};
3736

3837
export default config;

0 commit comments

Comments
 (0)