Skip to content

ESLint plugin to keep your JavaScript classes high cohesive by using LCOM (Lack of Cohesion of Methods) metric.

License

Notifications You must be signed in to change notification settings

FujiHaruka/eslint-plugin-lcom

Repository files navigation

eslint-plugin-lcom

build status npm version

ESLint plugin to keep your JavaScript classes high cohesive by using LCOM (Lack of Cohesion of Methods) metric.

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-lcom:

$ npm install eslint-plugin-lcom --save-dev

Usage

Add lcom to the plugins section of your .eslintrc configuration file. Then configure the rules you want to use under the rules section.

{
    "plugins": [
        "lcom"
    ],
    "rules": {
        "lcom/lcom4": "warn"
    }
}

Supported Rules

We currently support the only one rule of lcom4. It ensures a value of so called LCOM4 to be less than 2 in a class.

About

ESLint plugin to keep your JavaScript classes high cohesive by using LCOM (Lack of Cohesion of Methods) metric.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published