This repository has been archived by the owner on Jun 12, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
108 lines (93 loc) · 2.7 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
'use strict';
module.exports = {
settings: {
'import/resolver': 'webpack',
'import/extensions': ['.js'],
},
extends: [
'eslint:recommended',
'plugin:import/errors',
'plugin:import/warnings',
],
root: true,
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 6,
sourceType: 'module',
ecmaFeatures: {
experimentalObjectRestSpread: true
}
},
rules: {
// 'no-undef': [1, 'always'],
'prefer-const': [1],
// use tabs only
'indent': [2, 'tab', {
SwitchCase: 1,
VariableDeclarator: 1,
//outerIIFEBody: 1,
CallExpression: {
arguments: 1,
},
FunctionDeclaration: {
parameters: 1,
body: 1
},
FunctionExpression: {
parameters: 1,
body: 1
}
}],
'no-tabs': 0,
// Prefer individual symbols
'import/prefer-default-export': 0,
// use one space anywhere we allow space
'no-multi-spaces': [2],
// no spaces before a functions parameters.
// good => `function add(a, b){ ... }`
// bad => `function add (a, b){ ... }`
'space-before-function-paren': [2, {
anonymous: 'always',
named: 'never',
asyncArrow: 'always'
}],
// error if we are reassigning function parameters,
// allow reassigning props of parameters
'no-param-reassign': [2, { 'props': false }],
// warn when you don't dangle a comma in a multiline object or array def
'comma-dangle': [1, 'always-multiline'],
// use whatever block padding you want
'padded-blocks': [0],
// only provide a radix to parseInt if it is not 10
radix: [2, 'as-needed'],
// set max line length to a more reasonable number
'max-len': [2, 120, {
ignoreComments: true,
ignoreUrls: true,
tabWidth: 1,
}],
// ensure named imports coupled with named exports
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/named.md#when-not-to-use-it
'import/named': 0,
// ensure default import coupled with default export
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/default.md#when-not-to-use-it
'import/default': 0,
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/namespace.md
'import/namespace': 0,
// warn on accessing default export property names that are also named exports
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-named-as-default-member.md
'import/no-named-as-default-member': 0,
// warn on accessing default export property names that are also named exports
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-named-as-default.md
'import/no-named-as-default': 0,
// disallow use of console
'no-console': 1,
},
env: {
"mocha": true,
"browser": true,
"es6": true,
"node": true,
},
globals: {}
};