Skip to content
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

Parsing .json files and failing. #309

Open
91ranjan opened this issue Aug 13, 2024 · 0 comments
Open

Parsing .json files and failing. #309

91ranjan opened this issue Aug 13, 2024 · 0 comments

Comments

@91ranjan
Copy link

91ranjan commented Aug 13, 2024

Environment

  • Prettier version: 2.3.2
  • node version [18.0.0]:
  • package manager: yarn@2
  • IDE: [VScode, CLI]

Describe the bug

The plugin is picking up all the files prettier is targeting. Other than code files prettier reads json files as well for parsing. It fails for json file with the error

[error] some.json: SyntaxError: Missing semicolon. (2:14) [error] 1 | { [error] 2 | "a": [ [error] 3 | "b" [error] 4 | ] [error] 5 | } [error] 6 |

To Reproduce

Add this plugin to prettier which formats json files.

Expected behaviour

There should be config to exclude the files by regex fro this pugin.

Configuration File (cat .prettierrc, prettier.config.js, .prettier.js)
`
importOrder:=

  • "(.*).css"
  • "^[./]"
    importOrderSeparation: true
    importOrderSortSpecifiers: true
    `
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant