Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -137,3 +137,5 @@ dist
demo/tsp-output
demo/demo-entities
demo/package-lock.json
build
dist
20 changes: 12 additions & 8 deletions biome.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"$schema": "https://biomejs.dev/schemas/2.3.8/schema.json",
"vcs": {
"enabled": false,
"enabled": true,
"clientKind": "git",
"useIgnoreFile": false
"useIgnoreFile": true
},
"files": {
"ignoreUnknown": false,
"ignore": []
"ignoreUnknown": false
},
"formatter": {
"enabled": true,
"indentStyle": "tab"
},
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
Expand All @@ -26,5 +22,13 @@
"formatter": {
"quoteStyle": "double"
}
},
"assist": {
"enabled": true,
"actions": {
"source": {
"organizeImports": "on"
}
}
}
}
7 changes: 0 additions & 7 deletions demo/index.ts

This file was deleted.

26 changes: 0 additions & 26 deletions demo/package.json

This file was deleted.

7 changes: 0 additions & 7 deletions demo/tspconfig.yaml

This file was deleted.

11 changes: 0 additions & 11 deletions eslint.config.js

This file was deleted.

73 changes: 36 additions & 37 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"devDependencies": {
"@babel/types": "^7.27.6",
"@biomejs/biome": "1.9.4",
"@biomejs/biome": "^2.3.8",
"@types/babel__generator": "^7.27.0",
"@types/node": "latest",
"@typescript-eslint/eslint-plugin": "^8.15.0",
Expand All @@ -37,10 +37,14 @@
"scripts": {
"build": "tsc",
"watch": "tsc --watch",
"test": "npm run test:biome && npm run build && npm run test:demo",
"pretest": "npm run build",
"fix": "biome check --write",
"lint": "biome check",
"test": "npm run test:biome && npm run test:emit && npm run test:unit",
"prepublishOnly": "npm run build",
"test:biome": "biome check src",
"test:demo": "cd demo; npm i; npm run build"
"test:emit": "tsp compile test/main.tsp --config test/tspconfig.yaml",
"test:unit": "node --test test/*.test.js"
},
"dependencies": {
"@babel/generator": "^7.27.5",
Expand Down
1 change: 0 additions & 1 deletion src/decorators/$entity.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import type {
DecoratorContext,
Model,
NumericLiteral,
StringLiteral,
} from "@typespec/compiler";
import { StateKeys } from "../lib.js";
Expand Down
2 changes: 1 addition & 1 deletion src/emitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ export async function $onEmit(context: EmitContext) {
const packageName = context.options["package-name"];
const packageVersion = context.options["package-version"];

// biome-ignore lint/suspicious/noExplicitAny: <explanation>
// biome-ignore lint/suspicious/noExplicitAny: <ElecroDB Schema>
const entities: Record<string, Schema<any, any, any>> = {};

for (const [model, props] of context.program
Expand Down
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export * from "./emitter.js";
export * from "./decorators/$createdAt.js";
export * from "./decorators/$entity.js";
export * from "./decorators/$index.js";
export * from "./decorators/$createdAt.js";
export * from "./decorators/$updatedAt.js";
export * from "./decorators/$label.js";
export * from "./decorators/$updatedAt.js";
export * from "./emitter.js";
export { $lib } from "./lib.js";
2 changes: 1 addition & 1 deletion src/lib.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type JSONSchemaType, createTypeSpecLibrary } from "@typespec/compiler";
import { createTypeSpecLibrary, type JSONSchemaType } from "@typespec/compiler";
export interface EmitterOptions {
"package-name": string;
"package-version": string;
Expand Down
Loading