0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/test/.eslintrc
Teddy Katz 5d31448844 tools,test: enforce assert.ifError with lint rule
This adds an ESLint rule to enforce the use of `assert.ifError(err)`
instead of `if (err) throw err;` in tests.

PR-URL: https://github.com/nodejs/node/pull/10671
Ref: https://github.com/nodejs/node/pull/10543
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Michal Zasso <targos@protonmail.com>
2017-01-09 09:20:38 -08:00

8 lines
165 B
Plaintext

## Test-specific linter rules
rules:
## common module is mandatory in tests
required-modules: [2, common]
prefer-assert-iferror: 2
prefer-assert-methods: 2