-
-
Notifications
You must be signed in to change notification settings - Fork 511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
📝 json files with trailing commas aren't formatted #1662
Comments
Have you tried to enable the trailing comma option? https://biomejs.dev/reference/configuration/#jsonparserallowtrailingcommas |
If I understand correctly, Biome doesn't have a language setting block for And despite that sameness, I think another thing that @juliusmarminge wants to ask here is that whether Biome will consider supporting formatting invalid syntaxes (like trailing commas) in a standard |
This is already possible nowadays by using {
"overrides": [
{
"include": ["*.jsonc"],
"formatter": {
"formatWithErrors": true
}
}
]
} |
I wasn't aware of the |
Environment information
Configuration
Additional info
Similar to #1659 but
jsonc
files are allowed to have trailing commas so it's still a different issue I think. Maybe this even falls under the category ofnon-goals
, but it's a very nice-to-have feature when editing JSON files.Playground link
https://codesandbox.io/p/devbox/gallant-black-skhrkn?layout=%257B%2522sidebarPanel%2522%253A%2522EXPLORER%2522%252C%2522rootPanelGroup%2522%253A%257B%2522direction%2522%253A%2522horizontal%2522%252C%2522contentType%2522%253A%2522UNKNOWN%2522%252C%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522id%2522%253A%2522ROOT_LAYOUT%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522UNKNOWN%2522%252C%2522direction%2522%253A%2522vertical%2522%252C%2522id%2522%253A%2522clrt0gimx00053b6erpr5mq4g%2522%252C%2522sizes%2522%253A%255B47.880897138437746%252C52.119102861562254%255D%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522EDITOR%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522EDITOR%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522EDITOR%2522%252C%2522id%2522%253A%2522clrt0gimx00023b6eaofkd6ee%2522%257D%255D%257D%252C%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522SHELLS%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522SHELLS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522SHELLS%2522%252C%2522id%2522%253A%2522clrt0gimx00033b6e8e78mfxc%2522%257D%255D%252C%2522sizes%2522%253A%255B100%255D%257D%255D%257D%252C%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522DEVTOOLS%2522%252C%2522direction%2522%253A%2522vertical%2522%252C%2522id%2522%253A%2522DEVTOOLS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522DEVTOOLS%2522%252C%2522id%2522%253A%2522clrt0gimx00043b6ego92wpb3%2522%257D%255D%252C%2522sizes%2522%253A%255B100%255D%257D%255D%252C%2522sizes%2522%253A%255B86.2709277212127%252C13.7290722787873%255D%257D%252C%2522tabbedPanels%2522%253A%257B%2522clrt0gimx00023b6eaofkd6ee%2522%253A%257B%2522id%2522%253A%2522clrt0gimx00023b6eaofkd6ee%2522%252C%2522tabs%2522%253A%255B%257B%2522id%2522%253A%2522clrt0gimw00013b6ewh0j3lid%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522FILE%2522%252C%2522filepath%2522%253A%2522%252F.codesandbox%252FDockerfile%2522%252C%2522state%2522%253A%2522IDLE%2522%257D%255D%252C%2522activeTabId%2522%253A%2522clrt0gimw00013b6ewh0j3lid%2522%257D%252C%2522clrt0gimx00043b6ego92wpb3%2522%253A%257B%2522tabs%2522%253A%255B%255D%252C%2522id%2522%253A%2522clrt0gimx00043b6ego92wpb3%2522%257D%252C%2522clrt0gimx00033b6e8e78mfxc%2522%253A%257B%2522id%2522%253A%2522clrt0gimx00033b6e8e78mfxc%2522%252C%2522activeTabId%2522%253A%2522clrt0hsbh00ac3b6eu7p0eb8y%2522%252C%2522tabs%2522%253A%255B%257B%2522id%2522%253A%2522clrt0hsbh00ac3b6eu7p0eb8y%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522TERMINAL%2522%252C%2522shellId%2522%253A%2522clrt0hsgq001hefipejt2az06%2522%257D%255D%257D%257D%252C%2522showDevtools%2522%253Atrue%252C%2522showShells%2522%253Atrue%252C%2522showSidebar%2522%253Atrue%252C%2522sidebarPanelSize%2522%253A15%257D
Code of Conduct
The text was updated successfully, but these errors were encountered: