generated from Sachin-chaurasiya/codespaces-react-chakra-ui
-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy path.eslintrc.yml
110 lines (98 loc) · 2.17 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
env:
browser: true
es2021: true
jest: true
extends:
- eslint:recommended
- plugin:react/recommended
- plugin:jest/recommended
- plugin:jest/style
- plugin:jest-formatting/recommended
- plugin:@typescript-eslint/recommended
- prettier
overrides: []
settings:
react:
version: detect
parser: '@typescript-eslint/parser'
parserOptions:
ecmaVersion: latest
sourceType: module
plugins:
- react
- '@typescript-eslint'
rules:
# Require a whitespace at the beginning of a comment
spaced-comment:
- error
- always
# Maximum line length for comments except trailing comments
max-len:
- error
- comments: 120
code: 200 # Set to not conflict with Prettier
ignoreTrailingComments: true
ignoreUrls: true
# Require braces around blocks
curly:
- error
- all
# Require parentheses around arrow function arguments
arrow-parens:
- error
- always
# Require blank line before certain statements
padding-line-between-statements:
- error
- blankLine: always
prev: '*'
next: function
- blankLine: always
prev: '*'
next: class
- blankLine: always
prev: '*'
next: export
# Ignore consecutive export statements
- blankLine: any
prev: export
next: export
- blankLine: always
prev: '*'
next: return
- blankLine: always
prev: '*'
next: break
- blankLine: always
prev: '*'
next: continue
- blankLine: always
prev: '*'
next: throw
# eslint-plugin-react rules
# Require props to be sorted
react/jsx-sort-props:
- error
- callbacksLast: true
shorthandFirst: true
# Omit boolean prop value when set to true
react/jsx-boolean-value:
- error
- never
# Require self closing tags in JSX/HTML
react/self-closing-comp:
- error
- component: true
html: true
# Require PascalCase for user-defined JSX components
react/jsx-pascal-case:
- error
react/prop-types:
- off
# Disallow unnecessary curly braces in JSX
react/jsx-curly-brace-presence:
- error
- never
# "React" must be in scope when using JSX
react/react-in-jsx-scope:
- off