This repository has been archived by the owner on Jan 18, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.yml
86 lines (77 loc) · 2.02 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
%YAML 1.2
---
parser: babel-eslint
extends:
- eslint:recommended
- plugin:react/recommended
- plugin:flowtype/recommended
- plugin:import/errors
- plugin:import/warnings
- prettier
- prettier/flowtype
- prettier/react
plugins:
- babel
- react
- flowtype
env:
browser: true
es6: true
globals:
# node globals
global: false
require: false
process: false
module: false
# webpack.DefinePlugin
VERSION: false
APP_BASE: false
rules:
# best practices
array-callback-return: warn
camelcase: error
consistent-this: [warn, self]
curly: [error, multi-line]
default-case: error
eqeqeq: [error, smart]
guard-for-in: error
new-cap: off
no-await-in-loop: warn
no-case-declarations: error
no-class-assign: error
no-console: off
no-const-assign: error
no-div-regex: error
no-extra-label: error
no-fallthrough: error
no-implicit-coercion: [error, {boolean: true, number: true, string: true}]
no-implicit-globals: error
no-new-symbol: error
no-redeclare: ['error', {builtinGlobals: true}]
no-restricted-syntax: [error, WithStatement]
no-self-assign: warn
no-undef-init: off
no-underscore-dangle: off
no-unmodified-loop-condition: error
no-unused-labels: error
no-unused-vars: ['warn', {args: 'after-used', argsIgnorePattern: '^_'}]
no-useless-constructor: error
no-var: error
prefer-spread: warn
quotes: [error, single, avoid-escape]
semi: [error, never]
# react rules – https://github.com/yannickcr/eslint-plugin-react
react/display-name: off
react/no-did-mount-set-state: warn
react/no-did-update-set-state: warn
react/no-multi-comp: off # prevent multiple component definition per file
react/self-closing-comp: warn # prevent extra closing tags for components without children
# react/sort-comp: warn
react/sort-prop-types: warn
react/wrap-multilines: off
react/no-unescaped-entities: off
flowtype/no-types-missing-file-annotation: off
# jsdoc
valid-jsdoc:
- warn
- prefer: {return: 'returns', arg: 'param', argument: 'param'}