@beanbag/eslint-plugin v2.0.1
Beanbag ESLint Plugin
We write a lot of JavaScript at Beanbag, and need to keep our repositories in tip-top shape. This includes sticking to consistent standards and catching problems before they go up for review.
To help with this, we've created beanbag-eslint-plugin, our set of standard
ESLint rules for ES5, ES6, and TypeScript codebases.
Installation
To install this plugin:
npm install --save-dev @beanbag/eslint-pluginUsage
There are several configurations and environments provided by the plugin, but
we recommend starting with the @beanbag/recommended configuration. This can
be enabled in your .eslintrc file:
{
"plugins": ["@beanbag"],
"extends": [
"plugin:@beanbag/recommended"
]
}Configurations
@beanbag/recommended
This ruleset automatically enables the following additional configurations:
@beanbag/es5: ES5 rules for*.jsfiles@beanbag/es6: ES6 rules for*.es6.jsfiles@beanbag/typescript: TypeScript rules for*.tsfiles
@beanbag/es5
A set of default rules for all JavaScript/TypeScript code, written to be aggressively browser-safe.
@beanbag/es6
A set of rules enabling ES6-level JavaScript code, useful for modern JavaScript (including code being processed by Babel.
@beanbag/typescript
A set of rules for developing TypeScript code.
Environments
The following environments are available:
@beanbag/backbone: RecordsBackboneand_as read-only globals, for use with Backbone.@beanbag/django: Recordsdjango,gettext,gettext_noop,interpolate,ngettext,npgettext, andpgettextas read-only globals, for use with Django.@beanbag/djblets: RecordsDjbletsas a read-only global, for use with Djblets.@beanbag/jasmine-suites: Recordssuiteas a read-only global, for use with jasmine-suites.@beanbag/reviewboard: RecordsRBas a read-only global, for use in Review Board extensions.