eslint-plugin-const-case

Check for const case


Keywords
eslint, eslint-plugin, eslintplugin
License
Unlicense
Install
npm install eslint-plugin-const-case@1.1.3

Documentation

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];