-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
60 lines (59 loc) · 1.81 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
55
56
57
58
59
60
module.exports = {
env: {
browser: true,
commonjs: true,
es6: true,
node: false,
},
extends: ['eslint:recommended', 'plugin:react/recommended', 'prettier', 'prettier/react'],
parserOptions: {
sourceType: 'module',
ecmaVersion: 6,
ecmaFeatures: {
classes: true,
jsx: true
}
},
/* parser: 'babel-eslint',
experimentalObjectRestSpread: true,
jsx: true,
plugins: ['graphql', 'react', 'prettier'],
*/
plugins: ['react', 'prettier'],
rules: {
'react/prop-types': 1, // fix these later
'react/display-name': 1, // fix these later, see
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/display-name.md
/*
'graphql/template-strings': [
2,
{
// Import default settings for your GraphQL client. Supported values:
// 'apollo', 'relay', 'lokka'
env: 'relay',
// Import your schema JSON here
schemaJson: require('./src/relay/data/schema.json'),
// tagName is set for you to Relay.QL ...
},
],
*/
'no-undef': 1,
'no-console': 0,
'linebreak-style': ['error', 'unix'],
// might both conflict with prettier, see https://github.com/prettier/eslint-config-prettier
indent: ['error', 4],
quotes: ['error', 'single'],
semi: ['error', 'always'],
'prettier/prettier': [
'error',
{
trailingComma: 'es5',
singleQuote: true,
tabWidth: 4,
bracketSpacing: true,
jsxBracketSameLine: true,
printWidth: 120,
},
],
},
};