12 Best VS Code Extensions for Linting, Formatting, and Code Quality

Twelve VS Code extensions that catch bugs, enforce style, and keep your code clean. Covers ESLint, Prettier, SonarLint, markdownlint, and more.

8 min read

These 12 extensions keep your code clean, consistent, and free of common bugs. They cover formatting, linting, spell checking, security analysis, and documentation standards. Every extension listed has a verified or well-known publisher as of mid-2026.

If you are new to extensions, start with the guide on how to install, disable, and update extensions.

Formatting

1. Prettier - Code formatter

Publisher: esbenp.prettier-vscode
Why: Prettier formats your code automatically so every file in your project looks consistent. It supports JavaScript, TypeScript, HTML, CSS, JSON, Markdown, YAML, and more. Enable Format on Save and never think about indentation or line breaks again.

2. EditorConfig for VS Code

Publisher: EditorConfig.EditorConfig
Why: EditorConfig overrides your personal VS Code settings with project-wide rules defined in a .editorconfig file. This means every contributor uses the same indentation style, charset, and line endings. The .editorconfig file lives in your repository so it travels with the code.

Unlike Prettier, EditorConfig is not a formatter. It tells VS Code what rules to apply. Prettier reads the same .editorconfig values for indentation, so the two tools complement each other.

Linting

3. ESLint

Publisher: dbaeumer.vscode-eslint
Why: ESLint catches bugs and enforces coding standards in JavaScript and TypeScript. It highlights problems directly in the editor and surfaces them in the Problems panel. Use it with Prettier for the standard setup: ESLint for code quality, Prettier for formatting.

4. Stylelint

Publisher: stylelint.vscode-stylelint
Why: Stylelint is to CSS what ESLint is to JavaScript. It catches invalid property values, duplicate selectors, and style convention violations. Supports plain CSS, SCSS, Sass, Less, and CSS-in-JS. Essential when your stylesheets grow beyond a few hundred lines.

5. markdownlint

Publisher: DavidAnson.vscode-markdownlint
Why: Enforces consistent Markdown formatting. It catches inconsistent heading styles, missing blank lines around lists, trailing whitespace, and bare URLs. If your project has README files, documentation, or an API spec written in Markdown, this extension ensures they stay clean.

6. SonarQube for IDE (formerly SonarLint)

Publisher: SonarSource.sonarlint-vscode
Why: Scans your code for bugs, security vulnerabilities, and code smells as you type. It covers more languages than ESLint and catches deeper issues like SQL injection risks, hardcoded credentials, and logic errors. The extension was renamed from SonarLint to SonarQube for IDE; the Marketplace identifier did not change.

Free for individual use. Pairs with SonarQube or SonarCloud for team-wide analysis.

7. ShellCheck

Publisher: timonwong.shellcheck
Why: Lints shell scripts for common mistakes. It catches unquoted variable expansions, unsafe command usage, and Bash-specific pitfalls.

If you write .sh files, this extension is essential. Requires ShellCheck to be installed on your system.

Code quality and analysis

8. Code Spell Checker

Publisher: streetsidesoftware.code-spell-checker
Why: A spell checker that understands code. It catches typos in variable names, function names, comments, and documentation strings.

Supports camelCase and snake_case words. You can add project-specific terms to a custom dictionary.

9. Better Comments

Publisher: aaron-bond.better-comments
Why: Color-codes comments based on prefixes. TODO: turns orange, FIXME: red, NOTE: blue, and HACK: yellow. You can define your own tags. Makes important comments visible instead of blending into gray text.

10. Error Lens

Publisher: usernamehw.errorlens
Why: Shows error and warning messages inline, right next to the problematic code. You see what is wrong without hovering or opening the Problems panel. Works with every linter. The message appears at the end of the line where the error occurs.

11. Todo Tree

Publisher: Gruntfuggly.todo-tree
Why: Scans your workspace for comment tags like TODO, FIXME, BUG, and HACK and displays them in a tree view. Click any item to jump to that line. Stops you from losing track of unfinished work across a large codebase. You can customize which tags it searches for.

12. Trunk Code Quality

Publisher: trunk.io
Why: Runs 100+ linters, formatters, and security tools through a single tool. Trunk auto-detects which tools your project needs and runs them on changed files. It caches results so repeated checks are fast.

Free for individuals and open source projects, with a free tier for small teams on private repos. Good if you want a managed solution instead of configuring each linter individually.

Quick selection guide

If you work with...Start with
JavaScript / TypeScriptESLint, Prettier, Error Lens
CSS / SCSSStylelint, Prettier
Shell scriptsShellCheck, Code Spell Checker
Documentation-heavy projectsmarkdownlint, Code Spell Checker, Better Comments
Security-critical codeSonarLint, ESLint
Team projectsEditorConfig, Prettier, ESLint

Each extension is free and can be installed from the Extensions view (Ctrl+Shift+X / Cmd+Shift+X). ShellCheck requires the shellcheck binary installed separately on your system.

Rune AI

Rune AI

Key Insights

  • Prettier (esbenp.prettier-vscode) and ESLint (dbaeumer.vscode-eslint) are the foundation. Install both on every project.
  • EditorConfig (EditorConfig.EditorConfig) overrides personal editor settings with project-wide rules stored in .editorconfig.
  • SonarQube for IDE, formerly SonarLint (SonarSource.sonarlint-vscode), finds bugs and security issues beyond what ESLint catches.
  • markdownlint (DavidAnson.vscode-markdownlint) and Code Spell Checker (streetsidesoftware.code-spell-checker) keep documentation and comments clean.
  • Stylelint (stylelint.vscode-stylelint) does for CSS what ESLint does for JavaScript.
RunePowered by Rune AI

Frequently Asked Questions

What is the difference between a linter and a formatter?

A linter analyzes your code for bugs, style violations, and potential problems. A formatter changes the appearance of your code (indentation, quotes, line breaks) without changing behavior. ESLint is primarily a linter. Prettier is purely a formatter. Use both together: ESLint for catching errors, Prettier for consistent formatting.

Can I use Prettier and ESLint together without conflicts?

Yes. Install both extensions and add eslint-config-prettier to your project. This disables ESLint rules that conflict with Prettier. Set Prettier as your default formatter and enable Format on Save. ESLint handles code quality rules. Prettier handles formatting.

Will these extensions slow down VS Code on large projects?

Some linters like ESLint and SonarLint can increase CPU usage on very large codebases. You can limit which files they analyze by configuring ignore patterns in your project. Most formatters like Prettier are fast and have negligible performance impact.

Conclusion

These 12 extensions cover every layer of code quality: formatting, linting, spell checking, security scanning, and documentation standards. Start with Prettier and ESLint for every project. Add EditorConfig for team consistency. Layer on SonarLint for deeper analysis and markdownlint for documentation quality. For general developer productivity, see the list of 15 productivity extensions.