You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The only way it partially works is enabling formatting on save. I say partially because on some files with errors, I would save to format and the entire file contents are deleted. This never happens when running the biome cli so it must be an issue with the plugin/jetbrains.
In the meantime, I'm running the following External Tool with a keymap (Ctrl+B) so as to not have to type the format command every time.
// runBiomeCheck.jsconst{ exec }=require("child_process");// Getting the file path from the command line argumentsconstfilePath=process.argv[2];if(!filePath){console.error('Usage: node runBiomeFormat.js <file_path>');process.exit(1);}// Construct the command to executeconstcommand=`npx @biomejs/biome check --apply-unsafe "${filePath}"`;// Execute the commandexec(command,(error,stdout,stderr)=>{if(error){console.error(`Error: ${error.message}`);return;}if(stderr){console.error(`Stderr: ${stderr}`);return;}console.log(`Output: ${stdout}`);});
I hope this helps. Thank you.
The text was updated successfully, but these errors were encountered:
WebStorm v2023.3.5
Biome Plugin v1.0.0
The only way it partially works is enabling formatting on save. I say partially because on some files with errors, I would save to format and the entire file contents are deleted. This never happens when running the biome cli so it must be an issue with the plugin/jetbrains.
In the meantime, I'm running the following External Tool with a keymap (Ctrl+B) so as to not have to type the format command every time.
I hope this helps. Thank you.
The text was updated successfully, but these errors were encountered: