-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
43 lines (41 loc) · 1.12 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
'use strict'
/* eslint quote-props: ['error', 'consistent'] */
const standard = require('eslint-config-standard')
module.exports = {
root: true,
parser: 'babel-eslint',
env: {
node: true
},
globals: {
},
plugins: [
'flowtype'
],
extends: [
'standard',
'plugin:flowtype/recommended'
],
settings: {
'flowtype': {
'onlyFilesWithFlowAnnotation': true
}
},
rules: {
// Built-in Rules
...{
'arrow-parens': ['error', 'as-needed', { 'requireForBlockBody': false }],
'generator-star-spacing': ['error', { 'before': false, 'after': true }],
'indent': ['error', 2, { ...standard.rules['indent'][2], 'SwitchCase': 0 }],
'no-console': ['error'],
'object-curly-spacing': ['error', 'always'],
'sort-imports': ['error', { 'ignoreDeclarationSort': true, 'memberSyntaxSortOrder': ['single', 'multiple', 'all', 'none'] }],
'yoda': ['error', 'never', { 'exceptRange': true }]
},
// Flowtype Rules
...{
'flowtype/no-types-missing-file-annotation': 0,
'flowtype/space-after-type-colon': [2, 'always', { 'allowLineBreak': true }]
}
}
}