https://github.com/whosydd/prettier-config
Generate .prettierrc.js & .prettierignore in the workspace
https://github.com/whosydd/prettier-config
prettier prettier-config vscode vscode-extension
Last synced: about 1 year ago
JSON representation
Generate .prettierrc.js & .prettierignore in the workspace
- Host: GitHub
- URL: https://github.com/whosydd/prettier-config
- Owner: whosydd
- License: mit
- Created: 2021-06-09T17:11:53.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2025-03-19T08:31:19.000Z (over 1 year ago)
- Last Synced: 2025-04-10T01:07:23.164Z (about 1 year ago)
- Topics: prettier, prettier-config, vscode, vscode-extension
- Language: TypeScript
- Homepage: https://marketplace.visualstudio.com/items?itemName=whosydd.prettier-config
- Size: 121 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# PrettierConfig for VS Code
## Dependencies
- prettier
## Extension Dependencies
- [Prettier - Code formatter](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)
## Usage


## Configuration
### package manager
```json
// settings.json:
"prettier-config.tool": "npm" // support 'npm' 'yarn' 'pnpm' 'manually'
```
> manually: choose package manager tool when install prettier every time.
### Sync from gist
```json
// settings.json:
"prettier-config.gist": {
// Use raw URL
"configRaw": "https://gist.githubusercontent.com/whosydd/3d7554d6818b0f9c9a2ec8e928857211/raw/354d4100aa23e8d9379e07d74ad6e4151f482c22/.prettierrc",
// If you want to generate a .prettierignore file
// "ignoreRaw": ""
},
```
### tip
```json
// settings.json:
"prettier-config.tip": true //default
```

### default
#### .prettierrc
```yaml
printWidth: 100 # 代码宽度建议不超过100字符
tabWidth: 2 # tab缩进2个空格
semi: false # 末尾分号
singleQuote: true # 单引号
jsxSingleQuote: true # jsx中使用单引号
trailingComma: 'es5' # 尾随逗号
arrowParens: 'avoid' # 箭头函数仅在必要时使用()
htmlWhitespaceSensitivity: 'css' # html空格敏感度
```
#### .prettierignore
```
**/*.min.js
**/*.min.css
.idea/
node_modules/
dist/
build/
```
## Thanks