Skip to content

Commit

Permalink
Quality fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
anubra266 committed Jan 23, 2024
1 parent 1a5e199 commit 4eab304
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 8 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -31,4 +31,4 @@
"eslint": "^8.56.0",
"prettier": "^3.2.4"
}
}
}
2 changes: 1 addition & 1 deletion plugin/src/utils/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
type Node,
} from './nodes'

export const getAncestor = <N extends Node>(ofType: (node: Node) => node is N, for_: Node): N => {
export const getAncestor = <N extends Node>(ofType: (node: Node) => node is N, for_: Node): N | undefined => {
let current: Node | undefined = for_.parent
while (current) {
if (ofType(current)) return current
Expand Down
5 changes: 3 additions & 2 deletions sandbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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:*",
Expand All @@ -29,4 +30,4 @@
"vite": "^5.0.12",
"vite-plugin-eslint": "^1.8.1"
}
}
}
12 changes: 9 additions & 3 deletions tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -16,6 +20,8 @@
"verbatimModuleSyntax": true,
"moduleResolution": "Bundler",
"module": "ESNext",
"customConditions": ["source"]
"customConditions": [
"source"
],
}
}
}

0 comments on commit 4eab304

Please sign in to comment.