mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
32853c0a13
This improves our custom eslint rules to detect assertions to detect assertions with only a single argument and fixes false negatives in case unary expressions are used. Some rules were extended to also lint our docs and tools and the lib rule was simplified to prohibit most assertion calls. PR-URL: https://github.com/nodejs/node/pull/26569 Refs: https://github.com/nodejs/node/pull/26565 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
30 lines
790 B
YAML
30 lines
790 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
|
|
node-core/prefer-assert-iferror: error
|
|
node-core/prefer-assert-methods: error
|
|
node-core/prefer-common-expectserror: error
|
|
node-core/prefer-common-mustnotcall: error
|
|
node-core/crypto-check: error
|
|
node-core/eslint-check: error
|
|
node-core/inspector-check: error
|
|
node-core/number-isnan: error
|
|
## common module is mandatory in tests
|
|
node-core/required-modules: [error, common]
|
|
node-core/no-duplicate-requires: off
|
|
|
|
# Global scoped methods and vars
|
|
globals:
|
|
WebAssembly: false
|
|
BigInt: false
|
|
BigInt64Array: false
|
|
BigUint64Array: false
|
|
SharedArrayBuffer: false
|