Bug: file-extension-in-import
cannot fix correctly for barrel file
#403
Labels
file-extension-in-import
cannot fix correctly for barrel file
#403
Environment
Node version: 18.20.5
npm version: 10.8.2
ESLint version: 9.17.0
eslint-plugin-n version: 17.15.1
Operating System: Linux 6.1.0-28-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.119-1 (2024-11-22) x86_64 GNU/Linux
What rule do you want to report?
file-extension-in-import
Link to Minimal Reproducible Example
https://eslint-online-playground.netlify.app/#eNqFVM2K2zAQfhVVp2xIbHIohfRS6BZ62pZCT1UPRh5nlZUlI8ltQvC77+jHsp2Q3YCDpPnm/5u5UGe5Vo04FGClUK44Wq3onl6YIoRRODlQtWV0j5eizGCPYnQTQVy3nZBgfnROaBXAQd3LlP7WCuefnOnBvw5JSygu+xq86A+j1nBG/zI10M0U0jKWt9xYZwR3T72UX5+BvwRhdhitoocSTlXbSSicRbOi7bRx5EJ6JyQZSGN0G7Jsz9tGyxoMo5+Zeh9WLnGV0u4ZzO+7cG8oqDDlj6sHPM6U8J7CnVSEquEUw4ZT8LOeLCd7N0r+faHT9Ir72oVUVg9YPuMLhNW2Gqsi9WHF6HeQUn9gFKNC6eD//HdtYhHwPUvnyQ5GlxiWmzv14GjHbL5EUHnEFk5FdTY+jyh37sByIzq3jYI5OL78lP1BqCddw6gU37ddEGyRvqEDKa8amqqXk6cU5cpndbTpZgsDyMIWRwLqQONEwAZ5aQOP1+tyXVyc3bT4cfycPQ3I7IAmJM2Th4Y7IUWBLVr4vPVyDxdZnyEpGP+TlTr01QHSrORJib+uMjbP0ZWMYAmi/V9au0dh9iTWtWjBVUUtjKpayD6TQaOPwF2cuYUMhy8fZ4LYhGvfan/TvJn6eBztjDU1fSh+toRLp/QN2YZiW8xxi/2OSaRtA8ZonO4NYiv5vzoj2TbkMowWgyvvxk8mErer+AsW82ofeRLGxdjqGmPI+7CGf4/Q+fYpLmC5qOb89qqycmAxrOR5ZOkd4cT7dwF5MN7wMpsFj9p9KnYfix2jeWsOr6QwBF8=
What did you expect to happen?
import { util } from "./my-folder";
toimport { util } from "./my-folder/index.js";
import { util } from "./my-folder/";
toimport { util } from "./my-folder/index.js";
Participation
Additional comments
We are migrating a (very) huge codebase, and we are currently using barrel files and not ESM yet. As first step, we want to force the usage of extensions in the imports and migrate step-by-step.
The text was updated successfully, but these errors were encountered: