-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.eslintrc.yaml
149 lines (123 loc) · 2.89 KB
/
.eslintrc.yaml
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
parser: '@typescript-eslint/parser'
parserOptions:
project: ./tsconfig.json
ecmaVersion: 2020
ecmaFeatures:
jsx: true
settings:
react:
version: detect
import/resolver:
typescript: true
root: true
env:
node: true
extends:
- airbnb-base
- airbnb-typescript/base
- prettier
- 'plugin:sonarjs/recommended'
- 'plugin:react/jsx-runtime'
- 'plugin:react-hooks/recommended'
- 'plugin:import/recommended'
- 'plugin:import/typescript'
plugins:
- prettier
rules:
prettier/prettier: warn
max-len:
- error
- code: 120
curly:
- error
- all
no-void:
- error
- allowAsStatement: true
no-underscore-dangle:
- error
- allow: [ __DEV__ ]
no-restricted-globals:
- error
- React
no-restricted-imports:
- error
- patterns: [ '../../../*' ]
no-restricted-exports:
- error
- restrictDefaultExports:
direct: true
no-unused-vars:
- error
- argsIgnorePattern: '^_'
ignoreRestSiblings: true
no-param-reassign:
- error
- ignorePropertyModificationsFor: [ ref ]
no-console: off
no-plusplus: off
no-nested-ternary: off
no-restricted-syntax: off
no-promise-executor-return: off
default-case: off
lines-between-class-members:
- error
- always
- exceptAfterSingleLine: true
react/jsx-newline: error
react/no-array-index-key: error
react/jsx-curly-brace-presence:
- error
- never
'@typescript-eslint/no-floating-promises':
- error
- ignoreVoid: true
'@typescript-eslint/no-unused-vars': off
'@typescript-eslint/lines-between-class-members': off
import/prefer-default-export: off
import/no-extraneous-dependencies: off
import/consistent-type-specifier-style:
- error
- prefer-top-level
'@typescript-eslint/consistent-type-imports':
- error
- prefer: type-imports
fixStyle: inline-type-imports
import/order:
- error
- alphabetize:
order: asc
newlines-between: always
groups: [ builtin, external, internal, parent, sibling ]
pathGroupsExcludedImportTypes: [ builtin ]
pathGroups:
- pattern: webpack{,-dev-server}
group: external
position: before
- pattern: react{,-dom/*}
group: external
position: before
- pattern: mobx{,-react-lite}
group: external
position: before
- pattern: framer-motion
group: external
position: before
- pattern: '@**'
group: internal
position: before
- pattern: shared/**
group: internal
position: before
- pattern: assets/**
group: sibling
position: after
class-methods-use-this: off
overrides:
- files: [ '*.config.ts', 'webpack.*.ts' ]
rules:
no-restricted-exports: off
- files: '*.d.ts'
rules:
no-unused-vars: off
no-restricted-exports: off