-
-
Notifications
You must be signed in to change notification settings - Fork 83
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
formatting differently than VSCode format on save #121
Comments
I ran into a similar issue. I think the problem is with the VS Code Prettier extension resolving your prettier config file. Prettier uses cosmic config which allows you to define your prettier config in lots of ways. However prettier-vscode is only looking for |
Well it looks like it should support more config formats https://github.com/prettier/prettier-vscode/blob/3c80018d69fa129fed638f624404e728870e4a90/src/PrettierEditService.ts#L32 but I had issues when it was defined as a |
This might be the same thing as #95 |
Not sure to understand what's the issue. A minimal but runnable online reproduction is required. |
Hi ! {
"name": "xxx",
"version": "0.3.20-0",
"private": true,
"scripts": {
"serve": "vite",
"build": "vite build",
"preview": "vite preview",
"prepare": "husky",
"lint": "prettier --check .",
"fix": "prettier --write ."
},
"dependencies": {
"@oruga-ui/oruga-next": "~0.7.0",
"keycloak-js": "~25.0.4",
"vue": "~3.5.8",
"vue-router": "~4.4.5",
},
"devDependencies": {
"@tsconfig/node18": "^18.2.4",
"@types/node": "^18.18.5",
"@vitejs/plugin-vue": "^4.6.2",
"@vue/tsconfig": "~0.5.1",
"autoprefixer": "^10.4.20",
"husky": "^9.1.6",
"postcss": "^8.4.47",
"postcss-grid-kiss": "^3.1.0",
"postcss-loader": "^8.1.1",
"postcss-nested": "^6.2.0",
"postcss-nesting": "^13.0.0",
"postcss-simple-vars": "^7.0.1",
"prettier": "^3.3.3",
"pretty-quick": "^4.0.0",
"tslint-config-prettier": "^1.18.0",
"typescript": "~5.2.0",
"vite": "^4.5.5",
"vite-plugin-webpackchunkname": "^0.2.4",
"vue-tsc": "^2.1.6",
"webpack": "^5.95.0"
}
} |
On some files, I lint, format and save in VSCode, but then on push, husky runs pretty-quick and formats some files differently that make it fail the eslint check on push that comes after it when it checks the prettier rules.
The text was updated successfully, but these errors were encountered: