Skip to content

Commit 75090d6

Browse files
authored
chore(docs): add scripts and update readme, fix linting error (#107)
1 parent d9be9f0 commit 75090d6

File tree

3 files changed

+38
-2
lines changed

3 files changed

+38
-2
lines changed

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,39 @@ ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
257257

258258
```
259259

260+
## Development
261+
262+
### Install dependencies
263+
264+
```bash
265+
pnpm install
266+
```
267+
268+
### Run tests
269+
```bash
270+
pnpm test
271+
```
272+
273+
### Run linter
274+
```bash
275+
pnpm lint
276+
```
277+
278+
### Run linter and fix
279+
```bash
280+
pnpm lint:fix
281+
```
282+
283+
### Update snapshots
284+
```bash
285+
pnpm snapshot
286+
```
287+
288+
### Build example and validate generated code
289+
```bash
290+
npm run build && pnpm --filter @7nohe/react-app generate:api && pnpm --filter @7nohe/react-app test:generated
291+
```
292+
260293
## License
261294

262295
MIT

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,13 @@
99
"workspaces": ["examples/*"],
1010
"scripts": {
1111
"build": "rimraf dist && tsc -p tsconfig.json",
12+
"lint": "biome check .",
13+
"lint:fix": "biome check --apply .",
1214
"preview": "npm run build && npm -C examples/react-app run generate:api",
1315
"prepublishOnly": "npm run build",
1416
"release": "npx git-ensure -a && npx bumpp --commit --tag --push",
15-
"test": "vitest --coverage.enabled true"
17+
"test": "vitest --coverage.enabled true",
18+
"snapshot": "vitest --update"
1619
},
1720
"repository": {
1821
"type": "git",

src/createImports.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export const createImports = ({
4646
ts.factory.createImportSpecifier(
4747
true,
4848
undefined,
49-
ts.factory.createIdentifier("QueryClient")
49+
ts.factory.createIdentifier("QueryClient"),
5050
),
5151
ts.factory.createImportSpecifier(
5252
false,

0 commit comments

Comments
 (0)