VSCode Format on Save Help

New to TS and create-t3. Just started a t3-app and my .tsx files aren't auto formatting on save. Any idea if I need to modify anything in VSCode, as I have only worked with JS before this endeavor? The atuo-formatting works with the exact same file if it's a .js file btw
11 Replies
Neto
Neto3y ago
settings "editor.formatOnSave": true,
Dale
DaleOP3y ago
This is how the settings are set up currently
Dale
DaleOP3y ago
Am I mistaken or do I already have that setting turned on to true?
needmorewood
needmorewood3y ago
U need to setup eslint formatting in your vscode settings, Assuming that's the formatter you are trying to use
Dale
DaleOP3y ago
I have been using prettier, i think but how would i set up eslint?
needmorewood
needmorewood3y ago
Download the vscode extension
Dale
DaleOP3y ago
I have it already installed
needmorewood
needmorewood3y ago
And configure in the formatter settings to use the eslint stuff Formatting by filetypes I'm on phone rn so I don't have access to my settings IIRC ct3a does come with eslint config in the project So don't worry about that
Dale
DaleOP3y ago
Ahh okay I had to comment out the prettier settings in vscode and that worked for some reason.
// "[javascript]": {
// "editor.defaultFormatter": "esbenp.prettier-vscode"
// },
// "[javascript]": {
// "editor.defaultFormatter": "esbenp.prettier-vscode"
// },
needmorewood
needmorewood3y ago
Yea that will get prettier to run on every type of file Probably should scope it
Want results from more Discord servers?
Add your server