Shared eslint config for Sinon

April 11, 2026 ยท View on GitHub

The sharable eslint config 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

$ 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:

"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 to see what this translates to.