Why is Prettier throwing an error in my PR about tsconfig.json? [closed]

3 weeks ago 31
ARTICLE AD BOX

I'm trying to deploy a React application and I have a prettier check in my PR that's failing on my tsconfig file.

The weird part is that when I run the exact same command locally in VSCode, I see no warnings or issues whatsoever, and when I run it in debug mode in the PR itself it just says that it checked that file and there's a warning but no information on what that warning is about.

I even added a .prettierignore file with just the tsconfig in it, but it's still picking it up and showing a warning. I'm at my wit's end here after upgrading prettier to 3.7.4 from 3.2.4.

This started after I finished upgrading my eslint to the latest version which was its own trial. Is it possible that they are conflicting? Is there some way to get my prettier to ignore my tsconfig file? Or just not throw up a nameless warning?

My .prettierrc file:

{ "semi": true, "tabWidth": 2, "printWidth": 100, "singleQuote": true, "trailingComma": "none" }

My tsconfig.json:

{ "compilerOptions": { "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, "skipLibCheck": true, "strict": true, "noEmit": true, "esModuleInterop": true, "module": "esnext", "moduleResolution": "bundler", "resolveJsonModule": true, "isolatedModules": true, "jsx": "preserve", "incremental": true, "plugins": [ { "name": "next" } ], "paths": { "@/*": ["./src/*"] } }, "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], "exclude": ["node_modules", "**/*.test.*"] }

My guess is that there are double quotes in this json file - but then why am I not seeing that error locally? Something isn't adding up here. And since this file panics when I get rid of the double quotes, how can I tell prettier to chill out so I can deploy my code?

Read Entire Article