-
Notifications
You must be signed in to change notification settings - Fork 2
/
eslint.config.mjs
66 lines (65 loc) · 1.63 KB
/
eslint.config.mjs
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
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import stylistic from '@stylistic/eslint-plugin';
export default tseslint.config(
eslint.configs.recommended,
stylistic.configs.customize({
indent: 2,
quotes: 'single',
jsx: true,
semi: true,
commaDangle: 'always-multiline',
}),
...tseslint.configs.recommendedTypeChecked,
{
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@stylistic/indent': 'off',
'@stylistic/indent-binary-ops': 'off',
'@stylistic/arrow-parens': 'off',
'@stylistic/jsx-one-expression-per-line': 'off',
'@stylistic/quote-props': 'off',
'@stylistic/operator-linebreak': 'off',
'@stylistic/jsx-wrap-multilines': 'off',
'@stylistic/multiline-ternary': 'off',
},
languageOptions: {
parserOptions: {
project: true,
tsconfigRootDir: import.meta.dirname,
},
},
},
{
files: [
'**/*.mjs',
'**/*.js',
'**/*.cjs',
'**/vitest.config.*',
'**/.storybook/*',
],
extends: [tseslint.configs.disableTypeChecked],
},
{
files: ['**/*.tsx'],
ignores: ['**/*.stories.tsx', '**/*.spec.tsx', '**/.storybook/*'],
rules: {
'no-restricted-imports': [
'error',
{
patterns: [
{
group: ['@storybook/*'],
message:
'You can only use @storybook/* packages in stories or tests.',
},
],
},
],
},
},
{
ignores: ['**/dist/', '**/node_modules/', '**/src/resources/'],
},
);