Prettier for Visual Studio Code using prettier-space-parenthesis forkSee https://github.com/Skywalker13/prettier-space-parenthesis Prettier formatter for Visual Studio CodeVS Code package to format your Javascript using Prettier. InstallationInstall through VS Code extensions. Search for Visual Studio Code Market Place: Prettier - JavaScript formatter Can also be installed using
UsageUsing Command Palette (CMD + Shift + P)
Format On SaveRespects Settingsprettier.eslintIntegration (default: false)Use prettier-eslint instead of prettier. Other settings will only be fallbacks in case they could not be inferred from eslint rules. prettier.printWidth (default: 80)Fit code within this line limit prettier.tabWidth (default: 2)Number of spaces it should use per tab prettier.useFlowParser (default: false)Use the flow parser instead of babylon. Deprecated use prettier.singleQuote (default: false)If true, will use single instead of double quotes prettier.trailingComma (default: 'none')Controls the printing of trailing commas wherever possible. Valid options:
prettier.bracketSpacing (default: true)Controls the printing of spaces inside object literals prettier.jsxBracketSameLine (default: false)If true, puts the prettier.parser (default: 'babylon')Which parser to use. Valid options are 'flow' and 'babylon' prettier.semi (default: true)Whether to add a semicolon at the end of every line (semi: true), or only at the beginning of lines that may introduce ASI failures (semi: false) prettier.useTabs (default: false)If true, indent lines with tabs Prettier resolutionThis extension will use prettier from your project's local dependencies. Should prettier not be installed locally with your project's dependencies, a copy will be bundled with the extension. ContributeThis is my first Visual Studio Extension so I probably made some terrible choices. Feel free to open issue or PRs! |