Eslint and Prettier. I actually don't know where else to ask this, I'm going insane.

I actually don't understand what's going on with my eslint/prettier config. My coworker is using the same files I pushed, but he gets errors where I don't, I get errors where he doesn't. On top of that, my prettier won't prettify .ts files for whatever reason, but his will. I did add *.ts in the configs
10 Replies
deforestor
deforestor3y ago
eslintrc.json:
{
"globals": {
"React": true
},
"extends": ["next/core-web-vitals", "eslint:recommended", "prettier"],
"rules": {
"prefer-const": "error",
"eol-last": "warn",
"no-unused-vars": "off"
},
"plugins": ["react"]
}
{
"globals": {
"React": true
},
"extends": ["next/core-web-vitals", "eslint:recommended", "prettier"],
"rules": {
"prefer-const": "error",
"eol-last": "warn",
"no-unused-vars": "off"
},
"plugins": ["react"]
}
.prettierrc:
{
"semi": true,
"trailingComma": "es5",
"singleQuote": true,
"tabWidth": 4,
"useTabs": true,
"printWidth": 100,
"jsxSingleQuote": true,
"jsxBracketSameLine": true,
"bracketSpacing": true,
"arrowParens": "avoid"
}
{
"semi": true,
"trailingComma": "es5",
"singleQuote": true,
"tabWidth": 4,
"useTabs": true,
"printWidth": 100,
"jsxSingleQuote": true,
"jsxBracketSameLine": true,
"bracketSpacing": true,
"arrowParens": "avoid"
}
deforestor
deforestor3y ago
deforestor
deforestor3y ago
Is there anything conflicting? I'm literally lost.
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
deforestor
deforestor3y ago
I have the extension and is is running on save. It doesn't seem to be running on .ts files, but it's formatting my tsx without problem Should I not have the extension?
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
deforestor
deforestor3y ago
Ah.. I found the guilty for the formatting
deforestor
deforestor3y ago
deforestor
deforestor3y ago
Thank you, I was really confused about this Live share should have not set that at all, but ok
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server