import-js / import-js/eslint-plugin-import
In `import/order`, modules starting with `@/` are always treated as `unknown`
- Dominant language
- JavaScript
- Stars
- 5.9k
- Forks
- 1.5k
- PR merge metrics
- No merged PRs in 30d
Description
If you run `yarn lint` on https://github.com/ykzts-sandbox/nextjs-with-module-path-aliases, you will get the following output.
```console
$ yarn lint
yarn run v1.22.11
$ next lint
info - Using webpack 5. Reason: Enabled by default https://nextjs.org/docs/messages/webpack5
./pages/index.tsx
5:1 Error: `../styles/Home.module.css` import should occur before import of `@/components/hello` import/order
info - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
```
regression from #2146
Contributor guide
Research direction
Reproduce the report with the linked nextjs-with-module-path-aliases example by running yarn lint and inspect the import/order rule behavior for the @/components/hello import in pages/index.tsx. Compare the regression with #2146 and verify that aliased modules are classified consistently rather than reported as unknown, with the existing lint failure resolved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100