# @beanbag/eslint-plugin

> Configuration used for linting Beanbag JavaScript codebases.

Latest version **4.0.0** (published 2025-12-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install @beanbag/eslint-plugin
pnpm add @beanbag/eslint-plugin
yarn add @beanbag/eslint-plugin
bun add @beanbag/eslint-plugin
```

## Health

**Score 60/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 4.0.0 |
| Published | 2025-12-05 |
| First published | 2023-01-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 5 |
| Unpacked size | 337.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Beanbag, Inc. |
| Maintainers | chipx86, trowbrds |
| Keywords | eslint, eslintplugin, javascript |

## Links

- npm: https://www.npmjs.com/package/@beanbag/eslint-plugin
- Homepage: https://github.com/beanbaginc/beanbag-eslint-plugin
- npm.io page: https://npm.io/package/@beanbag/eslint-plugin

## Dependencies (5)

- [globals](https://npm.io/package/globals.md) ^16.4.0
- [@eslint/js](https://npm.io/package/@eslint/js.md) ^9.38.0
- [typescript-eslint](https://npm.io/package/typescript-eslint.md) ^8.46.2
- [eslint-plugin-jasmine](https://npm.io/package/eslint-plugin-jasmine.md) ^4.2.2
- [@stylistic/eslint-plugin](https://npm.io/package/@stylistic/eslint-plugin.md) ^5.5.0

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@inrupt/eslint-config-base](https://npm.io/package/@inrupt/eslint-config-base.md) — 4.5K weekly downloads

## Recent versions

- 4.0.0 (latest) — 2025-12-05
- 3.0.0 — 2025-10-08
- 2.0.1 — 2024-04-02
- 2.0.0 — 2024-02-27
- 1.0.2 — 2023-09-28
- 1.0.1 — 2023-05-05
- 1.0.0 — 2023-01-09

## README

# Beanbag ESLint Plugin

We write a lot of JavaScript at [Beanbag](https://www.beanbaginc.com), 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](https://www.reviewboard.org).

To help with this, we've created `beanbag-eslint-plugin`, our set of standard
[ESLint](https://eslint.org/) 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 `eslint.config.mjs` file:

```js
import beanbag from '@beanbag/eslint-plugin';
import { defineConfig } from 'eslint/config';


export default defineConfig([
    beanbag.configs.recommended,
    {
        plugins: {
            '@beanbag': beanbag,
        },
    },
]);
```


## Configurations

### beanbag.configs.recommended

This ruleset automatically enables the following additional configurations:

* `beanbag.configs.es5`: ES5 rules for `*.js` files.
* `beanbag.configs.es6`: ES6 rules for `*.es6.js` files.
* `beanbag.configs.typescript`: TypeScript rules for `*.ts` files.
* `beanbag.configs.jsx`: Rules for JSX files.
* `beanbag.configs.jasmine`: Rules for Jasmine test suites.
* `beanbag.configs.storybook`: Rules for Storybook stories.


### beanbag.configs.es5

A set of default rules for all JavaScript/TypeScript code, written to be
aggressively browser-safe.


### beanbag.configs.es6

A set of rules enabling ES6+ JavaScript code, useful for modern JavaScript
(including code being processed by [Babel](https://babeljs.io/).


### beanbag.configs.typescript

A set of rules for developing TypeScript code.


## Globals

Several sets of globals are also provided within the plugin. These may be
already added to `languageOptions` depending on which rulesets are enabled, but
are also available for your use:

* `beanbag.globals.backbone`: Provides read-only globals configuration for
  `Backbone` and `_`, for use with [Backbone](https://backbonejs.org/).

* `beanbag.globals.django`: Provides read-only globals for `django`, `gettext`,
  `gettext_noop`, `interpolate`, `ngettext`, `npgettext`, and `pgettext`,
  for use with [Django](https://www.djangoproject.com/).

* `beanbag.globals.djblets`: Provides a read-only global for `Djblets`, for
  use with [Djblets](https://github.com/djblets/djblets/).

* `beanbag.globals.reviewboard`: Provides a read-only global for `RB` , for
  use in [Review Board](https://github.com/reviewboard/reviewboard) extensions.

---
_Source: https://npm.io/package/@beanbag/eslint-plugin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
