1.0.0 • Published 5 years ago

eslint-plugin-no-generic-identifier v1.0.0

Weekly downloads
1
License
ISC
Repository
github
Last release
5 years ago

eslint-plugin-no-generic-identifier

Disallow generic declarations/assignments

Installation

You'll first need to install ESLint:

Yarn

$ yarn add eslint --dev

NPM

$ npm install eslint --save-dev

Next, install eslint-plugin-no-generic-identifier:

Yarn

$ yarn add eslint-plugin-no-generic-identifier --dev

NPM

$ npm install eslint-plugin-no-generic-identifier --save-dev

Note: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-no-generic-identifier globally.

Usage

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

{
    "plugins": [
        "no-generic-identifier"
    ]
}

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

{
    "rules": {
        "no-generic-identifier/presentation": 2
    }
}

Rule Example:

Bad

const Presentation = () => {}

Good

const WhatActuallyThisMethodDoes = () => {}