@inficen/eslint-plugin-prefer-types

1.0.4 • Public • Published

@inficen/eslint-plugin-prefer-types · npm version

Installation

You'll first need to install ESLint:

npm i eslint --save-dev

Next, install @inficen/eslint-plugin-prefer-types:

npm install @inficen/eslint-plugin-prefer-types --save-dev

Usage

Add @inficen/prefer-types to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
  "plugins": ["@inficen/prefer-types"]
}

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

{
  "rules": {
    "@inficen/prefer-types/prefer-types": "warn"
  }
}

If you haven't already, you will need to setup ESLint to work with typescript using typescript-eslint.

npm install --save-dev @typescript-eslint/parser

A minimal configuration would look as follows

{
  "parser": "@typescript-eslint/parser",
  "plugins": ["@typescript-eslint", "@inficen/prefer-types"],
  "rules": {
    "@inficen/prefer-types/prefer-types": "warn"
  }
}

Supported Rules

Package Sidebar

Install

npm i @inficen/eslint-plugin-prefer-types

Weekly Downloads

0

Version

1.0.4

License

MIT

Unpacked Size

6.58 kB

Total Files

7

Last publish

Collaborators

  • justindng
  • inficen-team
  • lioneltay