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

Feat work in the workspace #20

Closed takurinton closed 1 year ago

takurinton commented 1 year ago

17

The current configuration doesn't seem to work when using workspaces. If the file is not found in __dirname, it also uses process.cwd() to make the file discoverable.

cletusw commented 1 year ago

Great fix, thanks!

I reordered it to check CWD before __dirname since that gives preference to an npm/yarn workspace's local rules even if the project root has some. It worked locally for me using a simple test npm workspace. Can you check that this still works in yarn workspaces? Then I'll merge it and release a major version update (since this could potentially be a breaking change).

Thanks again!

takurinton commented 1 year ago

@cletusw

I reordered it to check CWD before __dirname

ok, thank you!!!

And I have verified that this works with pnpm workspaces in addition to yarn workspaces.

cletusw commented 1 year ago

Pushed as v2.0.0