This package has been deprecated

Author message:

Unmaintained

eslint-plugin-no-constant-expressions

1.0.0 • Public • Published

Disallow use of constant expressions (no-constant-expressions)

This is a working proof of concept. The code is crazy stream of consciousness.

Dynamically calculating a constant is likely to be an error.

var success = a === a;

This pattern is most likely an error.

Rule Details

The rule is aimed at preventing the use of a constant expression.

Examples

The following patterns are considered okay and do not cause warnings:

=== 3;
=== true && b === a;
2 < a && a < 2.1;

The following patterns are considered warnings:

* 0 + 5;
> 1 && a < 1;
!== a;

/eslint-plugin-no-constant-expressions/

    Package Sidebar

    Install

    npm i eslint-plugin-no-constant-expressions

    Weekly Downloads

    2

    Version

    1.0.0

    License

    ISC

    Last publish

    Collaborators

    • denis-sokolov