biome: π eslint migration find/replace bug
Environment information
CLI:
Version: 1.8.0
Color support: true
Platform:
CPU Architecture: x86_64
OS: macos
Environment:
BIOME_LOG_DIR: unset
NO_COLOR: unset
TERM: "xterm-256color"
JS_RUNTIME_VERSION: "v20.12.2"
JS_RUNTIME_NAME: "node"
NODE_PACKAGE_MANAGER: "npm/10.5.0"
Biome Configuration:
Status: Loaded successfully
Formatter disabled: false
Linter disabled: false
Organize imports disabled: false
VCS disabled: true
Workspace:
Open Documents: 0
What happened?
I make use of the eslint βextendsβ section, where I extend a few of my own rules like so:
extends: [
"@mjgerace/eslint-configs/base-vitest",
"@mjgerace/eslint-configs/react",
"@mjgerace/eslint-configs/graphql",
],
When running npx @biomejs/biome migrate eslint --write, I am hitting the following issue, repeated for every one of the extends imports above:
β Migration has encountered an error: `node` was invoked to resolve '@mjgerace/eslint-config-eslint-configs/graphql'. This invocation failed with the following error:
node:internal/modules/esm/resolve:854
throw new ERR_MODULE_NOT_FOUND(packageName, fileURLToPath(base), null);
^
Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@mjgerace/eslint-config-eslint-configs' imported from /Users/mjgerace/repos/MjApp/app/[eval]
Something fascinating is happening here - somewhere in the migration script, it appears biome is seeing @mjgerace/eslint-configs, and transforming it to @mjgerace/eslint-config-eslint-configs. How bizarre!
Expected result
The imports are left unchanged so that node can resolve them, as eslint does today.
Code of Conduct
- I agree to follow Biomeβs Code of Conduct
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (9 by maintainers)
@TheSamsa I released a nightly version if you want to try it.
Its version 1.9.4, the most recent one in yarnpkgs. @Conaclos I will tomorrow if thats okay. I used my name as placeholder since I have to check if its okay with the company to share this. I will have to reproduce it on GH then, since its a private repository.
@Conaclos I will follow up, this is a real issue. I will provide evidence to reopen.