This is a live document that collects those coding guidelines we intend new code to follow.
-
Run
yarn lintto validate your code. -
Don't commit code with ESLint errors (it'll make the build in CircleCI fail).
-
Code with ESLint warnings won't make the build in CircleCI fail, but reviewers will likely request they're fixed before merging a contribution.
-
Use lower case names and only alphanumeric characters (unless required otherwise).
-
Avoid stuttering:
- bad:
my-connector/my-connector-driver.js - good:
my-connector/driver.js
- bad:
-
Use the extension
.jsxfor files that contain JSX and.jsfor those that only contain JavaScript.
- Use JavaScript convention, i.e. camelCase.