Skip to main content


Eslint support can be added by installing the @roots/bud-eslint extension.


npm install @roots/bud-eslint --save-dev


For general information on configuring eslint see the official Eslint user guide.

You can configure Stylelint in two ways:

Using an eslint config file

You can configure eslint using a eslint config file.

bud.js allows for you to write your eslint config in CommonJS, ESM, TypeScript, JSON or YML. This file should be placed in the root of your project or the project ./config directory.

export default {
extends: [`@roots/bud-eslint/config`],
rules: {'no-console': `error`},

Configuring eslint with bud.eslint

You can configure eslint directly in your bud.js config using the bud.eslint API.

.setRules({'no-console': `error`})


You can extend a eslint config by passing an array of eslint config files to bud.eslint.extends.



You can set eslint rules by passing an object to bud.eslint.setRules.

bud.eslint.setRules({'no-descending-specificity': null})

Fail on error

By default, eslint will fail on error in production mode. You can change this behavior by setting bud.eslint.failOnError to false.


Fail on warning

By default, eslint will not fail on warning. You can change this behavior by setting bud.eslint.failOnWarning to true.



By default, eslint will not fix errors. You can change this behavior by setting bud.eslint.fix to true.


There is a recommended eslint configuration available for you to use as a starting point.

npm install @roots/eslint-config --save-dev

Once installed you can add it to the extends array in your eslint config:

module.exports = {
root: true,
extends: ['@roots/eslint-config'],