-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.yml
80 lines (74 loc) · 1.93 KB
/
.eslintrc.yml
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
env:
es2021: true
node: true
extends:
- eslint:recommended
- plugin:security/recommended-legacy
- plugin:regexp/recommended
- prettier
parserOptions:
ecmaVersion: latest
sourceType: module
# I generally prefer rules and settings to be configured everywhere in case I
# want to enable a plugin in another place
rules:
react-refresh/only-export-components: warn
jsx-a11y/autocomplete-valid:
- error
- inputComponents:
- Input
jsx-a11y/heading-has-content:
- error
- components:
- TypographyH1
- TypographyH2
- TypographyH3
- TypographyH4
- AlertTitle
- CardTitle
- DialogTitle
settings:
react:
version: detect
tailwindcss:
calees: [cn, cva, classnames, clsx, ctl]
whitelist: [destructive]
# I prefer applying most configuration settings via overrides, unless they
# really are generic settings that should apply to every file. It seems to make
# ESLint work a bit better (ex. it picks up more files automatically), and it
# avoids unnecessary rules in a lot of places (a lot of provided configs apply
# to files they don't need to).
overrides:
- files: ['*.ts', '*.tsx']
extends:
- plugin:@typescript-eslint/eslint-recommended
- plugin:@typescript-eslint/recommended
plugins:
- '@typescript-eslint'
parser: '@typescript-eslint/parser'
- files: ['src/**/*']
env:
browser: true
extends:
- plugin:react-hooks/recommended
- plugin:react/recommended
- plugin:react/jsx-runtime
- plugin:jsx-a11y/recommended
- plugin:tailwindcss/recommended
plugins:
- react-refresh
- react
- files: ['src/components/ui/**/*']
rules:
jsx-a11y/heading-has-content: off
react/prop-types:
- error
- ignore:
- align
- checked
- className
- position
- sideOffset
ignorePatterns:
- dist
- public