-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.eslintrc.yml
93 lines (89 loc) · 1.85 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
---
# This file contains shared configuration for both flow and typescript
# For the typescript/flow specific setup see ./eslint/flowtype and
# ./eslint/typescript.
extends:
- eslint:recommended
- prettier
parser: babel-eslint
parserOptions:
ecmaVersion: 2019
sourceType: "module"
settings:
flowtype:
onlyFilesWithFlowAnnotation: true
plugins:
- node
- prettier
- jest
- flowtype
env:
es6: true
node: true
jest: true
globals:
enableDeepSnapshots: true
ruleHelpers: true
rules:
# Core
no-async-promise-executor:
- off
# Prettier
prettier/prettier: error
# Node
node/no-extraneous-require:
- error
node/no-missing-require:
- error
node/no-deprecated-api:
- error
node/process-exit-as-throw:
- error
# Jest
jest/valid-expect-in-promise:
- error
jest/valid-expect:
- error
jest/valid-describe:
- error
jest/prefer-to-have-length:
- error
jest/no-test-prefixes:
- error
jest/no-jest-import:
- error
jest/no-identical-title:
- error
jest/no-focused-tests:
- error
jest/consistent-test-it:
- error
# Flow
flowtype/boolean-style: error
flowtype/define-flow-type: error
flowtype/no-dupe-keys: error
flowtype/no-flow-fix-me-comments: warn
flowtype/no-primitive-constructor-types: error
flowtype/no-types-missing-file-annotation: error
flowtype/no-unused-expressions: error
flowtype/no-weak-types:
- error
- any: true
Object: true
Function: true
flowtype/require-exact-type: error
flowtype/require-parameter-type:
- error
- excludeArrowFunctions: true
flowtype/require-return-type:
- error
- always
- excludeArrowFunctions: true
flowtype/require-valid-file-annotation: warn
flowtype/sort-keys:
- error
- asc
flowtype/type-id-match:
- warn
- ^([A-Z][a-z]*)+Type$
flowtype/use-flow-type: error