Skip to content

Commit

Permalink
eslint config fixed and prettier run
Browse files Browse the repository at this point in the history
  • Loading branch information
CodyCodes95 committed Jul 15, 2024
1 parent 6b38d3d commit dc8528e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ const project = resolve(process.cwd(), "tsconfig.json");

/** @type {import("eslint").Linter.Config} */
module.exports = {
parserOptions: {
project: true,
},
extends: [
"prettier",
"plugin:@typescript-eslint/recommended-type-checked",
Expand Down
Binary file modified bun.lockb
Binary file not shown.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"@types/bun": "latest",
"@types/eslint": "^8.56.2",
"@types/node": "^20.8.3",
"eslint-config-prettier": "^9.1.0",
"@typescript-eslint/parser": "^7.1.0",
"@typescript-eslint/eslint-plugin": "^7.1.0",
"eslint": "^8",
Expand Down
14 changes: 11 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import axios from "axios";
import type { SendSmsResponse, SmsMessage } from "./types/sms";
import type { GetRechargePackagesResponse, PurchasePackageResponse } from "./types/account";
import type {
GetRechargePackagesResponse,
PurchasePackageResponse,
} from "./types/account";

type ClickSendApiAuth = {
username: string;
Expand All @@ -20,11 +23,16 @@ export const createClickSendApi = (config: ClickSendApiAuth) => {
account: {
recharge: {
getPackages: async () => {
const res = await clickSendApi.get<GetRechargePackagesResponse>("recharge/packages");
const res =
await clickSendApi.get<GetRechargePackagesResponse>(
"recharge/packages"
);
return res.data;
},
purchasePackage: async (packageId: number) => {
const res = await clickSendApi.put<PurchasePackageResponse>(`recharge/purchase/${packageId}`);
const res = await clickSendApi.put<PurchasePackageResponse>(
`recharge/purchase/${packageId}`
);
return res.data;
},
},
Expand Down

0 comments on commit dc8528e

Please sign in to comment.