TypeScript Analyzer (ESLint, Prettier)

A linter and formatter for JavaScript and TypeScript in Visual Studio

Overview

Basic Operation

This extension will lint and format JavaScript and TypeScript files in Visual Studio.

It uses recommended rules for ESLint for linting and Prettier for formatting.

For formatting, and where fixers are available for linting, it allows the code to be automatically fixed via context menu options.

The TypeScript Analyzer should also work with almost any ESLint plugin, showing errors in the Visual Studio Error List and allowing fixing.

It’s available for Visual Studio 2022, Visual Studio 2019 and Visual Studio 2017, all editions.

Basic Fix

Feature List

The TypeScript Analyzer has the features below. A walk through showing these features being used, with pictures, is available.

Note that in the latest versions of Visual Studio 2022 linting errors from the TypeScript Analyzer are not appearing in Node/JavaScript/TypeScript Console Applications. We have an explanation, and a workaround for this available.

Documentation

There is an abbreviated set of navigation links in the footer of this and every documentation page. A full table of contents for the documentation is also available.

Source Code

The code for this extension is available on GitHub.