diff --git a/package.json b/package.json index e54aa3f..8890c37 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "lint": "pnpm -r --parallel lint", "prettier": "prettier --check .", "prettier-fix": "prettier --write .", - "typecheck": "tsc --noEmit" + "typecheck": "pnpm -r --parallel typecheck" }, "files": [ "dist" @@ -31,4 +31,4 @@ "eslint": "^8.56.0", "prettier": "^3.2.4" } -} +} \ No newline at end of file diff --git a/plugin/src/utils/helpers.ts b/plugin/src/utils/helpers.ts index 9241280..c7a2f92 100644 --- a/plugin/src/utils/helpers.ts +++ b/plugin/src/utils/helpers.ts @@ -16,7 +16,7 @@ import { type Node, } from './nodes' -export const getAncestor = (ofType: (node: Node) => node is N, for_: Node): N => { +export const getAncestor = (ofType: (node: Node) => node is N, for_: Node): N | undefined => { let current: Node | undefined = for_.parent while (current) { if (ofType(current)) return current diff --git a/sandbox/package.json b/sandbox/package.json index 91b34b1..99e20bb 100644 --- a/sandbox/package.json +++ b/sandbox/package.json @@ -8,7 +8,8 @@ "dev": "vite", "build": "tsc && vite build", "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", - "preview": "vite preview" + "preview": "vite preview", + "typecheck": "tsc --noEmit" }, "dependencies": { "@pandacss/eslint-plugin": "workspace:*", @@ -29,4 +30,4 @@ "vite": "^5.0.12", "vite-plugin-eslint": "^1.8.1" } -} +} \ No newline at end of file diff --git a/tsconfig.build.json b/tsconfig.build.json index c7f5c03..60d581f 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -7,7 +7,11 @@ "esModuleInterop": true, "jsx": "preserve", "noEmit": true, - "lib": ["dom", "dom.iterable", "esnext"], + "lib": [ + "dom", + "dom.iterable", + "esnext" + ], "target": "esnext", "noImplicitReturns": false, "resolveJsonModule": true, @@ -16,6 +20,8 @@ "verbatimModuleSyntax": true, "moduleResolution": "Bundler", "module": "ESNext", - "customConditions": ["source"] + "customConditions": [ + "source" + ], } -} +} \ No newline at end of file