Skip to content

rkorzhoff/eslint-plugin-ts-ignore-limit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eslint-plugin-no-excessive-ts-ignore

Important Looks like it's not about ESLint. This plugin doesn't work as expected, it only checks number of comments inside single file. You should find another approach to count number of comments, for example use standalone script.

Limit amount of @ts-ignore / @ts-nocheck / @ts-expect-error comments in file

Installation

You'll first need to install ESLint:

npm i eslint --save-dev

Next, install eslint-plugin-no-excessive-ts-ignore:

npm install eslint-plugin-no-excessive-ts-ignore --save-dev

Usage

Add no-excessive-ts-ignore to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
  "plugins": ["no-excessive-ts-ignore"]
}

Then configure the rules you want to use under the rules section.

{
    "rules": {
        "no-excessive-ts-ignore/expect-error": ["error", 5] // 10 is default limit,
        "no-excessive-ts-ignore/ignore": ["error", 5] // 10 is default limit,
        "no-excessive-ts-ignore/nocheck": ["error", 5] // 10 is default limit,
    }
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published