Repository navigation
Expand file tree
/
Copy patheslint.config.js
More file actions
44 lines (43 loc) · 1.56 KB
/
Copy patheslint.config.js
File metadata and controls
44 lines (43 loc) · 1.56 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
// For more info, see https://github.com/storybookjs/eslint-plugin-storybook#configuration-flat-config-format
import pluginJs from '@eslint/js';
import eslintReact from '@eslint-react/eslint-plugin';
import eslintPluginJsxA11y from 'eslint-plugin-jsx-a11y';
import eslintPluginPrettier from 'eslint-plugin-prettier/recommended';
import eslintPluginSimpleImportSort from 'eslint-plugin-simple-import-sort';
import storybook from 'eslint-plugin-storybook';
import globals from 'globals';
import tseslint from 'typescript-eslint';
export default [
pluginJs.configs.recommended,
...tseslint.configs.recommended,
{ files: ['**/*.{js,mjs,cjs,ts,jsx,tsx}'] },
{ languageOptions: { parserOptions: { ecmaFeatures: { jsx: true } } } },
{ languageOptions: { globals: globals.browser } },
eslintReact.configs['recommended-typescript'],
{
plugins: {
'jsx-a11y': eslintPluginJsxA11y,
prettier: eslintPluginPrettier,
'simple-import-sort': eslintPluginSimpleImportSort,
},
},
{
rules: {
'@eslint-react/no-array-index-key': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-empty-object-type': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-namespace': 'off',
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
},
},
{
files: ['**/*.test.tsx', '**/*.test.ts'],
rules: {
'@eslint-react/no-create-ref': 'off',
'@eslint-react/component-hook-factories': 'off',
},
},
...storybook.configs['flat/recommended'],
];