Skip to content

Sage Docs

Adding ESLint, Prettier, and Stylelint

We recommend enabling linting

Sage 10 no longer includes linting styles or scripts out of the box. We highly recommend adding and configuring ESLint, Prettier, and Stylelint based on your needs.

Bud has several extensions that can be added to your theme dependencies to help with linting. To add ESLint, Prettier, and Stylelint to your theme, run:

yarn add @roots/bud-eslint -D yarn add @roots/bud-prettier -D yarn add @roots/bud-stylelint -D yarn add @roots/eslint-config -D

Add scripts to package.json for better access to linting your scripts and styles:

Then create new files for .eslintrc.js, .prettierrc, and .stylelintrc.

.eslintrc.js:

.prettierrc:

.stylelintrc:

Contributors

Last updated

Support Roots

Help us continue to build and maintain our open source projects. We’re a small team of independent developers and every little bit helps.

Sponsor Roots on GitHub