0.2.0 • Published 1 year ago

@rankone/eslint-plugin v0.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

eslint-plugin-rankone

RankOne ESLint plugin

Installation

You'll first need to install ESLint:

npm i -D eslint

Next, install @rankone/eslint-plugin:

npm i -D @rankone/eslint-plugin

Usage

Add @rankone/eslint-plugin to the extends section of your .eslintrc configuration file.

{
  "extends": [
    "plugin:@rankone/eslint-plugin/recommended"
  ]
}

Supported Rules

@rankone/function-argument-to-array-map

Enforce function argument to Array.map() instead of anonymous function that passes through arguments.

Development

Can be tested locally by importing from the local file system.

First, build the plugin with npm run build.

Then go to the project where you wish to try it and run npm i -D ../eslint-plugin (relative path may differ)

This should add someting like this to package.json:

{
  "devDependencies": {
    "@rankone/eslint-plugin": "file:../eslint-plugin",
  }
}

Add to .eslintrc:

{
  "extends": [
    "plugin:@rankone/eslint-plugin/recommended"
  ]
}