Skip to content

Commit

Permalink
feat: add error handling type safety
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbbreuer committed Nov 2, 2022
1 parent 737cf44 commit 5a42f48
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Expand Up @@ -167,7 +167,8 @@
"stroustrup",
"stroustrup",
"camelcase",
"linebreak"
"linebreak",
"neverthrow"
],
"prettier.enable": false
}
4 changes: 4 additions & 0 deletions packages/basic/index.js
Expand Up @@ -41,6 +41,7 @@ module.exports = {
'html',
'unicorn',
'ow3',
'neverthrow',
],
settings: {
'import/resolver': {
Expand Down Expand Up @@ -186,6 +187,9 @@ module.exports = {
},
],
rules: {
// type safe error handling
'neverthrow/must-use-result': 'error',

// import
'import/order': 'error',
'import/first': 'error',
Expand Down
3 changes: 2 additions & 1 deletion packages/typescript/package.json
Expand Up @@ -19,7 +19,8 @@
"dependencies": {
"@ow3/eslint-config-basic": "workspace:*",
"@typescript-eslint/eslint-plugin": "^5.26.0",
"@typescript-eslint/parser": "^5.26.0"
"@typescript-eslint/parser": "^5.26.0",
"eslint-plugin-neverthrow": "^1.1.4"
},
"devDependencies": {
"eslint": "^8.16.0"
Expand Down
33 changes: 32 additions & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5a42f48

Please sign in to comment.