Mensae / jm-eslint-plugin-no-optional-call

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

@jm/eslint-plugin-no-optional-call

An ESLint plugin to disable the use of the optional-call operator.

Original version: eslint-plugin-no-optional-call by Kyle Simpson and released under the MIT License. This fixes a TypeError with the latest version of ESLint and is formatted according the latest ESLint specs.

Installation

You'll first need to install ESLint:

npm install eslint --save-dev

Next, install eslint-plugin-no-optional-call:

npm install eslint-plugin-no-optional-call --save-dev

Usage

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

{
  "plugins": ["@jm/no-optional-call"]
}

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

{
  "rules": {
    "@jm/no-optional-call/no-optional-call": "error"
  }
}

Rules

Name Description
no-optional-call Disallow the use of the optional-call operator

About

License:MIT License


Languages

Language:JavaScript 100.0%