Skip to content

Commit

Permalink
Adds BiomeJS as linter and formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
klovaaxel committed Feb 3, 2024
1 parent b304242 commit 23dc848
Show file tree
Hide file tree
Showing 6 changed files with 809 additions and 696 deletions.
23 changes: 23 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"$schema": "https://biomejs.dev/schemas/1.5.3/schema.json",
"organizeImports": {
"enabled": true
},
"formatter": {
"enabled": true,
"formatWithErrors": true,
"indentStyle": "space",
"indentWidth": 4,
"lineWidth": 80,
"ignore": ["**/node_modules/**", "**/dist/**"]
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"style": {
"noNonNullAssertion": "off"
}
}
}
}
16 changes: 8 additions & 8 deletions build.mjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import dts from "bun-plugin-dts";

await Bun.build({
entrypoints: ["./src/combobox-framework.ts"],
outdir: "./dist",
minify: true,
plugins: [dts()],
});
import dts from "bun-plugin-dts";

await Bun.build({
entrypoints: ["./src/combobox-framework.ts"],
outdir: "./dist",
minify: true,
plugins: [dts()],
});
Binary file modified bun.lockb
Binary file not shown.
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,14 @@
},
"scripts": {
"dev": "vite",
"build": "tsc && vite build; bun run build.mjs",
"build": "bun lint; tsc && vite build; bun run build.mjs; echo \"Done! Don't forget to update the version number in package.json\"",
"build-demo": "tsc && vite build",
"build-module": "bun run build.mjs",
"preview": "vite preview"
"preview": "vite preview",
"lint": "bunx @biomejs/biome check --apply *.json; bunx @biomejs/biome check --apply src/"
},
"devDependencies": {
"@biomejs/biome": "^1.5.3",
"bun-plugin-dts": "^0.2.1",
"typescript": "^5.2.2",
"vite": "^5.0.8"
Expand Down
Loading

0 comments on commit 23dc848

Please sign in to comment.