We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Prettier 3.2.4
# Rules: "arrowParens": "avoid", "bracketSameLine": true, "bracketSpacing": true, "singleQuote": true, "trailingComma": "all", "semi": false, "printWidth": 100, "tabWidth": 3, "useTabs": true, "endOfLine": "crlf"
Input:
import React from 'react' import ReactDOM from 'react-dom/client' import App from './App.tsx' import './index.css' ReactDOM.createRoot(document.getElementById('root')!).render( <React.StrictMode> <App /> </React.StrictMode>, )
Output:
Expected output:
Why? Why it decided to add 1 more newline to EOF when I reformat again (ALT+SHIFT+F) in VS Code. I expect at most 1 newline.
Additional Context VS Code v1.85.1 with Prettier + ESLint extensions installed node -v 18.18.2
npm create vite@latest . -- --template react-ts npm install -D tailwindcss postcss autoprefixer npx tailwindcss init -p
le packages: "dependencies": { "react": "^18.2.0", "react-dom": "^18.2.0" }, "devDependencies": { "@types/react": "^18.2.43", "@types/react-dom": "^18.2.17", "@typescript-eslint/eslint-plugin": "^6.14.0", "@typescript-eslint/parser": "^6.14.0", "@vitejs/plugin-react": "^4.2.1", "autoprefixer": "^10.4.17", "eslint": "^8.55.0", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-refresh": "^0.4.5", "postcss": "^8.4.33", "prettier": "3.2.4", "tailwindcss": "^3.4.1", "typescript": "^5.2.2", "vite": "^5.0.8" } ...
The text was updated successfully, but these errors were encountered:
Findings so far:
I guess when it remains LF it is fine but the extra LF added at 2nd reformatting is bit excessive.
Sorry, something went wrong.
No branches or pull requests
Prettier 3.2.4
Input:
Output:
Expected output:
Why?
Why it decided to add 1 more newline to EOF when I reformat again (ALT+SHIFT+F) in VS Code. I expect at most 1 newline.
Additional Context
VS Code v1.85.1 with Prettier + ESLint extensions installed
node -v 18.18.2
npm create vite@latest . -- --template react-ts
npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p
le packages:
"dependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@types/react": "^18.2.43",
"@types/react-dom": "^18.2.17",
"@typescript-eslint/eslint-plugin": "^6.14.0",
"@typescript-eslint/parser": "^6.14.0",
"@vitejs/plugin-react": "^4.2.1",
"autoprefixer": "^10.4.17",
"eslint": "^8.55.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.5",
"postcss": "^8.4.33",
"prettier": "3.2.4",
"tailwindcss": "^3.4.1",
"typescript": "^5.2.2",
"vite": "^5.0.8"
}
...
The text was updated successfully, but these errors were encountered: