0.0.2 • Published 7 years ago

eslint-plugin-checkbugs v0.0.2

Weekly downloads
54
License
MIT
Repository
-
Last release
7 years ago

eslint-plugin-checkbugs

Checks for common sources of bugs and logic errors

Installation

You'll first need to install ESLint with NPM, Yarn, or your favorite package manager:

$ npm i eslint --save-dev
$ yarn add --dev eslint

Next, install eslint-plugin-checkbugs:

$ npm install eslint-plugin-checkbugs --save-dev
$ yarn add --dev eslint-plugin-checkbugs

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

Usage

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

{
    "plugins": [
        "checkbugs"
    ]
}

Then you may extend from presets and/or configure the individual rules you want to use under the rules section.

{
    "extends": [
        "eslint:recommended",
        "plugin:checkbugs/recommended"
    ]
}
{
    "rules": {
        "checkbugs/rule-name": 2
    }
}

Supported Rules

Rule NameAdded inRecommended
no-backwards-assign-ops0.0.1Warn
no-bad-odd-checks0.0.1Error
no-bool-math0.0.1Error
no-bool-num-compares0.0.1Error
no-comma-in-indexing0.0.1Error
no-double-comparison0.0.1Error
no-emptyexpr-choice-loop0.0.1Error
no-identical-bitwise-sides0.0.1Error
no-identical-comparison-sides0.0.1Error
no-identical-logical-sides0.0.1Error
no-identical-math-sides0.0.1Warn
no-invalid-sharedlogic-part0.0.1Error
no-modulo-one0.0.1Warn
no-modulo-then-multiply0.0.1Warn
no-overwritten-increment0.0.1Error
no-same-assignment0.0.1Error
no-same-if-else-blocks0.0.1Warn
no-same-if-elseif-condition0.0.1Error
no-same-switchcase-blocks0.0.1Warn
no-same-switchcase-condition0.0.1Error
no-similar-compare-expression0.0.1Error
no-triple-negation0.0.1Error
no-ungrouped-bshift-add0.0.1Warn
no-useless-zeros0.0.1Warn

Included rules built-in to ESLint

Rule NameOptionsAdded in
no-compare-neg-zero0.0.1
no-cond-assign0.0.1
no-constant-condition0.0.1
no-control-regex0.0.1
no-dup-args0.0.1
no-dup-keys0.0.1
no-empty0.0.1
no-empty-character-class0.0.1
no-ex-assign0.0.1
no-extra-boolean-cast0.0.1
curly0.0.1
no-func-assign0.0.1
no-inner-declarations0.0.1
no-invalid-regexp0.0.1
no-irregular-whitespace0.0.1
no-obj-calls0.0.1
no-regex-spaces0.0.1
no-sparse-arrays0.0.1
no-unexpected-multiline0.0.1
no-unreachable0.0.1
no-unsafe-finally0.0.1
no-unsafe-negation0.0.1
use-isnan0.0.1
valid-typeof0.0.1
array-callback-return0.0.1
block-scoped-var0.0.1
no-case-declarations0.0.1
no-empty-pattern0.0.1
no-global-assign0.0.1
no-new-wrappers0.0.1
no-octal0.0.1
no-redeclare0.0.1
no-unused-expressions{allowShortCircuit: true}0.0.1
no-unmodified-loop-condition0.0.1
no-unused-labels0.0.1
no-useless-concat0.0.1
no-useless-escape0.0.1
no-delete-var0.0.1
no-shadow-restricted-names0.0.1
no-undef0.0.1
no-unused-vars0.0.1
no-use-before-define{functions: false, classes: false}0.0.1
constructor-super0.0.1
no-class-assign0.0.1
no-confusing-arrow0.0.1
no-const-assign0.0.1
no-dupe-class-members0.0.1
no-duplicate-imports0.0.1
no-new-symbol0.0.1
no-this-before-super0.0.1
no-useless-computed-key0.0.1