-
Notifications
You must be signed in to change notification settings - Fork 5
/
.eslintrc.js
54 lines (53 loc) · 1.09 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
46
47
48
49
50
51
52
53
54
const error = 2;
const warn = 1;
const ignore = 0;
module.exports = {
root: true,
extends: [
'airbnb',
'plugin:jest/recommended',
'prettier',
'prettier/react',
'plugin:import/errors',
],
plugins: ['prettier', 'jest', 'import', 'react', 'jsx-a11y', 'json'],
env: { es6: true, node: true, browser: true, 'jest/globals': true },
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 9,
ecmaFeatures: {
jsx: true,
},
sourceType: 'module',
},
rules: {
'prettier/prettier': [
warn,
{
bracketSpacing: true,
trailingComma: 'es5',
singleQuote: true,
printWidth: 80,
tabWidth: 2,
},
],
'react/prop-types': ignore,
'react/jsx-filename-extension': [
warn,
{
extensions: ['.js', 'jsx'],
},
],
'import/prefer-default-export': ignore,
'react/jsx-no-bind': [
error,
{
ignoreDOMComponents: true,
ignoreRefs: true,
allowArrowFunctions: true,
allowFunctions: true,
allowBind: true,
},
],
},
};