Gathering detailed insights and metrics for typescript-eslint-parser
Gathering detailed insights and metrics for typescript-eslint-parser
Gathering detailed insights and metrics for typescript-eslint-parser
Gathering detailed insights and metrics for typescript-eslint-parser
@typescript-eslint/parser
An ESLint custom parser which leverages TypeScript ESTree
@typescript-eslint/typescript-estree
A parser that converts TypeScript source code into an ESTree compatible form
typescript-eslint
Tooling which enables you to use TypeScript with ESLint
typescript-eslint-parser-for-extra-files
An experimental ESLint custom parser for Vue, Svelte, and Astro for use with TypeScript. It provides type information in combination with each framework's ESLint custom parser.
An ESLint custom parser which leverages TypeScript ESTree to allow for ESLint to lint TypeScript source code.
npm install typescript-eslint-parser
Typescript
Module System
Min. Node Version
Node Version
NPM Version
92.6
Supply Chain
93.4
Quality
77.4
Maintenance
50
Vulnerability
98.2
License
JavaScript (89.67%)
Dockerfile (5.45%)
HTML (3.39%)
TypeScript (1.49%)
Total Downloads
65,382,699
Last Day
4,107
Last Week
66,501
Last Month
286,569
Last Year
4,359,858
NOASSERTION License
913 Stars
334 Commits
74 Forks
37 Watchers
3 Branches
40 Contributors
Updated on Apr 18, 2025
Minified
Minified + Gzipped
Latest Version
22.0.0
Package Id
typescript-eslint-parser@22.0.0
Size
16.63 kB
NPM Version
6.4.1
Node Version
10.14.0
Published on
Jan 18, 2019
Cumulative downloads
Total Downloads
3
2
Important: This repository is no longer maintained and typescript-eslint-parser
will not receive any future updates. There is an actively maintained fork of this project available at https://typescript-eslint.io and published on npm as @typescript-eslint/parser
.
1- typescript-eslint-parser 2+ @typescript-eslint/parser
An ESLint custom parser which leverages TypeScript ESTree to allow for ESLint to lint TypeScript source code.
1npm install --save-dev typescript-eslint-parser
In your ESLint configuration file, set the parser
property:
1{ 2 "parser": "typescript-eslint-parser" 3}
There is sometimes an incorrect assumption that the parser itself is what does everything necessary to facilitate the use of ESLint with TypeScript. In actuality, it is the combination of the parser and one or more plugins which allow you to maximize your usage of ESLint with TypeScript.
For example, once this parser successfully produces an AST for the TypeScript source code, it might well contain some information which simply does not exist in a standard JavaScript context, such as the data for a TypeScript-specific construct, like an interface
.
The core rules built into ESLint, such as indent
have no knowledge of such constructs, so it is impossible to expect them to work out of the box with them.
Instead, you also need to make use of one more plugins which will add or extend rules with TypeScript-specific features.
By far the most common case will be installing the eslint-plugin-typescript plugin, but there are also other relevant options available such a eslint-plugin-tslint.
The following additional configuration options are available by specifying them in parserOptions
in your ESLint configuration file.
jsx
- default false
. Enable parsing JSX when true
. More details can be found here.
false
on *.ts
files regardless of this option.true
on *.tsx
files regardless of this option.useJSXTextNode
- default true
. Please set false
if you use this parser on ESLint v4. If this is false
, the parser creates the AST of JSX texts as the legacy style.
1{ 2 "parser": "typescript-eslint-parser", 3 "parserOptions": { 4 "jsx": true, 5 "useJSXTextNode": true 6 } 7}
We will always endeavor to support the latest stable version of TypeScript.
The version of TypeScript currently supported by this parser is ~3.2.1
. This is reflected in the devDependency
requirement within the package.json file, and it is what the tests will be run against. We have an open peerDependency
requirement in order to allow for experimentation on newer/beta versions of TypeScript.
If you use a non-supported version of TypeScript, the parser will log a warning to the console.
Please ensure that you are using a supported version before submitting any issues/bug reports.
We have a very flexible way of running integration tests which connects all of the moving parts of the usage of this parser in the ESLint ecosystem.
We run each test within its own docker container, and so each one has complete autonomy over what dependencies/plugins are installed and what versions are used. This also has the benefit of not bloating the package.json
and node_modules
of the parser project itself.
If you are going to submit an issue related to the usage of this parser with ESLint, please consider creating a failing integration test which clearly demonstrates the behavior. It's honestly super quick!
You just need to duplicate one of the existing test sub-directories found in tests/integration/
, tweak the dependencies and ESLint config to match what you need, and add a new entry to the docker-compose.yml file which matches the format of the existing ones.
Then run:
1npm run integration-tests
If you ever need to change what gets installed when the docker images are built by docker-compose, you will first need to kill the existing containers by running:
1npm run kill-integration-test-containers
npm test
- run all linting and testsnpm run lint
- run all lintingnpm run integration-tests
- run only integration testsTypeScript ESLint Parser is licensed under a permissive BSD 2-clause license.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
security policy file detected
Details
Reason
license file detected
Details
Reason
Found 22/30 approved changesets -- score normalized to 7
Reason
project is archived
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-06-30
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreLast Day
36.2%
4,107
Compared to previous day
Last Week
1.4%
66,501
Compared to previous week
Last Month
-10.4%
286,569
Compared to previous month
Last Year
-18.9%
4,359,858
Compared to previous year