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

Question: Why only requireUp? #26

Closed adbutterfield closed 7 months ago

adbutterfield commented 7 months ago

Hello, I have a question.

I was thinking to declare a local rule in the shared eslint config we use where I work. The shared config is already a package, and I didn't want to create a whole other package just for the custom rule, so I decided to give eslint-plugin-local-rules a try.

But when I added the custom rule, it doesn't work, because it starts looking for eslint-local-rules{.js,.cjs} or eslint-local-rules/index.js at the root of my project, and not in my eslint config package.

I was wondering if this was a deliberate design decision? Or do you think this is a valid use case to accommodate? I'm guessing it should be pretty easy to handle?

adbutterfield commented 7 months ago

Ah, I guess there's no way to do it really with how this package works. You can only know __dirname or process.cwd, and not whatever other module trying to use eslint-plugin-local-rules...

douglasg14b commented 2 weeks ago

Does this explain why it just doesn't work as part of a package in a monorepo?