This repository has been archived by the owner on Jun 4, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 281
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Coding Guidelines | ||
|
||
This is a live document that collects those coding guidelines we intend new code | ||
to follow. | ||
|
||
|
||
## ESLint | ||
|
||
- Run `yarn lint` to 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. | ||
|
||
|
||
## Naming Conventions | ||
|
||
### Path and Filenames | ||
|
||
- 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` | ||
|
||
- Use the extension `.jsx` for files that contain JSX and `.js` for those that | ||
only contain JavaScript. | ||
|
||
### Variable and Function Names | ||
|
||
- Use JavaScript convention, i.e. camelCase. |