JavaScript coding standards
Style Guide
Trento follows the Airbnb style guide, wherever possible.
Linting
The linting is enforced through ESLint locally and in the CI.
Use the .eslintrc.js template as a starting point for a new project.
Formatting
Code formatting is applied using Prettier, and enforced with a CI check.
Use the .prettierrc.js template as a starting point for a new project.
Testing
End-to-end tests in production-like environments are performed using Cypress.
Unit testing of JavaScript code and React components is performed using Jest and React Testing Library.
Storybook
Storybook is used to develop UI components in isolation.
When writing UI components, every PR should have new Storybook stories attached or have existing ones updated.
Books and guides
-
MDN’s JavaScript documentation is the only reliable source of truth about JavaScript on the web.
-
A bit old but gold: JavaScript: The Good Parts
-
Node.JS Design Patterns: a good book if you want to write a full-baked JS application.