-
-
Notifications
You must be signed in to change notification settings - Fork 532
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
📝 Formater reports file as to be formatted but formatter does nothing #5087
Comments
@domiSchenk you'll have to provide more information to us. The title is very cryptic and the playground doesn't show any additional information. |
Hello @domiSchenk, please provide a minimal reproduction. You can use one of the following options:
Issues marked with |
@ematipico omg you are fast :-D here a repo that shows the problem: test.ts has a formatter error. interestingly the error does not show up on index.ts. i how this helps find out whats the probelm |
The original file has carriage returns as newlines |
ahh looks like the VS code extension formatter doesn't do it.
in the test repo does the vs code formatter replace the CR with the LF? |
The test repo doesn't contain any VSCode settings, which means that the editor will use the user settings. Those settings differ from machine to machine, from user to user. The result I will get from my machine will be different from yours. I am closing the issue as it's not a Biome issue, and it's probably a VSCode settings issue. |
so the biomejs.biome formattor does not use boime.json file to format the files?
|
I have a similar issue so easy to reproduce. I just have a test.json with the content {"A": 'a'} it formats correctly the spaces but not the double quoites, it just reports as an error. Doing Format Document (Forced) does work like prettier/eslint, but
Throws an error but does not format it. I added {formatter.formatWithErrors: true} and still not working. Same when the keys are stated without the quotes, i would expect automatic correction but the formatter does nothing unless using the forced option |
@lveillard why would you expect correct formatting? Single quotes in JSON files aren't valid by spec. |
Environment information
Configuration
Playground link
https://biomejs.dev/playground/?lineWidth=140&indentStyle=space"eStyle=single&indentWidth=4&code=LwAvACAAIgBUAGgAaQBzACAAaQBzACAAYQAgAFQAZQBzAHQAIABUAGkAdABsAGUAIQAgAEkAdAAnAHMAIABxAHUAaQB0AGUAIABpAG4AdABlAHIAZQBzAHQAaQBuAGcALgAiAAoALwAvACAATwB1AHQAcAB1AHQAOgAgACIAdABoAGkAcwAtAGkAcwAtAGEALQB0AGUAcwB0AC0AdABpAHQAbABlAC0AaQB0AHMALQBxAHUAaQB0AGUALQBpAG4AdABlAHIAZQBzAHQAaQBuA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wB0ACAAbQB1AGwAdABpAHAAbABlAFMAZQBwAGEAcgBhAHQAbwByAFIAZQBnAGUAeAAgAD0AIABuAGUAdwAgAFIAZQBnAEUAeABwACgAYAAkAHsAcwBlAHAAYQByAGEAdABvAHIAfQArAGAALAAgACcAZwAnACkAOwAKACAAIAAgACAAcwBsAHUAZwAgAD0AIABzAGwAdQBnAC4AcgBlAHAAbABhAGMAZQAoAG0AdQBsAHQAaQBwAGwAZQBTAGUAcABhAHIAYQB0AG8AcgBSAGUAZwBlAHgALAAgAHMAZQBwAGEAcgBhAHQAbwByACkAOwAKAAoAIAAgACAAIAAvAC8AIABUAHIAaQBtACAAbABlAGEAZABpAG4AZwAgAGEAbgBkACAAdAByAGEAaQBsAGkAbgBnACAAcwBlAHAAYQByAGEAdABvAHIAcwAKACAAIAAgACAAYwBvAG4AcwB0ACAAdAByAGkAbQBTAGUAcABhAHIAYQB0AG8AcgBSAGUAZwBlAHgAIAA9ACAAbgBlAHcAIABSAGUAZwBFAHgAcAAoAGAAXgAkAHsAcwBlAHAAYQByAGEAdABvAHIAfQArAHwAJAB7AHMAZQBwAGEAcgBhAHQAbwByAH0AKwAkAGAALAAgACcAZwAnACkAOwAKACAAIAAgACAAcwBsAHUAZwAgAD0AIABzAGwAdQBnAC4AcgBlAHAAbABhAGMAZQAoAHQAcgBpAG0AUwBlAHAAYQByAGEAdABvAHIAUgBlAGcAZQB4ACwAIAAnACcAKQA7AAoACgAgACAAIAAgAHIAZQB0AHUAcgBuACAAcwBsAHUAZwA7AAoAfQAKAA%3D%3D
Code of Conduct
The text was updated successfully, but these errors were encountered: