-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy path.eslintrc.js
40 lines (39 loc) · 947 Bytes
/
.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
module.exports = {
root: true,
env: {
mocha: true,
node: true,
},
parserOptions: {
ecmaVersion: 2018,
},
plugins: ['prettier', 'jsdoc', 'promise', 'sonarjs'],
extends: [
'plugin:jsdoc/recommended',
'plugin:promise/recommended',
'plugin:sonarjs/recommended',
'eslint:recommended',
'airbnb-base',
'plugin:prettier/recommended',
],
rules: {
// Only allow debugger in development
'no-debugger': process.env.PRE_COMMIT ? 'error' : 'off',
// Only allow `console.log` in development
'no-console': process.env.PRE_COMMIT
? ['error', { allow: ['warn', 'error'] }]
: 'off',
'prettier/prettier': 'error',
'max-len': [
'warn',
{
comments: 80,
ignoreTrailingComments: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
},
],
// JSDoc linting rules.
'jsdoc/require-returns-description': 'off',
},
};