# Shared eslint config for Sinon

The [sharable eslint config][docs] for all Sinon.JS projects.

The package includes all the dependencies to have a working `eslint`
setup that works with the configuration. Adopting projects will only
need to install `@sinonjs/eslint-config`.

## Install

```bash
$ npm install @sinonjs/eslint-config --save-dev
```

The published package now expects a current Node LTS runtime:
`^20.19.0 || ^22.13.0 || >=24`.

Repository development also expects Node 20 or newer because the local
pre-commit tooling is on `lint-staged` 16.x.

## Usage

Add an `eslint.config.js` file to the project root:

```js
"use strict";

module.exports = require("@sinonjs/eslint-config");
```

Create a `.browserslistrc` in the root of the project

```
> 0.5%
last 2 versions
Firefox ESR
not dead
not IE 11
not op_mini all
maintained node versions
```

Visit [browserslist.dev](https://browserslist.dev/?q=PiAwLjUlLCBsYXN0IDIgdmVyc2lvbnMsIEZpcmVmb3ggRVNSLCBub3QgZGVhZCwgbm90IElFIDExLCBub3Qgb3BfbWluaSBhbGw%3D) to see what this translates to.

[docs]: https://eslint.org/docs/latest/extend/shareable-configs
