Skip to content

Commit

Permalink
refactor: switch biome.js configuration to standard.js style
Browse files Browse the repository at this point in the history
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
  • Loading branch information
jerome-benoit committed Jun 21, 2024
1 parent 0785cfc commit 5d9754a
Show file tree
Hide file tree
Showing 20 changed files with 519 additions and 518 deletions.
2 changes: 1 addition & 1 deletion .lintstagedrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default {
'**/*.{ts,tsx,js,jsx,cjs,mjs,json,jsonc}': ['biome check --apply'],
'**/*.{md,yml,yaml}': ['prettier --cache --write'],
};
}
2 changes: 2 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
"javascript": {
"formatter": {
"quoteStyle": "single",
"trailingCommas": "es5",
"semicolons": "asNeeded",
"arrowParentheses": "asNeeded"
}
},
Expand Down
18 changes: 9 additions & 9 deletions bundle.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { existsSync, rmSync } from 'node:fs';
import { build } from 'bun';
import { existsSync, rmSync } from 'node:fs'
import { build } from 'bun'

export const entryPoints = ['./src/index.js'];
export const entryPoints = ['./src/index.js']

export const baseBuildDir = './dist';
export const browserBuildDir = `${baseBuildDir}/browser`;
export const baseBuildDir = './dist'
export const browserBuildDir = `${baseBuildDir}/browser`

console.time('Browser build time');
console.time('Browser build time')
if (existsSync(browserBuildDir)) {
rmSync(browserBuildDir, { recursive: true });
rmSync(browserBuildDir, { recursive: true })
}

await build({
Expand All @@ -17,5 +17,5 @@ await build({
target: 'browser',
minify: true,
sourcemap: 'external',
});
console.timeEnd('Browser build time');
})
console.timeEnd('Browser build time')
2 changes: 1 addition & 1 deletion commitlint.config.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default { extends: ['@commitlint/config-conventional'] };
export default { extends: ['@commitlint/config-conventional'] }
6 changes: 3 additions & 3 deletions prepare.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { env } from 'node:process';
import { env } from 'node:process'

const isCIEnvironment = env.CI != null;
const isCIEnvironment = env.CI != null
if (isCIEnvironment === false) {
import('husky')
.then(husky => console.warn(husky.default()))
.catch(console.error);
.catch(console.error)
}
Loading

0 comments on commit 5d9754a

Please sign in to comment.