-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
70 lines (69 loc) · 1.56 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
61
62
63
64
65
66
67
68
69
70
const { readFileSync } = require('fs')
module.exports = {
env: {
es6: true,
node: true,
},
extends: [
'airbnb-base',
'plugin:import/typescript',
'plugin:react/recommended',
],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
},
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
},
plugins: ['@typescript-eslint', 'graphql'],
settings: {
'import/resolver': {
alias: {
map: [
['@graphql', './graphql/generated'],
['@graphql-mock', './graphql/mock/provider'],
['@utils', './utils/index'],
['@theme', './theme'],
['@atoms', './components/atoms/'],
['@molecules', './components/molecules/'],
['@organisms', './components/organisms/'],
['@templates', './components/templates/'],
],
extensions: ['.ts', '.tsx'],
},
},
},
rules: {
semi: 0,
indent: [0, 4],
'no-tabs': 0,
'no-use-before-define': 0,
'no-mixed-spaces-and-tabs': 0,
'object-curly-newline': 0,
'import/extensions': 0,
'import/no-extraneous-dependencies': 0,
'implicit-arrow-linebreak': 0,
'function-paren-newline': 0,
'import/prefer-default-export': 0,
'import/no-unresolved': [2, { commonjs: true }],
curly: 0,
'@typescript-eslint/no-unused-vars': 'error',
'operator-linebreak': 0,
'nonblock-statement-body-position': 0,
'no-confusing-arrow': 0,
'react/jsx-uses-react': 1,
'graphql/template-strings': [
'error',
{
env: 'apollo',
schemaString: readFileSync(
`./graphql/cloud-schema.graphql`,
'utf-8',
),
},
],
},
}