@beanbag/eslint-plugin

2.0.1 • Public • Published

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-plugin

Usage

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 *.js files
  • @beanbag/es6: ES6 rules for *.es6.js files
  • @beanbag/typescript: TypeScript rules for *.ts files

@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: Records Backbone and _ as read-only globals, for use with Backbone.

  • @beanbag/django: Records django, gettext, gettext_noop, interpolate, ngettext, npgettext, and pgettext as read-only globals, for use with Django.

  • @beanbag/djblets: Records Djblets as a read-only global, for use with Djblets.

  • @beanbag/jasmine-suites: Records suite as a read-only global, for use with jasmine-suites.

  • @beanbag/reviewboard: Records RB as a read-only global, for use in Review Board extensions.

Package Sidebar

Install

npm i @beanbag/eslint-plugin

Weekly Downloads

1

Version

2.0.1

License

MIT

Unpacked Size

5.57 kB

Total Files

4

Last publish

Collaborators

  • chipx86
  • trowbrds