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

90 stars 22 forks source link

Feature request: rootDirAlias #26

Open lifeart opened 1 year ago

lifeart commented 1 year ago

For ember projects, root dir is always app, but in app imports it's resolved from project name:

Real dir: app/services/login.ts In-app alias: my-application/services/login.ts

At the moment there is no way to provide proper autofix config.

bayasdev commented 4 months ago

I need this feature as well

zecka commented 1 month ago

You can do that with rule option

...
"no-relative-import-paths/no-relative-import-paths": [
  "warn",
  { "allowSameFolder": true, "rootDir": "app", "prefix": "my-application" }
]
...
lifeart commented 1 month ago

@zecka thank you for your reply! According to naming, it seems it will be like {my-application}/{app}..., and I need {my-application}/...