-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Support for Polygon, Add Typecheck and Formatcheck github workflo…
…ws (#6) * Add Support for Polygon, Add Typecheck and Formatcheck github workflows * fix name inside typecheck yml
- Loading branch information
Showing
8 changed files
with
148 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Format Check | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
format-check: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '22' | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Run format check | ||
run: npm run format:check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Type Check | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
type-check: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "22" | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Run format check | ||
run: npx tsc --noEmit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"$schema": "https://biomejs.dev/schemas/1.7.3/schema.json", | ||
"organizeImports": { | ||
"enabled": true | ||
}, | ||
"formatter": { | ||
"enabled": true, | ||
"indentStyle": "space" | ||
}, | ||
"javascript": { | ||
"formatter": { | ||
"jsxQuoteStyle": "double", | ||
"quoteProperties": "asNeeded", | ||
"trailingCommas": "all", | ||
"semicolons": "asNeeded", | ||
"arrowParentheses": "always", | ||
"bracketSpacing": true, | ||
"bracketSameLine": false | ||
} | ||
}, | ||
"linter": { | ||
"enabled": true, | ||
"rules": { | ||
"recommended": true, | ||
"suspicious": { | ||
"noExplicitAny": "off" | ||
}, | ||
"style": { | ||
"noNonNullAssertion": "off", | ||
"useFilenamingConvention": { | ||
"level": "error", | ||
"options": { | ||
"strictCase": true, | ||
"requireAscii": true, | ||
"filenameCases": ["kebab-case", "export"] | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { JsCadFixture } from "../lib/components/jscad-fixture" | ||
import { Polygon } from "../lib/jscad-fns/polygon" | ||
|
||
export default () => ( | ||
<JsCadFixture wireframe> | ||
<Polygon | ||
points={[ | ||
[-2, -1], | ||
[2, -1], | ||
[2.5, 2], | ||
[1, 1], | ||
[0, 2], | ||
[-1, 1], | ||
[-2, 2], | ||
]} | ||
/> | ||
</JsCadFixture> | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export type PolygonProps = { | ||
points: [number, number][] | ||
} | ||
|
||
export function Polygon({ points }: PolygonProps) { | ||
return <jscadpolygon points={points} /> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters