-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.yml
96 lines (87 loc) · 2.25 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
# Mostly inspired by the .eslintrc that FB uses for React
parser: babel-eslint
extends:
- eslint:recommended
- prettier
plugins:
- react
- prettier
parserOptions:
ecmaVersion: 6
sourceType: module
ecmaFeatures:
jsx: true
env:
browser: true
es6: true
globals:
__dirname: true,
__DEVTOOLS__: true,
__DEVELOPMENT__: true,
__TEST__: true,
module: true,
exports: true,
require: true,
process: true
rules:
accessor-pairs: off
brace-style: [error, 1tbs]
comma-dangle: [error, never]
consistent-return: error
dot-location: [error, property]
dot-notation: error
eol-last: error
eqeqeq: [error, always, { null: ignore }]
keyword-spacing: error
no-bitwise: off
no-constant-condition: [error, { checkLoops: false }]
no-dupe-class-members: error
no-multi-spaces: error
no-shadow: error
no-unused-expressions: error
no-unused-vars: [error, { args: none }]
no-var: error
padded-blocks: [error, never]
prefer-const: [error, { destructuring: all, ignoreReadBeforeAssign: true }]
prettier/prettier: [error, { singleQuote: true, trailingComma: none, printWidth: 120 }]
quotes: [error, single, avoid-escape]
semi: [error, always]
space-before-blocks: error
space-before-function-paren: [error, never]
space-in-parens: [error, never]
space-infix-ops: error
spaced-comment: [error, always, { block: { exceptions: ["*"] } }]
strict: [error, global]
# JSX
# Our transforms set this automatically
react/display-name: off
react/jsx-boolean-value: [error, always]
react/jsx-no-undef: error
react/jsx-sort-prop-types: off
react/jsx-sort-props: off
react/jsx-uses-react: error
react/jsx-uses-vars: error
react/jsx-wrap-multilines: [error, { declaration: false, assignment: false }]
react/no-did-mount-set-state: off
react/no-did-update-set-state: off
react/no-multi-comp: off
react/no-unknown-property: error
react/prop-types: off
react/react-in-jsx-scope: error
react/self-closing-comp: error
react/sort-comp: off
overrides:
- files:
- "src/components/**/__tests__/*-test.js?(x)"
globals:
describe: true,
it: true,
beforeEach: true,
afterEach: true,
sinon: true,
before: true,
after: true,
process: true,
global: true
rules:
no-unused-expressions: 0