MelvinVermeer / eslint-plugin-no-relative-import-paths

90 stars 22 forks source link

add rootDir config option #6

Closed maerten closed 2 years ago

maerten commented 2 years ago

Hi!

In a nextjs project, I noticed relative paths being rewritten to 'src/components/SomeComponent' instead of 'components/SomeComponent'. This PR adds a new config option rootDir to solve that problem.

E.g. { "rootDir": "src" } solves the issue I was seeing.

If this behavior is already configurable via some other eslint setting, I would be interested to learn about that!

maerten commented 2 years ago

Thanks for merging 👍