-
Notifications
You must be signed in to change notification settings - Fork 9
/
.eslintrc.js
55 lines (48 loc) · 1.12 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
'use strict';
const os = require('os');
module.exports = {
extends: ['airbnb-base', 'plugin:prettier/recommended'],
parserOptions: {
sourceType: 'script',
},
env: {
node: true,
es6: true,
mocha: true,
},
rules: {
// Prettier overrides
'prettier/prettier': [
'error',
{
singleQuote: true,
trailingComma: 'es5',
bracketSpacing: false,
arrowParens: 'always',
},
],
// ESLint overrides
'class-methods-use-this': 'off',
'consistent-return': 'off',
'linebreak-style': ['error', os.EOL === '\r\n' ? 'windows' : 'unix'],
'object-shorthand': 'off',
'one-var': 'off',
'prefer-destructuring': 'off',
'no-param-reassign': 'off',
'no-prototype-builtins': 'off',
'no-restricted-syntax': 'off',
'no-underscore-dangle': 'off',
'no-plusplus': 'off',
strict: ['error', 'global'],
'require-yield': 'off',
'max-len': [2, 101],
},
overrides: [
{
files: ['*.spec.js', '*.test.js'],
rules: {
'func-names': 0, // allow anonymous functions, useful with mocha
},
},
]
};