mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
5d31448844
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>
8 lines
165 B
Plaintext
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
|