forked from powerhouse-inc/switchboard
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add eslint, document it, add it to ci
- Loading branch information
1 parent
315cd53
commit b7c741d
Showing
6 changed files
with
2,118 additions
and
67 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,29 @@ | ||
{ | ||
// From: https://github.com/airbnb/javascript/issues/451 - we want airbnb, but not it's react rules (because we don't use react) | ||
"extends": "airbnb-base", | ||
"overrides": [ | ||
{ | ||
"files": [ | ||
"./**/*.ts" | ||
], | ||
"rules": { | ||
"no-console": [ | ||
"error", | ||
{ | ||
"allow": [ | ||
"info", | ||
"warn", | ||
"trace", | ||
"error" | ||
] | ||
} | ||
] | ||
} | ||
} | ||
], | ||
"rules": { | ||
"no-return-await": [ | ||
"error" | ||
] | ||
} | ||
} |
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 |
---|---|---|
|
@@ -22,3 +22,5 @@ jobs: | |
- run: npm install | ||
|
||
- run: npm run typecheck | ||
|
||
- run: npm run lint |
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
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 |
---|---|---|
@@ -1,14 +1,14 @@ | ||
const main = async () => { | ||
console.log('GM MakerDao') | ||
} | ||
console.info('GM MakerDao'); | ||
}; | ||
|
||
main().catch((err) => { | ||
console.error("Shutting down...") | ||
console.error('Shutting down...'); | ||
if (err instanceof Error) { | ||
console.error(err) | ||
console.error(err); | ||
} else { | ||
console.error("An unknown error has occurred. Please open an issue on github with the below:") | ||
console.log(err) | ||
console.error('An unknown error has occurred. Please open an issue on github (https://github.com/makerdao-ses/switchboard-boilerplate/issues/new) with the below context:'); | ||
console.info(err); | ||
} | ||
process.exit(1) | ||
}) | ||
process.exit(1); | ||
}); |
Oops, something went wrong.