Skip to content

Commit

Permalink
style: lint & format all file
Browse files Browse the repository at this point in the history
  • Loading branch information
motea927 committed Jan 15, 2024
1 parent 9a5357e commit bd40d48
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 12 deletions.
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
**/*.md
**/dist/*.*
pnpm-lock.yaml
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion popup/.prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
"singleQuote": true,
"printWidth": 100,
"trailingComma": "none"
}
}
4 changes: 2 additions & 2 deletions popup/postcss.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
autoprefixer: {}
}
}
2 changes: 1 addition & 1 deletion scripts/postbuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)}`)
Expand Down
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 | undefined> = (
options
) => {
return {
name: 'unplugin-overlay-layout',
enforce: 'pre',
Expand Down
6 changes: 2 additions & 4 deletions tsup.config.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import type { Options } from 'tsup'

export default <Options>{
entryPoints: [
'src/*.ts',
],
entryPoints: ['src/*.ts'],
clean: true,
format: ['cjs', 'esm'],
dts: true,
onSuccess: 'npm run build:fix',
onSuccess: 'npm run build:fix'
}

0 comments on commit bd40d48

Please sign in to comment.