Skip to content

Add Eslint rule prefer-assert-methods

Rodrigo Muino Tomonari requested to merge github/fork/danyshaanan/eslint into master
Checklist
  • make -j4 test (UNIX), or vcbuild test nosign (Windows) passes
  • commit message follows commit guidelines

(Commits will be squashed and properly named after some more review)

Description of change

@trott

Add ESLint rule for catching uses of assert() with binary operators (===, !===, ==, !=) which could be replaces with assert's methods - strictEqual/notStrictEqual/equal/notEqual.

Here is some of the output for:

./node tools/eslint/bin/eslint.js --cache --rulesdir=tools/eslint-rules test/

image

for a total of 86 errors.

If the rule will be deemed good, I'd be happy to fix these violations. (fixed).

WDTY?

Merge request reports

Loading