0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-29 23:16:30 +01:00
nodejs/test/.eslintrc.yaml
Anatoli Papirovski e51fb90a6d
tools: prefer common.expectsError in tests
Add lint rule to validate that common.expectsError(fn, err) is being
used instead of assert.throws(fn, common.expectsError(err));

PR-URL: https://github.com/nodejs/node/pull/17557
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-12-11 18:23:11 -05:00

23 lines
527 B
YAML

## Test-specific linter rules
rules:
# ECMAScript 6
# http://eslint.org/docs/rules/#ecmascript-6
no-var: error
prefer-const: error
symbol-description: off
# Custom rules in tools/eslint-rules
prefer-assert-iferror: error
prefer-assert-methods: error
prefer-common-expectserror: error
prefer-common-mustnotcall: error
crypto-check: error
inspector-check: error
## common module is mandatory in tests
required-modules: [error, common]
# Global scoped methods and vars
globals:
WebAssembly: false