Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
236 changes: 236 additions & 0 deletions package-lock.json

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

3 changes: 2 additions & 1 deletion packages/react-paypal-js/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "import"],
"plugins": ["@typescript-eslint", "import", "jsdoc"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
Expand All @@ -27,6 +27,7 @@
}
},
"rules": {
"jsdoc/no-undefined-types": 1,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This allows importing types only for use in jsdoc without the linter reporting an unused variable error.

"react/prop-types": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"curly": "warn",
Expand Down
3 changes: 2 additions & 1 deletion packages/react-paypal-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-node-resolve": "^16.0.1",
"@rollup/plugin-replace": "^6.0.2",
"@rollup/plugin-terser": "^0.4.4",
"@rollup/plugin-typescript": "^12.1.4",
"@storybook/addon-actions": "^6.4.9",
"@storybook/addon-docs": "^6.4.9",
Expand All @@ -94,6 +95,7 @@
"eslint": "^8.9.0",
"eslint-config-prettier": "^8.4.0",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-jsdoc": "^61.1.11",
"eslint-plugin-react": "^7.28.0",
"eslint-plugin-react-hooks": "^4.3.0",
"husky": "^7.0.4",
Expand All @@ -108,7 +110,6 @@
"rimraf": "^3.0.2",
"rollup": "^4.9.1",
"rollup-plugin-cleanup": "^3.2.1",
"@rollup/plugin-terser": "^0.4.4",
"scheduler": "^0.20.2",
"semver": "^7.3.5",
"standard-version": "^9.3.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ import { INSTANCE_LOADING_STATE } from "../types/PayPalProviderEnums";
import { isServer } from "../utils";

import type { CreateInstanceOptions } from "../types";
import type { PayPalContextState } from "../components/PayPalProvider";
import type { PayPalState } from "../context/PayPalProviderContext";

const TEST_CLIENT_TOKEN = "test-client-token";

function expectInitialState(state: Partial<PayPalContextState>): void {
function expectInitialState(state: Partial<PayPalState>): void {
expect(state.loadingStatus).toBe(INSTANCE_LOADING_STATE.PENDING);
expect(state.sdkInstance).toBe(null);
expect(state.eligiblePaymentMethods).toBe(null);
Expand Down Expand Up @@ -221,12 +221,11 @@ describe("usePayPalInstance SSR", () => {
});

function setupSSRTestComponent() {
const state: PayPalContextState = {
const state: PayPalState = {
loadingStatus: INSTANCE_LOADING_STATE.PENDING,
sdkInstance: null,
eligiblePaymentMethods: null,
error: null,
dispatch: jest.fn(),
};

function TestComponent({
Expand Down
Loading
Loading