This slightly changes the resolveUp logic to consider the module path without extension, to let Node.js resolve it with its own logic. Because Node.js will test for .js extension, we don't need to include it in exts.
This way, using a eslint-local-rules folder containing a index.js file can be used to expose local rules. It is useful when the
eslint-local-rules.js file gets a bit big and we need to split it to separate each rule in its own file.
This slightly changes the
resolveUp
logic to consider the module path without extension, to let Node.js resolve it with its own logic. Because Node.js will test for .js extension, we don't need to include it inexts
.This way, using a eslint-local-rules folder containing a index.js file can be used to expose local rules. It is useful when the eslint-local-rules.js file gets a bit big and we need to split it to separate each rule in its own file.