import-js/eslint-plugin-import

In `import/order`, modules starting with `@/` are always treated as `unknown`

Open

#2.249 geöffnet am 7. Okt. 2021

Auf GitHub ansehen
 (3 Kommentare) (6 Reaktionen) (0 zugewiesene Personen)JavaScript (1.540 Forks)batch import
help wantedimport/export ordering

Repository-Metriken

Stars
 (4.946 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 138T 22h) (3 gemergte PRs in 30 T)

Beschreibung

If you run yarn lint on https://github.com/ykzts-sandbox/nextjs-with-module-path-aliases, you will get the following output.

$ 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