Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add fix lint script #143

Merged
merged 1 commit into from
Oct 3, 2024
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
36 changes: 16 additions & 20 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
{
"name": "Node.js",
// Image definition
"image": "mcr.microsoft.com/devcontainers/typescript-node:20",
// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
// Set *default* container specific settings.json values on container create.
"settings": {},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"github.vscode-github-actions",
"oven.bun-vscode"
]
}
},
"postCreateCommand": "curl -fsSL https://bun.sh/install | bash"
}

"name": "Node.js",
// Image definition
"image": "mcr.microsoft.com/devcontainers/typescript-node:20",
// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
// Set *default* container specific settings.json values on container create.
"settings": {},

// Add the IDs of extensions you want installed when the container is created.
"extensions": ["github.vscode-github-actions", "oven.bun-vscode"]
}
},
"postCreateCommand": "curl -fsSL https://bun.sh/install | bash"
}
8 changes: 7 additions & 1 deletion biome.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://biomejs.dev/schemas/1.6.0/schema.json",
"$schema": "https://biomejs.dev/schemas/1.9.0/schema.json",
"organizeImports": {
"enabled": true
},
Expand All @@ -12,5 +12,11 @@
"formatter": {
"formatWithErrors": true,
"indentStyle": "space"
},
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true,
"defaultBranch": "main"
}
}
8 changes: 3 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@
"lint": "npm run lint:lib && npm run lint:exports && npm run lint:package",
"lint:lib": "biome check src/*.ts",
"lint:exports": "attw --pack . --ignore-rules no-resolution cjs-resolves-to-esm",
"lint:package": "publint ."
"lint:package": "publint .",
"lint:fix": "biome check --write --unsafe"
},
"files": [
"dist",
"package.json"
],
"files": ["dist", "package.json"],
"exports": {
".": {
"types": "./dist/index.d.ts",
Expand Down
34 changes: 17 additions & 17 deletions scripts/prerelease.ts
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
import { EOL } from "node:os";

interface Manifest {
name: string;
version: string;
license: string;
name: string;
version: string;
license: string;
}

interface JsrManifest extends Manifest{
exports: string;
interface JsrManifest extends Manifest {
exports: string;
}

const jsr = Bun.file("./jsr.json", { type: "application/json" });
const jsrContent: Pick<JsrManifest, 'license'> = await jsr.json();
const jsrContent: Pick<JsrManifest, "license"> = await jsr.json();
const pkg = Bun.file("./package.json", { type: "application/json" });
const pkgContent: Manifest = await pkg.json();

await Bun.write(
jsr,
`${JSON.stringify(
{
...jsrContent,
name: pkgContent.name,
version: pkgContent.version,
license: pkgContent.license,
},
null,
2
)}${EOL}`
jsr,
`${JSON.stringify(
{
...jsrContent,
name: pkgContent.name,
version: pkgContent.version,
license: pkgContent.license,
},
null,
2,
)}${EOL}`,
);
6 changes: 1 addition & 5 deletions tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
{
"extends": "./tsconfig.json",
"exclude": [
"node_modules",
"dist",
"src/*.test.ts"
]
"exclude": ["node_modules", "dist", "src/*.test.ts"]
}