Skip to content

Commit

Permalink
chore: code sanity ++
Browse files Browse the repository at this point in the history
- remove useless axios devDep
- Expression 'customPayload' always passes null check at this point
because it is already checked at line 30 (in postToChevereto)
  • Loading branch information
TheRealBarenziah committed May 29, 2022
1 parent 530c09d commit 9434ee2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 49 deletions.
49 changes: 2 additions & 47 deletions package-lock.json

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

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
"@types/node": "^14.0.27",
"@typescript-eslint/eslint-plugin": "^5.26.0",
"@typescript-eslint/parser": "^5.26.0",
"axios": "^0.21.4",
"babel-jest": "^28.1.0",
"dotenv": "^8.2.0",
"eslint": "^8.16.0",
Expand Down
2 changes: 1 addition & 1 deletion src/postToChevereto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const postToChevereto = (params: IPostParams) =>

// Throw instantly when 'txt' or 'redirect' is passed to customPayload.format.. We don't do that here
if (customPayload) {
if (customPayload?.format === "txt" || customPayload?.format === "redirect") {
if (customPayload.format === "txt" || customPayload.format === "redirect") {
throw new Error(
"'options.customPayload.format' standard alternatives to 'json' are not supported; see USE_WITH_CHEVERETO.md for more details.",
);
Expand Down

0 comments on commit 9434ee2

Please sign in to comment.