forked from bleupen/halacious
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
87 lines (73 loc) · 1.93 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
// ESLint configuration
// http://eslint.org/docs/user-guide/configuring
module.exports = {
parserOptions: {
ecmaVersion: 2017,
},
extends: ['airbnb-base', 'prettier', 'plugin:node/recommended'],
plugins: ['prettier', 'node', 'mocha'],
globals: {
__DEV__: true,
},
env: {
browser: true,
es6: true,
node: true,
},
rules: {
// TODO: Update code and re-enable rules.
'consistent-return': 'off',
'global-require': 'off',
'func-names': 'off',
'import/order': 'off',
'no-param-reassign': 'off',
'no-shadow': 'off',
'one-var': 'off',
'prefer-const': 'off',
'prefer-destructuring': 'off',
'import/extensions': [
'error',
'never',
{ packages: 'always', json: 'always' },
],
'no-cond-assign': ['error', 'except-parens'],
// Recommend not to leave any console.log in your code
// Use console.error, console.warn and console.info instead
'no-console': [
'error',
{
allow: ['warn', 'error', 'info'],
},
],
'no-plusplus': ['error', { allowForLoopAfterthoughts: true }],
// Allow HAL properties
'no-underscore-dangle': ['error', { allow: ['_embedded', '_links'] }],
'node/no-unpublished-require': 'off',
'node/no-unsupported-features': [
'error',
{
version: 8,
ignores: [],
},
],
// ESLint plugin for prettier formatting
// https://github.com/prettier/eslint-plugin-prettier
'prettier/prettier': [
'error',
{
// https://github.com/prettier/prettier#options
singleQuote: true,
trailingComma: 'es5',
},
],
},
settings: {
// Allow absolute paths in imports, e.g. import Button from 'components/Button'
// https://github.com/benmosher/eslint-plugin-import/tree/master/resolvers
'import/resolver': {
node: {
moduleDirectory: ['node_modules', 'data', 'handlers'],
},
},
},
};