Linters

Linters help clean up your code, make it much easier to spot bugs and are courteous to people who may inherit your work. Most can be run in your favorite code editor and configured to fix many issues automatically on save. They'll also give you hints on best practices as you go, which is an easy way to become a stronger, more consistent coder.

JavaScript

Use eslint with our custom config, which extends JavaScript Standard Style.

Want to know what's in it? Well, we like single quotes, semi-colons, comma-dangles & multilines, among other things. But that's just our opinion, man.

Here's how to use it:

yarn add -D @reuters-graphics/eslint-config eslint

Add an .eslintrc.json to the root of your project with the following:

{
  "root": true,
  "extends": "@reuters-graphics/eslint-config"
}

Look at the integrations available for your editor.

SCSS

Use stylelint with our custom config, which extends stylelint-config-standard.

yarn add -D @reuters-graphics/stylelint-config stylelint

Add an .stylelintrc.json to the root of your project with the following:

{
  "extends": "@reuters-graphics/stylelint-config"
}

Check out the integrations available for your editor.