eslint-plugin-const-case

1.2.2 • Public • Published

Dependencies LCommit

Downloads NPM

Size install size

Installation

$ npm i eslint eslint-plugin-const-case --save-dev

Usage

Add const-case to the .eslintrc configuration file.

{
    'plugins': [
        'const-case'
    ],
    'rules': {
        'const-case/uppercase': 'error'
    }
}

Rule Details

Examples of correct code for this rule:

 
const FOO = 'bar';
const FOO = 42;
const FOO = -42;
 
const foo = ['bar', 42];
const foo = {bar: 42, baz: 'qux'};
const foo = 1000 * 60 * 10;
const foo = `42 ${bar}`;
const foo = bar();
const foo = bar ? baz : 42;
const foo = bar.baz();
const foo = bar => baz;
const foo = {bar: baz};
const foo = [bar, baz, 42];

/eslint-plugin-const-case/

    Package Sidebar

    Install

    npm i eslint-plugin-const-case

    Weekly Downloads

    2,276

    Version

    1.2.2

    License

    Unlicense

    Unpacked Size

    6.34 kB

    Total Files

    7

    Last publish

    Collaborators

    • k03mad