eslint-plugin-paths: A plugin for ESLint, to force use paths aliases from tsconfig
eslint-plugin-paths: A plugin for ESLint, to force use paths aliases from tsconfig
github.com
GitHub - vitonsky/eslint-plugin-paths: A plugin for ESLint, to force use paths aliases from tsconfig
Cool stuff, I was looking for something like this!
Only thing I'm missing is an option to prefer local imports over alias imports - I like to use alias imports for different modules, but local imports for stuff in the same module (but only downward, never parents). Would such a feature be interesting to you?
Could you elaborate your idea.
If i correct understood you, you want to use relative imports inside alias directory. This is possible, you may check test about it https://github.com/vitonsky/eslint-plugin-paths/blob/d5a307866df9cf460a50301820e12e3653eb1cca/src/rules/alias.test.ts#L36-L40
Is it that you need?
It is, but I'd specifically like a rule that enforces this style of import over aliased imports. I.e. when importing a package, the order of importance is: