1.0.0 • Published 6 years ago

eslint-plugin-caps-on v1.0.0

Weekly downloads
1
License
ISC
Repository
github
Last release
6 years ago

Installation

$ npm i eslint eslint-plugin-caps-on --save-dev

Usage

Add caps-on to the .eslintrc configuration file.

{
    'plugins': [
        'caps-on'
    ],
    'rules': {
        'caps-on/uppercase': 'error'
    }
}

Rule Details

Examples of correct code for this rule with global declaration:

const FOO = 'bar';
const FOO = 42;
const FOO = { BAR: 42, BAZ: 'qux' };

Examples of incorrect code for this rule:

const foo = ['bar', 42];
const foo = { bar: 42, baz: 'qux' };
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 };
const foo = [bar, baz, 42];