forked from MintFort/mintfort.com
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc
96 lines (87 loc) · 1.48 KB
/
.eslintrc
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
# https://eslint.org/docs/rules/
env:
es6: true
node: true
browser: true
jest: true
parserOptions:
sourceType: module
ecmaVersion: 2018
ecmaFeatures:
jsx: true
browser: true
parser: babel-eslint
plugins:
- react
extends:
- eslint:recommended
- plugin:import/errors
- plugin:import/warnings
- plugin:react/recommended
rules:
# Stylistic
max-len:
- error
- 100
- 2
- ignoreUrls: true
linebreak-style:
- off
indent:
- error
- 2
comma-dangle:
- error
- never
no-lonely-if: error
no-unneeded-ternary: error
no-whitespace-before-property: error
block-spacing: error
comma-spacing:
- error
- before: false
after: true
semi:
- error
- never
keyword-spacing:
- error
- before: true
object-curly-spacing:
- error
- always
array-bracket-spacing:
- error
- never
- singleValue: true
objectsInArrays: true
arrow-spacing: error
arrow-parens:
- error
- as-needed
arrow-body-style:
- error
- as-needed
# Best practices
no-plusplus: error
no-var: error
no-else-return: error
no-multi-spaces: error
no-eval: error
no-console: 'off'
object-shorthand: error
prefer-arrow-callback: warn
prefer-destructuring:
- warn
- object: true
array: true
strict: 0
# React
react/no-deprecated: 'off'
react/display-name: 'off'
react/prop-types:
- error
- ignore:
- match
- history
- children