Cheatography
https://cheatography.com
A very commonly use cheat sheet
configstabWidth | White spaces number instead of each indent (type: number) | useTabs | Determine indention unit, tab or white space (type: boolean) | semi | Add semi colon at the end of each statement (type: boolean) | singleQuote | Use single quote or double quote (type: boolean) | quoteProps | Add quotation in object (type: string, values: as-needed/consistent/preserve) | trailingComma | Add coma at the end of each statement, if it is possible (type: string, values: none/es5/all) | bracketSpacing | Add a white space between brackets and key-value in object (type: boolean) | arrowParens | Add parentheses around the arrow functions (type: string, values: avoid/always) | requirePragma | Prretier the specified files (type: boolean) | endOfLine | Determine EOF Special character (type: string, values: lf, crlf, cr, auto) |
| | DefenitionWhat is it? | Prettier is an opinionated code formatter. It enforces a consistent style by parsing your code and re-printing it with its own rules that take the maximum line length into account, wrapping code when necessary. |
| | How to use?Step one | npm i -g prettier | step two | ctrl + p , then ext install esbenp.prettier-vscode
| Step three | create .prettierrc file and write your configs | Step four | Ctrl + p , then type Format Document
| Final step | Enable formatOnSave |
|
Created By
Metadata
Comments
No comments yet. Add yours below!
Add a Comment
Related Cheat Sheets