Skip to content

Commit abf9d5c

Browse files
committed
fixing
1 parent 66be7f9 commit abf9d5c

5 files changed

Lines changed: 10 additions & 21 deletions

File tree

packages/modal/babel.config.cjs

Lines changed: 0 additions & 7 deletions
This file was deleted.

packages/modal/eslint.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
import baseConfig from "@magic/eslint-config/base";
22

33
/** @type {import('typescript-eslint').Config} */
4-
export default [{ ignores: [] }, ...baseConfig];
4+
export default [...baseConfig];

packages/modal/src/components/MagicModalProvider.tsx

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,15 @@ import { MagicModalHideReason } from "../constants/types";
66
const MagicModalContext = React.createContext<{
77
hide: HookHideFunction;
88
}>({
9-
hide: async () => {},
10-
});
11-
12-
export const useInternalMagicModal = () => {
13-
const context = React.useContext(MagicModalContext);
14-
15-
if (!context) {
9+
hide: () => {
1610
throw new Error(
17-
"useInternalMagicModal must be used within a MagicModalProvider",
11+
"MagicModal.hide() was called outside of MagicModalProvider",
1812
);
19-
}
13+
},
14+
});
2015

21-
return context;
16+
export const useInternalMagicModal = () => {
17+
return React.useContext(MagicModalContext);
2218
};
2319

2420
/**

packages/modal/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"extends": ["expo/tsconfig.base", "@magic/tsconfig/base.json"],
33
"exclude": ["node_modules"],
4-
"include": ["src"],
4+
"include": ["src", ".release-it.cjs", "eslint.config.js", "jest.config.cjs"],
55
"compilerOptions": {
66
"jsx": "react-native",
77
"outDir": "dist",

tools/eslint/base.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const baseConfig = tseslint.config(
3434
},
3535
},
3636
{
37-
files: ["**/*.{js,jsx,ts,tsx}"],
37+
files: ["**/*.{cjs,js,jsx,ts,tsx}"],
3838
plugins: {
3939
"@typescript-eslint": typescript,
4040
"unused-imports": unusedImports,
@@ -196,9 +196,9 @@ const baseConfig = tseslint.config(
196196
},
197197
{
198198
ignores: [
199+
"**/node_modules/**",
199200
"node_modules/**",
200201
"dist/**",
201-
"playwright-report/**",
202202
"test-results/**",
203203
],
204204
},

0 commit comments

Comments
 (0)