GitHub
Twitter

Linting & Prettier

Clean Code = Calm Mind

🚨 Important: Make sure that you have the VSCode plugins installed for both Prettier and ESLint, otherwise all of this is for naught!

No surprise here. We use Prettier to format our code and keep our preferences in the .prettierrc file located in the root of R&P.

Cracking open this simple file will show that we follow the Prettier defaults with two exceptions:

  1. We prefer using single quotes over double quotes.

  2. We don't use semicolons. 😱😱😱

Having these preferences in the root of every R&P project will ensure consistent formatting for our all of our team members.

The formatting should occur automatically when you save your file. If that's not happening, open your VS code settings.json and add this line:

"editor.formatOnSave": true,

We use ESLint as our linter and have an .eslintrc.json file in the root of every R&P project that contains our customized linting rules. This is rarely (if ever) modified.

We also have an .eslintignore file that contains folders exempt from the rules, such as public and static.

💡
See something that is out of date or that could be improved?Please let the team know!1. You can create a Github issue2. Pull down the repo and create a PR with your suggested changes implimented.3. Or just let someone know in the R&P Slack Channel.We love making things better.