Skip to content
| Marketplace
Sign in
Visual Studio Code>Formatters>Prettier ESLint TypeScript FormatterNew to Visual Studio Code? Get it now.
Prettier ESLint TypeScript Formatter

Prettier ESLint TypeScript Formatter

Harrison Smith

|
71,521 installs
| (3) | Free
Formats TypeScript code through Prettier, then through ESLint.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Description

This formatter runs your TypeScript (or JavaScript) code through Prettier, then through ESLint. Settings for both formatters can be updated in settings.json (global) or .vscode/settings.json (per-workspace).

Settings

prettier-eslint-typescript.eslintConfig (object)

The options to use with ESLint.

prettier-eslint-typescript.prettierOptions (object)

The options to use with Prettier.

Example

.vscode/settings.json

{
   "typescript.tsdk": "node_modules/typescript/lib",
   "prettier-eslint-typescript.eslintConfig": {
      "rules": {
         "curly": "error",
         "dot-notation": "error",
         "no-undef-init": "error",
         "no-useless-rename": "error",
         "no-useless-return": "error",
         "no-var": "error",
         "object-shorthand": "error",
         "one-var": [ "error", { "initialized": "never", "uninitialized": "always" } ],
         "prefer-const": "error",
         "prefer-template": "error",
         "array-bracket-spacing": [ "error", "always" ],
         "generator-star-spacing": [ "error", "both" ],
         "space-before-function-paren": [ "error", "always" ],
         "yield-star-spacing": [ "error", "both" ]
      }
   },
   "prettier-eslint-typescript.prettierOptions": {
      "arrowParens": "avoid",
      "bracketSpacing": true,
      "printWidth": 120,
      "quoteProps": "as-needed",
      "singleQuote": true,
      "tabWidth": 3,
      "trailingComma": "none",
      "useTabs": false
   }
}
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft