forked from NatLibFi/finna-ui-components
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
36 lines (34 loc) · 1.02 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
module.exports = {
extends: 'eslint:recommended',
env: {'browser': true},
globals: {
'$': false,
'jQuery': false
},
rules: {
// errors
'block-scoped-var': 'error',
'func-names': 'error',
'no-loop-func': 'error',
'no-param-reassign': 'error',
'no-shadow': 'error',
'no-unused-expressions': 'error',
// warnings
'dot-notation': 'warn',
'eqeqeq': ['warn', 'smart'],
'guard-for-in': 'warn',
'key-spacing': ['warn', {'beforeColon': false, 'afterColon': true}],
'no-lonely-if': 'warn',
'no-console': ['warn', {'allow': ['warn', 'error']}],
'no-unneeded-ternary': 'warn',
// fixed automatically
'block-spacing': ['warn', 'always'],
'comma-spacing': ['warn', {'before': false, 'after': true}],
'indent': ['error', 2],
'keyword-spacing': ['warn', {'before': true, 'after': true}],
'linebreak-style': ['error', 'unix'],
'no-multi-spaces': 'warn',
'semi-spacing': ['warn', {'before': false, 'after': true}],
'space-infix-ops': 'warn'
}
};