1.4.0 • Published 2 months ago

@lcooper/eslint-plugin v1.4.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

@lcooper/eslint-plugin

npm ci license

Awesome extra ESLint rules.

Installation

install with npm:

npm install -D eslint @lcooper/eslint-plugin

install with yarn:

yarn add -D eslint @lcooper/eslint-plugin

Usage

Configuration (legacy .eslintrc):

Add @lcooper/eslint-plugin or just @lcooper to the plugins section of your eslintrc configuration file.

Next, configure the rules you want to use under the rules section, or use the plugin:@lcooper/all bundled config that enables all plugin rules and disables any conflicting base ESLint rules. This can be configured using the extends property in your .eslintrc config file:

{
  "plugins": [
    "@lcooper"
  ],
  "extends": [
    "plugin:@lcooper/all"
  ]
}

Configuration (new eslint.config.js):

If you are using the new flat config system, you can add the bundled all/flat config to the exported config array in your eslint.config.js file:

const plugin = require('@lcooper/eslint-plugin');

module.exports = [
    // ... other configs
    plugin.configs['all/flat'],
];

Rules

:wrench: = Fixable

NameDescription
consecutive-declarationsEnforce a consistent style for consecutive const, let, and var declarations:wrench:
global-requireEnsure require() calls are in the top-level module scope
prefer-templateSuggest using template literals instead of string concatenation:wrench:
top-level-padding-linesRequire or disallow empty lines between top level statements:wrench:

Related

ESLint configs that utilize this plugin:

License

MIT

1.4.0

2 months ago

1.3.0

3 years ago

1.2.0

3 years ago

1.1.0

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago