-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mjs
More file actions
48 lines (44 loc) · 1.44 KB
/
eslint.config.mjs
File metadata and controls
48 lines (44 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import globals from 'globals';
import tsParser from '@typescript-eslint/parser';
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import reactHooks from 'eslint-plugin-react-hooks';
import { reactRefresh } from 'eslint-plugin-react-refresh';
import storybook from 'eslint-plugin-storybook';
/**
* The ESLint configuration in "flat config" format.
*
* Note: This configuration uses helper functions from `typescript-eslint`.
*
* @see {@link https://eslint.org/docs/latest/use/configure/ Configure ESLint}
* @see {@link https://typescript-eslint.io/packages/typescript-eslint typescript-eslint}
*/
export default tseslint.config(
{
files: ['**/*.ts', '**/*.tsx'],
extends: [eslint.configs.recommended, ...tseslint.configs.recommended],
languageOptions: {
globals: {
...globals.browser,
},
parser: tsParser,
},
linterOptions: {
reportUnusedDisableDirectives: 'warn',
},
plugins: {
'react-hooks': reactHooks,
'react-refresh': reactRefresh.plugin,
storybook: storybook,
},
rules: {
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],
'@typescript-eslint/no-empty-object-type': ['error', { allowWithName: 'Props$' }],
},
},
{
// global ignores
// do not add any other keys to this object
ignores: ['**/node_modules/', '**/coverage/', '**/dist/', '**/storybook-static/', '**/cdk.out/'],
},
);