This repository has been archived by the owner on Aug 31, 2023. It is now read-only.
🐛 Enabling organizeImports
and ignoring ["node_modules"]
folder breaks rome
#4434
Closed
1 task done
Labels
A-Core
Area: core
A-LSP
Area: language server protocol
S-Bug: confirmed
Status: report has been confirmed as a valid bug
Milestone
Environment information
What happened?
By default rome CLI ignores
node_modules
folders inside the workspace, but vscode extension does not. It makes no sense at all and just causes performance issues.However, in order to fix this issue, we have to add
node_modules
folder to the linterignore
array.When doing this and adding additionally
organizeImports
to rome.json, rome breaks in two ways.organizeImports
in rome.json by adding:node_modules
folder toignore
array:First issue
Clone my example
git clone https://github.com/jrson83/rome-issue.git cd rome-issue pnpm install
node_modules/preact/package.json
from the exampleOpening any
.json
file from insidenode_modules
throws a notification Error in vscode:Notification:
Request textDocument/codeAction failed.
Error output:
Second issue
git clone https://github.com/jrson83/rome-issue.git cd rome-issue pnpm install
Opening any
.json
file from insidenode_modules
and then opening any.json
file from outsidenode_modules
. Then ignoring the error above, restarting the IDE with both.json
files still open, vscode will be unable to locate any schema from default schemas.node_modules/preact/package.json
from the example, then open.vscode/settings.json
and restart the IDE.Expected result
Rome should ignore any
**/node_modules/**
folder inside a workspace by default.Code of Conduct
The text was updated successfully, but these errors were encountered: