mainstack-payments 0.0.0 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/build/mainstack-payments.js +25240 -95861
  2. package/build/src/api/config.d.ts +6 -0
  3. package/build/src/api/index.d.ts +54 -0
  4. package/build/src/app.d.ts +1 -0
  5. package/build/src/assets/themes/baseThemes.d.ts +2 -0
  6. package/build/src/components/CheckoutForm.d.ts +15 -0
  7. package/build/src/components/DrawerModal.d.ts +10 -0
  8. package/build/src/components/Payment.d.ts +19 -0
  9. package/build/src/components/PaystackPaymentErrorModal.d.ts +6 -0
  10. package/build/src/components/PaystackPaymentModal.d.ts +8 -0
  11. package/build/src/components/WalletPay.d.ts +11 -0
  12. package/build/src/constants/index.d.ts +2 -0
  13. package/build/src/enums/currenciesEnums.d.ts +6 -0
  14. package/build/src/hooks/useApi.d.ts +22 -0
  15. package/build/src/hooks/usePayment.d.ts +7 -0
  16. package/build/src/index.d.ts +3 -0
  17. package/build/src/pages/Home.d.ts +2 -0
  18. package/build/src/pages/Index.d.ts +2 -0
  19. package/build/src/pages/Login.d.ts +2 -0
  20. package/build/src/pages/Page404.d.ts +2 -0
  21. package/build/src/pages/PaymentRedirect.d.ts +2 -0
  22. package/build/src/provider/index.d.ts +6 -0
  23. package/build/src/routes/index.d.ts +7 -0
  24. package/build/src/types/index.d.ts +35 -0
  25. package/{src/utils/countries_flag.json → build/src/utils/countries_flag.json.d.ts} +4 -1
  26. package/{src/utils/countries_with_flags_and_currencies.json → build/src/utils/countries_with_flags_and_currencies.json.d.ts} +4 -1
  27. package/build/src/utils/formatUnderscoreText.d.ts +2 -0
  28. package/build/src/utils/index.d.ts +3 -0
  29. package/build/src/utils/stringifyPrice.d.ts +4 -0
  30. package/build/src/utils/validations.d.ts +14 -0
  31. package/package.json +30 -10
  32. package/.env.sample +0 -1
  33. package/.eslintignore +0 -5
  34. package/.eslintrc.json +0 -95
  35. package/.github/PULL_REQUEST_TEMPLATE.md +0 -15
  36. package/.husky/commit-msg +0 -4
  37. package/.husky/pre-commit +0 -6
  38. package/.prettierignore +0 -7
  39. package/.prettierrc +0 -9
  40. package/.vscode/extensions.json +0 -10
  41. package/build/_redirects +0 -1
  42. package/build/manifest.json +0 -15
  43. package/build/robots.txt +0 -3
  44. package/build/style.css +0 -6
  45. package/build/vite.svg +0 -1
  46. package/commitlint.config.cjs +0 -1
  47. package/index.html +0 -31
  48. package/public/_redirects +0 -1
  49. package/public/manifest.json +0 -15
  50. package/public/robots.txt +0 -3
  51. package/public/vite.svg +0 -1
  52. package/src/api/config.ts +0 -36
  53. package/src/api/index.ts +0 -84
  54. package/src/app.tsx +0 -39
  55. package/src/assets/images/tired-emoji.png +0 -0
  56. package/src/assets/styles/index.css +0 -26
  57. package/src/assets/themes/baseThemes.ts +0 -30
  58. package/src/components/CheckoutForm.tsx +0 -426
  59. package/src/components/DrawerModal.tsx +0 -63
  60. package/src/components/Payment.tsx +0 -772
  61. package/src/components/PaystackPaymentErrorModal.tsx +0 -120
  62. package/src/components/PaystackPaymentModal.tsx +0 -120
  63. package/src/components/WalletPay.tsx +0 -160
  64. package/src/constants/index.ts +0 -3
  65. package/src/enums/currenciesEnums.ts +0 -7
  66. package/src/hooks/usePayment.ts +0 -60
  67. package/src/index.ts +0 -3
  68. package/src/pages/Home.tsx +0 -97
  69. package/src/pages/Index.tsx +0 -23
  70. package/src/pages/Login.tsx +0 -13
  71. package/src/pages/Page404.tsx +0 -13
  72. package/src/pages/PaymentRedirect.tsx +0 -15
  73. package/src/routes/index.tsx +0 -8
  74. package/src/types/index.ts +0 -48
  75. package/src/utils/countries-flag.json +0 -1752
  76. package/src/utils/formatUnderscoreText.ts +0 -5
  77. package/src/utils/index.ts +0 -4
  78. package/src/utils/stringifyPrice.ts +0 -37
  79. package/src/utils/validations.ts +0 -44
  80. package/tsconfig.json +0 -35
  81. package/vite.config.ts +0 -36
@@ -0,0 +1,6 @@
1
+ /** @format */
2
+ declare const InitializeAPIConfig: (baseUrl: string, authMSUrl: string) => {
3
+ Request: import('axios').AxiosInstance;
4
+ AuthMSRequest: import('axios').AxiosInstance;
5
+ };
6
+ export default InitializeAPIConfig;
@@ -0,0 +1,54 @@
1
+ import { TMetadata } from 'types';
2
+
3
+ export declare const useGetTransactionFees: ({ account_id, currency, amount, slug, }: {
4
+ account_id: string;
5
+ currency: string;
6
+ amount: number;
7
+ slug?: string | undefined;
8
+ }, AuthMSRequest: any) => {
9
+ data: any;
10
+ isLoading: boolean;
11
+ refetch: () => Promise<{
12
+ data: {};
13
+ isSuccess: boolean;
14
+ error: {};
15
+ }>;
16
+ };
17
+ interface IInitPayment {
18
+ amount: number;
19
+ reference: string;
20
+ currency: string;
21
+ metadata: TMetadata;
22
+ }
23
+ export declare const useInitPayment: (Request: any) => {
24
+ data: any;
25
+ isLoading: boolean;
26
+ mutate: (dataParams: IInitPayment, { onSuccess, onError, }: {
27
+ onSuccess: (data: any) => void;
28
+ onError: (error: any) => void;
29
+ }) => Promise<any>;
30
+ };
31
+ interface IChargePayment {
32
+ amount: number;
33
+ currency: string;
34
+ callback_url?: string;
35
+ metadata: TMetadata;
36
+ }
37
+ export declare const useChargePayment: (Request: any) => {
38
+ data: any;
39
+ isLoading: boolean;
40
+ mutate: (dataParams: IChargePayment, { onSuccess, onError, }: {
41
+ onSuccess: (data: any) => void;
42
+ onError: (error: any) => void;
43
+ }) => Promise<any>;
44
+ };
45
+ export declare const useVerifyPayment: (reference: string, Request: any) => {
46
+ data: any;
47
+ isLoading: boolean;
48
+ refetch: () => Promise<{
49
+ data: {};
50
+ isSuccess: boolean;
51
+ error: {};
52
+ }>;
53
+ };
54
+ export {};
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,2 @@
1
+ /** @format */
2
+ export declare const theme: Record<string, any>;
@@ -0,0 +1,15 @@
1
+ /** @format */
2
+ declare const CheckoutDetailsForm: ({ currency, amount, metadata, formik, isFree, showPayment, onCancel, btn_color, onPaymentComplete, Request, }: {
3
+ currency: string;
4
+ amount: number;
5
+ metadata?: any;
6
+ discount_code?: string | undefined;
7
+ formik: any;
8
+ isFree: boolean;
9
+ showPayment: boolean;
10
+ onCancel: () => void;
11
+ btn_color: string;
12
+ onPaymentComplete: (reference: string) => void;
13
+ Request: any;
14
+ }) => import("react/jsx-runtime").JSX.Element;
15
+ export default CheckoutDetailsForm;
@@ -0,0 +1,10 @@
1
+ /** @format */
2
+ interface IModal {
3
+ headerText?: string;
4
+ isOpen: boolean;
5
+ onClose: () => void;
6
+ children: any;
7
+ modalBodyStyle?: any;
8
+ }
9
+ declare const DrawerModal: ({ isOpen, onClose, children, headerText, modalBodyStyle, }: IModal) => import("react/jsx-runtime").JSX.Element;
10
+ export default DrawerModal;
@@ -0,0 +1,19 @@
1
+ import { ReactNode } from 'react';
2
+ import { TPaymentConfig } from 'types';
3
+
4
+ interface IMainstackPaymentProps {
5
+ paymentConfig: TPaymentConfig;
6
+ summaryTitle?: string | ReactNode;
7
+ customForm?: ReactNode;
8
+ customFormValidation?: {
9
+ [key: string]: any;
10
+ };
11
+ customFormValues?: {
12
+ [key: string]: string;
13
+ };
14
+ onGoBack: () => void;
15
+ onInitializePayment?: () => void;
16
+ onPaymentComplete: (reference: string) => void;
17
+ }
18
+ declare const MainstackPayment: import('react').ForwardRefExoticComponent<IMainstackPaymentProps & import('react').RefAttributes<unknown>>;
19
+ export default MainstackPayment;
@@ -0,0 +1,6 @@
1
+ interface PaystackPaymentErrorModalProps {
2
+ isOpen: boolean;
3
+ onClose: () => void;
4
+ }
5
+ declare const PaystackPaymentErrorModal: ({ isOpen, onClose, }: PaystackPaymentErrorModalProps) => import("react/jsx-runtime").JSX.Element;
6
+ export default PaystackPaymentErrorModal;
@@ -0,0 +1,8 @@
1
+ /** @format */
2
+ interface PaystackPaymentModalProps {
3
+ isOpen: boolean;
4
+ src: string;
5
+ handleCloseModal: () => void;
6
+ }
7
+ export declare const PaystackPaymentModal: ({ src, isOpen, handleCloseModal, }: PaystackPaymentModalProps) => import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,11 @@
1
+ /** @format */
2
+ declare const WalletPay: ({ currency, metadata, amount, formik, checkForErrors, onPaymentComplete, Request, }: {
3
+ currency: string;
4
+ amount: number;
5
+ metadata?: any;
6
+ formik: any;
7
+ checkForErrors: () => Promise<boolean>;
8
+ onPaymentComplete: (reference: string) => void;
9
+ Request: any;
10
+ }) => import("react/jsx-runtime").JSX.Element;
11
+ export default WalletPay;
@@ -0,0 +1,2 @@
1
+ /** @format */
2
+ export declare const PAYSTACK_REDIRECT_EVENT = "Payment Completed";
@@ -0,0 +1,6 @@
1
+ /** @format */
2
+ export declare enum CURRENCIES {
3
+ GHS = "GHS",
4
+ NGN = "NGN",
5
+ UGX = "UGX"
6
+ }
@@ -0,0 +1,22 @@
1
+ export declare const useQuery: ({ queryFn, enabled, }: {
2
+ queryFn: () => Promise<any>;
3
+ enabled?: boolean | undefined;
4
+ }) => {
5
+ data: any;
6
+ isLoading: boolean;
7
+ refetch: () => Promise<{
8
+ data: {};
9
+ isSuccess: boolean;
10
+ error: {};
11
+ }>;
12
+ };
13
+ export declare const useMutation: <T>({ mutationFn, }: {
14
+ mutationFn: (data: T) => Promise<any>;
15
+ }) => {
16
+ data: any;
17
+ isLoading: boolean;
18
+ mutate: (dataParams: T, { onSuccess, onError, }: {
19
+ onSuccess: (data: any) => void;
20
+ onError: (error: any) => void;
21
+ }) => Promise<any>;
22
+ };
@@ -0,0 +1,7 @@
1
+ /** @format */
2
+ export declare const usePayment: (currency: string) => {
3
+ getAmount: (curr: string, price: string | number, currencies: any, markup?: number) => number;
4
+ getAmountInUSD: (curr: string, price: string, currencies: any) => number;
5
+ getCountryNameByCurrency: () => string;
6
+ getCountryCurrency: (country: any) => string;
7
+ };
@@ -0,0 +1,3 @@
1
+ /** @format */
2
+ export { default as MainstackPayments } from './components/Payment';
3
+ export { default as MainstackPaymentsProvider } from './provider';
@@ -0,0 +1,2 @@
1
+ /** @format */
2
+ export default function Home(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ declare function Index(): import("react/jsx-runtime").JSX.Element;
2
+ export default Index;
@@ -0,0 +1,2 @@
1
+ /** @format */
2
+ export default function Login(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ /** @format */
2
+ export default function Page404(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ declare const PostMessagePage: () => import("react/jsx-runtime").JSX.Element;
2
+ export default PostMessagePage;
@@ -0,0 +1,6 @@
1
+ import { ReactNode } from 'react';
2
+
3
+ declare const MainstackPaymentsProvider: ({ children }: {
4
+ children: ReactNode;
5
+ }) => import("react/jsx-runtime").JSX.Element;
6
+ export default MainstackPaymentsProvider;
@@ -0,0 +1,7 @@
1
+ /** @format */
2
+ export declare const ROUTES: {
3
+ HOME: string;
4
+ LOGIN: string;
5
+ NOT_FOUND: string;
6
+ PAYMENT_REDIRECT: string;
7
+ };
@@ -0,0 +1,35 @@
1
+ /** @format */
2
+ type TPaymentOption = "wallet" | "startbutton" | "stripe" | "paystack";
3
+ type TMetadata = {
4
+ reference?: string;
5
+ actual_price?: number;
6
+ type: string;
7
+ account_id: string;
8
+ user_id: string;
9
+ product_id: string;
10
+ mainstack_product_type: "store" | "editor" | "bookings" | "mediakit" | "invoicing" | "hosted_courses";
11
+ productName: string;
12
+ [key: string]: any;
13
+ };
14
+ type TCustomizations = {
15
+ theme_color?: string;
16
+ button_label?: string;
17
+ font_family?: string;
18
+ };
19
+ type TPaymentConfig = {
20
+ reference: string;
21
+ currency: string;
22
+ amount: number;
23
+ discountAmount?: number;
24
+ metadata: TMetadata;
25
+ customizations?: TCustomizations;
26
+ transactionFeesSlug: string;
27
+ paymentOptions?: TPaymentOption[];
28
+ paystackRedirectUrl?: string;
29
+ baseUrl: string;
30
+ authMSUrl: string;
31
+ accountId: string;
32
+ userAllowsWalletPayment: boolean;
33
+ userAllowsCardPayment: boolean;
34
+ };
35
+ export type { TPaymentConfig, TMetadata, TCustomizations, TPaymentOption };
@@ -1,4 +1,4 @@
1
- [
1
+ declare const _default: [
2
2
  {
3
3
  "name": "Afghanistan",
4
4
  "alpha2Code": "AF",
@@ -1500,3 +1500,6 @@
1500
1500
  "independent": false
1501
1501
  }
1502
1502
  ]
1503
+ ;
1504
+
1505
+ export default _default;
@@ -1,4 +1,4 @@
1
- [
1
+ declare const _default: [
2
2
  {
3
3
  "name": "Afghanistan",
4
4
  "code": "AF",
@@ -4002,3 +4002,6 @@
4002
4002
  "flag": "https://restcountries.eu/data/zwe.svg"
4003
4003
  }
4004
4004
  ]
4005
+ ;
4006
+
4007
+ export default _default;
@@ -0,0 +1,2 @@
1
+ /** @format */
2
+ export declare const replaceUnderscores: (input: string) => string;
@@ -0,0 +1,3 @@
1
+ /** @format */
2
+ export { replaceUnderscores } from './formatUnderscoreText';
3
+ export { stringifyPrice } from './stringifyPrice';
@@ -0,0 +1,4 @@
1
+ /** @format */
2
+ declare const roundToTwo: (num: number) => number;
3
+ export declare const stringifyPrice: (price: any | number | bigint) => string;
4
+ export { roundToTwo };
@@ -0,0 +1,14 @@
1
+ /** @format */
2
+ import * as yup from "yup";
3
+ export declare const VALIDATIONS: {
4
+ email: yup.StringSchema<string, yup.AnyObject, undefined, "">;
5
+ fullname: yup.StringSchema<string, yup.AnyObject, undefined, "">;
6
+ username: yup.StringSchema<string, yup.AnyObject, undefined, "">;
7
+ password: yup.StringSchema<string, yup.AnyObject, undefined, "">;
8
+ url: yup.StringSchema<string, yup.AnyObject, undefined, "">;
9
+ name: yup.StringSchema<string, yup.AnyObject, undefined, "">;
10
+ firstname: yup.StringSchema<string, yup.AnyObject, undefined, "">;
11
+ lastname: yup.StringSchema<string, yup.AnyObject, undefined, "">;
12
+ country: yup.StringSchema<string, yup.AnyObject, undefined, "">;
13
+ message: yup.StringSchema<string, yup.AnyObject, undefined, "">;
14
+ };
package/package.json CHANGED
@@ -1,19 +1,29 @@
1
1
  {
2
2
  "name": "mainstack-payments",
3
3
  "type": "module",
4
- "version": "0.0.0",
4
+ "version": "0.0.2",
5
5
  "main": "build/mainstack-payments.js",
6
6
  "types": "build/src/index.d.ts",
7
+ "files": [
8
+ "build"
9
+ ],
7
10
  "scripts": {
8
11
  "dev": "vite",
9
12
  "build": "tsc && vite build",
10
13
  "preview": "vite preview --port 5001",
11
14
  "format": "prettier src -c --write && pretty-quick --staged",
12
15
  "lint": "eslint src --ext .js,.jsx,.ts,.tsx --quiet --fix",
13
- "ts-error": "./node_modules/.bin/tsc",
14
- "postinstall": "husky install",
15
- "prepare": "husky install",
16
- "scriptname": "cmd"
16
+ "ts-error": "tsc",
17
+ "install:husky": "run-script-os",
18
+ "install:husky:default": "[ ! -d \"/node_modules/husky/\" ] || husky install",
19
+ "install:husky:win32": "echo \"husky skipped\"",
20
+ "postinstall": "yarn install:husky",
21
+ "prepare": "yarn install:husky",
22
+ "scriptname": "cmd",
23
+ "prepublishOnly": "yarn build"
24
+ },
25
+ "publishConfig": {
26
+ "@themainstack:registry": "https://npm.pkg.github.com"
17
27
  },
18
28
  "browserslist": {
19
29
  "production": [
@@ -31,23 +41,22 @@
31
41
  "@chakra-ui/react": "^2.5.1",
32
42
  "@stripe/react-stripe-js": "^2.7.1",
33
43
  "@stripe/stripe-js": "^4.0.0",
34
- "@tanstack/react-query": "^5.45.1",
35
44
  "axios": "^1.7.2",
36
45
  "eslint-config-prettier": "^8.6.0",
37
46
  "eslint-plugin-prettier": "^4.2.1",
38
47
  "formik": "^2.4.6",
39
48
  "framer-motion": "^10.0.1",
40
- "mainstack-design-system": "^0.4.8",
41
49
  "postcode-validator": "^3.8.21",
42
50
  "prettier": "^2.8.4",
43
51
  "pretty-quick": "^3.1.3",
44
- "react": "^18.2.0",
45
- "react-dom": "^18.2.0",
46
52
  "react-paystack": "^5.0.0",
47
53
  "react-router-dom": "^6.8.1",
54
+ "run-script-os": "^1.1.6",
48
55
  "typescript": "^4.9.5",
49
56
  "uuid": "^10.0.0",
57
+ "vite-plugin-dts": "^3.9.1",
50
58
  "vite-plugin-env-compatible": "^1.1.1",
59
+ "vite-plugin-lib-inject-css": "^2.1.1",
51
60
  "vite-plugin-svgr": "^2.4.0",
52
61
  "vite-tsconfig-paths": "^4.0.5",
53
62
  "yup": "^1.4.0"
@@ -55,6 +64,7 @@
55
64
  "devDependencies": {
56
65
  "@commitlint/cli": "17.1.2",
57
66
  "@commitlint/config-conventional": "17.1.0",
67
+ "@tanstack/react-query": "^5.49.2",
58
68
  "@types/react": "^18.0.28",
59
69
  "@types/react-dom": "^18.0.11",
60
70
  "@types/uuid": "^10.0.0",
@@ -70,7 +80,17 @@
70
80
  "eslint-plugin-react": "^7.32.2",
71
81
  "eslint-plugin-react-hooks": "^4.6.0",
72
82
  "husky": "^8.0.3",
73
- "vite": "^4.1.0"
83
+ "mainstack-design-system": "^0.5.0",
84
+ "react": "^18.3.1",
85
+ "react-dom": "^18.3.1",
86
+ "vite": "^4.1.0",
87
+ "vite-plugin-externalize-deps": "^0.8.0"
88
+ },
89
+ "peerDependencies": {
90
+ "@chakra-ui/react": "^2.5.1",
91
+ "mainstack-design-system": "^0.5.0",
92
+ "react": "^18",
93
+ "react-dom": "^18"
74
94
  },
75
95
  "description": "A React library to use Mainstack Payments",
76
96
  "repository": {
package/.env.sample DELETED
@@ -1 +0,0 @@
1
- REACT_APP_BASE_URL=""
package/.eslintignore DELETED
@@ -1,5 +0,0 @@
1
- node_modules
2
- build
3
- coverage
4
- vite.config.ts
5
- /commitlint.config.cjs
package/.eslintrc.json DELETED
@@ -1,95 +0,0 @@
1
- {
2
- "extends": [
3
- "eslint:recommended",
4
- "airbnb/hooks",
5
- "airbnb-typescript",
6
- "plugin:react/recommended",
7
- "plugin:react/jsx-runtime",
8
- "plugin:@typescript-eslint/recommended",
9
- "plugin:@typescript-eslint/recommended-requiring-type-checking",
10
- "prettier/prettier",
11
- "prettier",
12
- "plugin:prettier/recommended",
13
- "plugin:import/recommended"
14
- ],
15
- "plugins": [
16
- "react-hooks",
17
- "@typescript-eslint",
18
- "prettier",
19
- "react",
20
- "import",
21
- "jsx-a11y"
22
- ],
23
- "parser": "@typescript-eslint/parser",
24
- "parserOptions": {
25
- "ecmaFeatures": {
26
- "jsx": true
27
- },
28
- "ecmaVersion": "latest",
29
- "sourceType": "module",
30
- "tsconfigRootDir": ".",
31
- "project": ["./tsconfig.json"]
32
- },
33
- "env": {
34
- "browser": true,
35
- "es6": true
36
- },
37
- "settings": {
38
- "import/resolver": {
39
- "typescript": {
40
- "project": "./tsconfig.json"
41
- }
42
- },
43
- "react": {
44
- "version": "detect"
45
- }
46
- },
47
- "rules": {
48
- "no-var": 2,
49
- "semi": 0,
50
- "func-names": 0,
51
- "default-param-last": 0,
52
- "camelcase": 0,
53
- "consistent-return": 0,
54
- "no-console": 1,
55
- "no-unused-expressions": 0,
56
- "no-plusplus": 0,
57
- "no-underscore-dangle": 0,
58
- "no-nested-ternary": 0,
59
- "object-shorthand": 0,
60
- "class-methods-use-this": 0,
61
- "import/extensions": 0,
62
- "import/no-unresolved": 0,
63
- "jsx-a11y/label-has-associated-control": 0,
64
- "jsx-a11y/no-autofocus": 0,
65
- "max-classes-per-file": 0,
66
- "import/prefer-default-export": 0,
67
- "import/no-extraneous-dependencies": 0,
68
- "no-param-reassign": 0,
69
- "no-prototype-builtins": 0,
70
- "no-unsafe-optional-chaining": 0,
71
- "radix": 0,
72
- "react/prop-types": 0,
73
- "react-hooks/rules-of-hooks": 2,
74
- "react-hooks/exhaustive-deps": 0,
75
- "react/no-children-prop": 0,
76
- "react/jsx-key": 0,
77
- "react/display-name": 0,
78
- "react/react-in-jsx-scope": 0,
79
- "react/no-unescaped-entities": 0,
80
- "@typescript-eslint/no-empty-function": 0,
81
- "@typescript-eslint/no-unsafe-assignment": 0,
82
- "@typescript-eslint/restrict-template-expressions": 0,
83
- "@typescript-eslint/no-unsafe-argument": 0,
84
- "@typescript-eslint/no-unsafe-call": 0,
85
- "@typescript-eslint/no-unsafe-member-access": 0,
86
- "@typescript-eslint/ban-ts-comment": 0,
87
- "@typescript-eslint/no-explicit-any": 0,
88
- "@typescript-eslint/no-floating-promises": 0,
89
- "@typescript-eslint/no-unsafe-return": 0,
90
- "prefer-const": 1,
91
- "@typescript-eslint/no-misused-promises": 0,
92
- "@typescript-eslint/no-unused-vars": 1,
93
- "no-sparse-arrays": 0
94
- }
95
- }
@@ -1,15 +0,0 @@
1
- ### Subject / Header
2
-
3
- State the subject or header of the PR e.g Setting Up Code Base
4
-
5
- ### What changed?
6
-
7
- Here state the over view of what changed. Also inculde if a command is needed to be ran after pulling. This is an example
8
-
9
- - Setting up the code base for frontend dashboard
10
- - Added Pull Pequest template and other file template
11
- - New package are added, thus the need to run `yarn install`.
12
-
13
- ### Whats Remaining
14
-
15
- Here state if anything is missing that should be in the PR but its not, this so that the person reviewing the code would know whats missing and can test better
package/.husky/commit-msg DELETED
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env sh
2
- . "$(dirname -- "$0")/_/husky.sh"
3
-
4
- yarn commitlint --edit $1
package/.husky/pre-commit DELETED
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env sh
2
- . "$(dirname -- "$0")/_/husky.sh"
3
-
4
- yarn ts-error $1
5
- yarn format $1
6
- yarn lint $1
package/.prettierignore DELETED
@@ -1,7 +0,0 @@
1
- /dist
2
- /build
3
- /coverage
4
- node_modules
5
- /public
6
- /commitlint.config.cjs
7
-
package/.prettierrc DELETED
@@ -1,9 +0,0 @@
1
- {
2
- "singleQuote": false,
3
- "arrowParens": "always",
4
- "useTabs": false,
5
- "bracketSpacing": true,
6
- "insertPragma": true,
7
- "semi": true,
8
- "tabWidth": 2
9
- }
@@ -1,10 +0,0 @@
1
- {
2
- "recommendations": [
3
- "vivaxy.vscode-conventional-commits",
4
- "dbaeumer.vscode-eslint",
5
- "streetsidesoftware.code-spell-checker",
6
- "vincaslt.highlight-matching-tag",
7
- "esbenp.prettier-vscode",
8
- "usernamehw.errorlens"
9
- ]
10
- }
package/build/_redirects DELETED
@@ -1 +0,0 @@
1
- /* /index.html 200
@@ -1,15 +0,0 @@
1
- {
2
- "short_name": "Mainstack Template",
3
- "name": "This is a template to build mainstack app going forward",
4
- "icons": [
5
- {
6
- "src": "vite.svg",
7
- "sizes": "64x64 32x32 24x24 16x16",
8
- "type": "image/x-icon"
9
- }
10
- ],
11
- "start_url": ".",
12
- "display": "standalone",
13
- "theme_color": "#000000",
14
- "background_color": "#ffffff"
15
- }
package/build/robots.txt DELETED
@@ -1,3 +0,0 @@
1
- # https://www.robotstxt.org/robotstxt.html
2
- User-agent: *
3
- Disallow: