eslint-plugin-require-ts-check v0.0.2
eslint-plugin-require-ts-check
Require @ts-check to be added in your javascript files
Table of contents
Installation
You'll first need to install ESLint:
npm i eslint --save-dev
Next, install eslint-plugin-require-ts-check
:
npm install eslint-plugin-require-ts-check --save-dev
Usage
Add eslint-plugin-require-ts-check
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": ["require-ts-check"]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"require-ts-check/require-ts-check": "error"
}
}
Supported options
This rule supports a combination of any of the following options:
include
Specify the files that should be tested using this rule. This parameter uses the Glob filename matching pattern.
Defaults to all javascript files: [ "**/*.js" ]
include
Usage
"rules": {
"require-ts-check/require-ts-check": ["error", { "include": ["**/my-files/*.*"] }]
}
exclude
Specify the files that this rule should ignore. This parameter uses the Glob filename matching pattern.
Defaults to the node_modules
folder: [ "node_modules" ]
exclude
Usage
"rules": {
"require-ts-check/require-ts-check": ["error", { "exclude": ["**/ignored-files/*.*"] }]
}
Contributing
Install VSCode recommended extensions. This is needed for formatting.
In Mac: Cmd + Shift + P:
Others: Ctrl + Shift + P:
Find the "Extensions: Show recommended extensions" option and install them.
Always remember to format the code when saving if your editor does not do it automatically.
Fork the repo
- Create a new branch based off of
develop
- Add your changes
Create a new changelog entry by running
npm run changelog
and fill in the dataThis will create an
.md
file with a random name in the.changeset
folder. This file should contain the changes that were added as part of your contribution. It will later be automatically added to the mainCHANGELOG.md
file when a new release is created.Run tests:
npm test
- Check the code formatting:
npm prettier
- Run the linter:
npm lint
- Push your changes and create a PR in the original repository for your new branch pointing to
develop
.