eslint-plugin-caps-on
v1.0.0
Published
Make sure all consts and keys are uppercase
Downloads
3
Readme
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];