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
|
env:
node: true
parserOptions:
ecmaVersion: 9
# Override eslint-config-standard, which incorrectly sets this to "module",
# though that setting is only for ES6 modules, not CommonJS modules.
sourceType: 'script'
extends:
- 'eslint:recommended'
- standard
- prettier
plugins:
- mocha
overrides:
- files:
- 'tests/**/*.js'
env:
mocha: true
rules:
mocha/no-exclusive-tests: 'error'
rules:
# TODO These are included in standard and should be cleaned up and turned on.
n/no-deprecated-api: 'off' # we still make heavy use of url.parse
# TODO remove once we drop support for Node 10
node/no-deprecated-api: 'off'
# Nock additions.
strict: ['error', 'safe']
no-console: 'error'
no-loop-func: 'error'
no-var: 'error'
prefer-const: 'error'
object-shorthand: ['error', 'properties']
prefer-template: 'error'
arrow-body-style: ['error', 'as-needed']
prefer-destructuring:
[
'error',
{
'VariableDeclarator': { 'array': false, 'object': true },
'AssignmentExpression': { 'array': false, 'object': false },
},
]
|