node
node copied to clipboard
tools: add `sort-requires` rule to enforce `{a, b, c} = require()` is in alphabetical order
Close #44153
This PR added new custom ESLint rule named sort-requires
that verify all destructed members of {} = require()
and {} = primordials
are sorted alphabetically inspired by eslint/sort-imports
According to make lint-js
, there are 221 problems with sort-requires
.