| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
| node && | |
| node.id && | |
| node.id.type === 'ObjectPattern' | |
| node?.id?.type === 'ObjectPattern' |
Sorry, something went wrong.
There was a problem hiding this comment.
Might be a good idea to include a commit with this rule being applied to the codebase, so it would be easier to estimate the amount of code churn.
Shouldn't something like sort-imports go first?
Sorry, something went wrong.
There was a problem hiding this comment.
Could this rule also enforce trailing commas for require/primordials destructuring?
Sorry, something went wrong.
There was a problem hiding this comment.
We'd need to split this into several commits to minimize the work of backporting. We'd also need to have this rule reject multi-line destructuring without trailing commas.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
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.