-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
45 lines (40 loc) · 1.13 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
44
45
module.exports = {
extends: [
'eslint:recommended',
'plugin:flowtype/recommended',
// Turn off all rules that are unnecessary or might conflict with prettier
require.resolve('eslint-config-prettier'),
],
plugins: [
// Use prettier for code format
'eslint-plugin-prettier',
'eslint-plugin-flowtype',
],
rules: {
'no-unused-vars': [
'error',
{vars: 'all', args: 'none', ignoreRestSiblings: true},
],
// Prettier settings
'prettier/prettier': [
'error',
{
printWidth: 80,
tabWidth: 2,
useTabs: false,
semi: true,
singleQuote: true,
trailingComma: 'es5',
bracketSpacing: false,
jsxBracketSameLine: false,
rangeStart: 0,
rangeEnd: Infinity,
},
],
// Enforce flow file declarations
'flowtype/require-valid-file-annotation': ['error', 'always'],
// Enforces consistent spacing within generic type annotation parameters.
// https://github.com/gajus/eslint-plugin-flowtype/blob/master/.README/rules/generic-spacing.md
'flowtype/generic-spacing': 'off',
},
};