diff --git a/.prettierignore b/.prettierignore index 48142ea..aa274d3 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,2 +1,3 @@ **/*.md **/dist/*.* +pnpm-lock.yaml diff --git a/package.json b/package.json index 744533d..f93d843 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "build:fix": "esno scripts/postbuild.ts", "build:all": "npm run build:popup && npm run build:plugin && cp -r src/overlay-layout dist", "dev:playground": "npm -C popup run dev & npm -C playground run dev", - "lint": "eslint . --config .eslintrc.cjs", + "lint:fix": "eslint . --config .eslintrc.cjs && prettier --write -c .", "release": "npm run build:all && bumpp && npm publish", "test": "vitest", "prepare": "husky install" diff --git a/popup/.prettierrc.json b/popup/.prettierrc.json index 66e2335..ecdf3e0 100644 --- a/popup/.prettierrc.json +++ b/popup/.prettierrc.json @@ -5,4 +5,4 @@ "singleQuote": true, "printWidth": 100, "trailingComma": "none" -} \ No newline at end of file +} diff --git a/popup/postcss.config.js b/popup/postcss.config.js index 2e7af2b..2b75bd8 100644 --- a/popup/postcss.config.js +++ b/popup/postcss.config.js @@ -1,6 +1,6 @@ export default { plugins: { tailwindcss: {}, - autoprefixer: {}, - }, + autoprefixer: {} + } } diff --git a/scripts/postbuild.ts b/scripts/postbuild.ts index 5481f07..10351f4 100644 --- a/scripts/postbuild.ts +++ b/scripts/postbuild.ts @@ -9,7 +9,7 @@ async function run() { const files = await fg('*.cjs', { ignore: ['chunk-*'], absolute: true, - cwd: resolve(dirname(fileURLToPath(import.meta.url)), '../dist'), + cwd: resolve(dirname(fileURLToPath(import.meta.url)), '../dist') }) for (const file of files) { console.log(chalk.cyan.inverse(' POST '), `Fix ${basename(file)}`) diff --git a/src/index.ts b/src/index.ts index f2e3c7b..537176b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -6,9 +6,9 @@ import sirv from 'sirv' import { resolve, dirname } from 'node:path' import { fileURLToPath } from 'node:url' -export const unpluginFactory: UnpluginFactory< - Options | undefined -> = options => { +export const unpluginFactory: UnpluginFactory = ( + options +) => { return { name: 'unplugin-overlay-layout', enforce: 'pre', diff --git a/tsup.config.ts b/tsup.config.ts index fc57fa9..282e807 100644 --- a/tsup.config.ts +++ b/tsup.config.ts @@ -1,11 +1,9 @@ import type { Options } from 'tsup' export default { - entryPoints: [ - 'src/*.ts', - ], + entryPoints: ['src/*.ts'], clean: true, format: ['cjs', 'esm'], dts: true, - onSuccess: 'npm run build:fix', + onSuccess: 'npm run build:fix' }