cletusw / eslint-plugin-local-rules

A plugin for ESLint that allows you to use project-specific rules
MIT License
158 stars 9 forks source link

allow importing eslint-local-rules directories #6

Closed BenoitZugmeyer closed 3 years ago

BenoitZugmeyer commented 3 years ago

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.

BenoitZugmeyer commented 3 years ago

Thank you for the quick release, I am already using it! 🎉

cletusw commented 3 years ago

Awesome!