-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.yml
111 lines (111 loc) · 2.47 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
111
root: true
parser: babel-eslint
parserOptions:
sourceType: module
requireConfigFile: false
ecmaFeatures:
impliedStrict: true
jsx: true
settings:
import/resolver:
node:
extensions:
- .js
- .jsx
- .ts
- .tsx
react:
version: detect
env:
es2020: true
commonjs: true
browser: true
node: true
serviceworker: true
jest: true
plugins:
- babel
- redux-saga
- react-hooks
- emotion
extends:
- eslint:recommended
- plugin:import/errors
- plugin:import/warnings
- plugin:react/recommended
- plugin:jsx-a11y/recommended
- plugin:redux-saga/recommended
rules:
max-len:
- 1
- code: 100
ignoreComments: true
no-console: warn
no-alert: warn
no-debugger: warn
no-unused-vars: warn
no-invalid-this: 'off'
new-cap: 'off'
object-curly-spacing: 'off'
quotes: 'off'
semi: 'off'
rest-spread-spacing: warn
babel/new-cap: warn
babel/no-invalid-this: warn
babel/object-curly-spacing:
- warn
- always
babel/quotes:
- error
- single
- allowTemplateLiterals: true
babel/semi: error
# https://github.com/benmosher/eslint-plugin-import/issues/251
import/named: 'off'
import/order:
- warn
- groups:
- builtin
- external
- internal
- parent
- sibling
- index
import/newline-after-import: warn
react/boolean-prop-naming: warn
react/no-array-index-key: warn
react/no-unused-prop-types: warn
react/no-unused-state: warn
react-hooks/rules-of-hooks: error
react-hooks/exhaustive-deps: warn
emotion/no-vanilla: error
emotion/import-from-emotion: error
emotion/styled-import: error
emotion/syntax-preference:
- warn
- string
overrides:
- files:
- '*.ts'
- '*.tsx'
parser: '@typescript-eslint/parser'
parserOptions:
project: './tsconfig.json'
extends:
- plugin:import/typescript
- plugin:@typescript-eslint/eslint-recommended
- plugin:@typescript-eslint/recommended
rules:
react/prop-types: 'off'
'@typescript-eslint/explicit-function-return-type': 'off'
'@typescript-eslint/prefer-namespace-keyword': 'off'
- files:
- src/index.*
- src/webpack/builder/**
- src/server/**
rules:
no-console: 'off'
no-restricted-syntax:
- error
- selector: CallExpression[callee.object.name='console'][callee.property.name!=/^(log|warn|error|info|trace)$/]
message: Unexpected property on console object was called