Skip to content

Commit 9405ddf

Browse files
committed
style: use dprint for formatting
1 parent 07873ea commit 9405ddf

File tree

10 files changed

+235
-858
lines changed

10 files changed

+235
-858
lines changed

bun.lock

Lines changed: 27 additions & 722 deletions
Large diffs are not rendered by default.

dprint.json

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"useTabs": true,
3+
"typescript": {
4+
"semiColons": "asi",
5+
"quoteStyle": "preferSingle"
6+
},
7+
"markup": {
8+
"printWidth": 100,
9+
"preferAttrsSingleLine": true,
10+
"vBindStyle": "short",
11+
"vOnStyle": "short",
12+
"vForDelimiterStyle": "in",
13+
"vSlotStyle": "vSlot",
14+
"vBindSameNameShortHand": true,
15+
"component.selfClosing": true,
16+
"html.normal.selfClosing": true,
17+
"html.void.selfClosing": true,
18+
"svg.selfClosing": true,
19+
"formatComments": true
20+
},
21+
"exec": {
22+
"cwd": "${configDir}",
23+
"commands": [{
24+
"command": "rustfmt",
25+
"exts": ["rs"]
26+
}, {
27+
"command": "./vendor/bin/mago fmt --stdin-input",
28+
"exts": ["php"]
29+
}]
30+
},
31+
"excludes": [
32+
"**/node_modules",
33+
"**/*-lock.json",
34+
"**/vendor"
35+
],
36+
"plugins": [
37+
"https://plugins.dprint.dev/typescript-0.95.7.wasm",
38+
"https://plugins.dprint.dev/json-0.20.0.wasm",
39+
"https://plugins.dprint.dev/markdown-0.18.0.wasm",
40+
"https://plugins.dprint.dev/toml-0.7.0.wasm",
41+
"https://plugins.dprint.dev/g-plane/malva-v0.12.1.wasm",
42+
"https://plugins.dprint.dev/g-plane/markup_fmt-v0.22.0.wasm",
43+
"https://plugins.dprint.dev/g-plane/pretty_yaml-v0.5.1.wasm",
44+
"https://plugins.dprint.dev/exec-0.5.1.json@492414e39dea4dccc07b4af796d2f4efdb89e84bae2bd4e1e924c0cc050855bf"
45+
]
46+
}

eslint.config.mjs

Lines changed: 0 additions & 10 deletions
This file was deleted.

package.json

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,22 @@
11
{
2-
"private": true,
3-
"workspaces": [
4-
"packages/*"
5-
],
6-
"scripts": {
7-
"qa": "bun lint:fix && bun run test run && bun run build",
8-
"lint": "eslint packages/vite-plugin-tempest",
9-
"lint:fix": "eslint --fix packages/vite-plugin-tempest",
10-
"build": "bun --filter '*' build",
11-
"dev": "bun --filter '*' build:stub",
12-
"test": "vitest"
13-
},
14-
"devDependencies": {
15-
"@innocenzi/eslint-config": "^0.22.6",
16-
"@types/bun": "latest",
17-
"bumpp": "^10.0.1",
18-
"eslint": "^9.19.0",
19-
"typescript": "^5.7.3",
20-
"unbuild": "^3.3.1",
21-
"vite-plugin-tempest": "workspace:*",
22-
"vitest": "^3.0.4"
23-
}
2+
"private": true,
3+
"workspaces": [
4+
"packages/*"
5+
],
6+
"scripts": {
7+
"qa": "bun fmt && bun run test run && bun run build",
8+
"fmt": "dprint fmt ./packages/vite-plugin-tempest/**/*.{ts,vue,json}",
9+
"build": "bun --filter '*' build",
10+
"dev": "bun --filter '*' build:stub",
11+
"test": "vitest"
12+
},
13+
"devDependencies": {
14+
"@types/bun": "latest",
15+
"bumpp": "^10.0.1",
16+
"dprint": "^0.50.0",
17+
"typescript": "^5.7.3",
18+
"unbuild": "^3.3.1",
19+
"vite-plugin-tempest": "workspace:*",
20+
"vitest": "^3.0.4"
21+
}
2422
}
Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
11
{
2-
"name": "vite-plugin-tempest",
3-
"type": "module",
4-
"version": "1.0.0-beta.1",
5-
"author": "Enzo Innocenzi",
6-
"license": "MIT",
7-
"sideEffects": false,
8-
"exports": {
9-
".": {
10-
"types": "./dist/index.d.ts",
11-
"import": "./dist/index.mjs"
12-
}
13-
},
14-
"main": "./dist/index.mjs",
15-
"module": "./dist/index.mjs",
16-
"types": "./dist/index.d.ts",
17-
"files": [
18-
"*.d.ts",
19-
"dist"
20-
],
21-
"scripts": {
22-
"build": "unbuild",
23-
"build:stub": "unbuild --stub",
24-
"prepublishOnly": "bun run test && bun run build",
25-
"test": "vitest run",
26-
"test:watch": "vitest"
27-
},
28-
"peerDependencies": {
29-
"typescript": "^5.0.0",
30-
"vite": "^6.0.3"
31-
},
32-
"dependencies": {
33-
"@innocenzi/utils": "^0.3.0",
34-
"picocolors": "^1.1.1"
35-
}
2+
"name": "vite-plugin-tempest",
3+
"type": "module",
4+
"version": "1.0.0-beta.1",
5+
"author": "Enzo Innocenzi",
6+
"license": "MIT",
7+
"sideEffects": false,
8+
"exports": {
9+
".": {
10+
"types": "./dist/index.d.ts",
11+
"import": "./dist/index.mjs"
12+
}
13+
},
14+
"main": "./dist/index.mjs",
15+
"module": "./dist/index.mjs",
16+
"types": "./dist/index.d.ts",
17+
"files": [
18+
"*.d.ts",
19+
"dist"
20+
],
21+
"scripts": {
22+
"build": "unbuild",
23+
"build:stub": "unbuild --stub",
24+
"prepublishOnly": "bun run test && bun run build",
25+
"test": "vitest run",
26+
"test:watch": "vitest"
27+
},
28+
"peerDependencies": {
29+
"typescript": "^5.0.0",
30+
"vite": "^6.0.3"
31+
},
32+
"dependencies": {
33+
"@innocenzi/utils": "^0.3.0",
34+
"picocolors": "^1.1.1"
35+
}
3636
}

packages/vite-plugin-tempest/src/plugin.test.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,11 @@ describe('tempest', () => {
3636

3737
expect(config.base).toBe('/build/custom/')
3838
expect(config.build.manifest).toBe('custom-manifest.json')
39-
expect(config.build.rollupOptions).toEqual({ input: [
40-
'src/main.ts',
41-
] })
39+
expect(config.build.rollupOptions).toEqual({
40+
input: [
41+
'src/main.ts',
42+
],
43+
})
4244
})
4345

4446
it("respects the user's server.cors config", async () => {
@@ -62,7 +64,8 @@ describe('tempest', () => {
6264
it('configures default cors.origin values', async () => {
6365
mockTempestConfiguration()
6466

65-
const test = (pattern: RegExp | string, value: string) => pattern instanceof RegExp ? pattern.test(value) : pattern === value
67+
const test = (pattern: RegExp | string, value: string) =>
68+
pattern instanceof RegExp ? pattern.test(value) : pattern === value
6669
fs.writeFileSync(path.join(__dirname, '.env'), 'APP_URL=http://example.com')
6770

6871
const plugin = tempest()

0 commit comments

Comments
 (0)