-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
59 lines (59 loc) · 1.34 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
module.exports = {
parser: 'babel-eslint',
parserOptions: {
ecmaFeatures: {
generators: true,
experimentalObjectRestSpread: true
},
sourceType: 'module',
allowImportExportEverywhere: false
},
env: {
node: true,
es6: true
},
plugins: ['prettier', 'babel'],
extends: ['airbnb', 'prettier', 'prettier/react'],
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.json', '.css', '.styl']
}
}
},
globals: {
window: true,
document: true,
__dirname: true,
__DEV__: true,
CONFIG: true,
process: true,
jest: true,
describe: true,
test: true,
it: true,
expect: true,
beforeEach: true,
fetch: true,
alert: true
},
rules: {
'no-tabs': 0,
'class-methods-use-this': 1,
'max-len': 0,
'global-require': 0,
'import/no-dynamic-require': 0,
'indent': [2, 'tab', { 'SwitchCase': 1 }],
'no-plusplus': [2, { 'allowForLoopAfterthoughts': true }],
'react/jsx-indent': [2, 'tab'],
'react/jsx-filename-extension': 0,
'react/no-danger': 0,
'no-unused-vars': [ 'error', { args: 'none' } ],
// See https://github.com/evcohen/eslint-plugin-jsx-a11y/issues/340
"jsx-a11y/anchor-is-valid": [ "error", {
"components": [ "Link" ],
"specialLink": [ "to" ]
}],
'prettier/prettier': [ 'error', { useTabs: true, tabWidth: 2, singleQuote: true, printWidth: 100, trailingComma: "all" } ]
}
}