-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
87 lines (86 loc) · 2.26 KB
/
Copy patheslint.config.js
File metadata and controls
87 lines (86 loc) · 2.26 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
// eslint.config.js
import pluginReact from 'eslint-plugin-react';
import pluginReactHooks from 'eslint-plugin-react-hooks';
import pluginStorybook from 'eslint-plugin-storybook';
import globals from 'globals';
import tseslint from 'typescript-eslint';
export default tseslint.config(
{
ignores: [
'**/dist/',
'**/.gigadrive/',
'**/.next/',
'**/node_modules/',
'**/storybook-static/',
'**/.rslib/',
'**/coverage/',
'vitest.config.ts',
'vitest.workspace.ts',
'tsup.config.ts',
'**/*.test.ts',
'**/*.test.tsx',
],
},
tseslint.configs.base,
{
files: ['**/*.{ts,tsx,mts,mtsx}'],
extends: [...tseslint.configs.recommendedTypeChecked],
languageOptions: {
parserOptions: {
project: ['./tsconfig.base.json', './packages/*/tsconfig.json'],
tsconfigRootDir: import.meta.dirname,
},
},
rules: {
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/no-redundant-type-constituents': 'off',
'@typescript-eslint/restrict-template-expressions': 'off',
},
},
{
files: ['**/*.{js,jsx,mjs,cjs,mjsx}'],
extends: [tseslint.configs.disableTypeChecked],
},
{
files: ['**/*.{jsx,tsx,mjsx,mtsx}'],
plugins: {
react: pluginReact,
'react-hooks': pluginReactHooks,
},
rules: {
...pluginReact.configs.recommended.rules,
...pluginReactHooks.configs.recommended.rules,
'react/react-in-jsx-scope': 'off',
'react/no-unescaped-entities': 'off',
'react-hooks/rules-of-hooks': 'off',
'react/no-unknown-property': 'off',
},
languageOptions: {
parserOptions: {
ecmaFeatures: { jsx: true },
},
globals: {
...globals.browser,
...globals.es2021,
},
},
settings: {
react: {
version: 'detect',
},
},
},
{
files: ['**/*.stories.@(ts|tsx|js|jsx|mjs|cjs)'],
plugins: {
storybook: pluginStorybook,
},
rules: {
...pluginStorybook.configs.recommended.rules,
},
}
);