-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
62 lines (62 loc) · 1.68 KB
/
.eslintrc.js
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
module.exports = {
settings: {
parser: '@typescript-eslint/parser',
},
env: {
es6: true,
browser: true,
},
extends: [
'prettier',
'plugin:prettier/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
],
rules: {
// Typescript
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'warn',
'no-use-before-define': 'off',
'@typescript-eslint/no-use-before-define': ['warn'],
'@typescript-eslint/no-empty-function': ['warn'],
'no-shadow': 'off',
'@typescript-eslint/no-shadow': ['error'],
'@typescript-eslint/ban-ts-comment': 0,
// React
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 0,
'react/react-in-jsx-scope': 0,
'react/prop-types': 0,
'react/jsx-props-no-spreading': 0,
'react/destructuring-assignment': 0,
'react/no-multi-comp': 0,
semi: ['warn', 'never', { beforeStatementContinuationChars: 'always' }],
'no-console': ['warn', { allow: ['info', 'warn', 'error'] }],
'prefer-destructuring': ['warn', { object: true, array: false }],
'no-underscore-dangle': 0,
'no-constant-condition': ['error', { checkLoops: false }],
// Prettier
'prettier/prettier': [
'error',
{
trailingComma: 'all',
semi: false,
singleQuote: true,
printWidth: 120,
arrowParens: 'avoid',
},
],
'no-restricted-imports': [
'error',
{
paths: [
{
name: 'styled-components',
message: 'Please import from styled-components/macro.',
},
],
patterns: ['!styled-components/macro'],
},
],
},
}