Skip to content

Commit c33cd6e

Browse files
authored
chore: enable prettier for json and reformat (#663)
* chore: enable prettier for json and reformat * fix(prettier): leave renovate config alone and format all files in precommit
1 parent d7fd5a9 commit c33cd6e

File tree

24 files changed

+280
-277
lines changed

24 files changed

+280
-277
lines changed

.changeset/config.json

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
{
2-
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3-
"changelog": ["@svitejs/changesets-changelog-github-compact", { "repo": "sveltejs/vite-plugin-svelte" }],
4-
"commit": false,
5-
"linked": [],
6-
"access": "public",
7-
"baseBranch": "main",
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": [
4+
"@svitejs/changesets-changelog-github-compact",
5+
{ "repo": "sveltejs/vite-plugin-svelte" }
6+
],
7+
"commit": false,
8+
"linked": [],
9+
"access": "public",
10+
"baseBranch": "main",
811
"bumpVersionsWithWorkspaceProtocolOnly": true,
9-
"ignore": ["!(@sveltejs/*)"]
12+
"ignore": ["!(@sveltejs/*)"]
1013
}
11-

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: "\U0001F41E Bug report"
22
description: for reproducible bugs in vite-plugin-svelte only.
3-
labels: ["bug", "triage"]
3+
labels: ['bug', 'triage']
44
body:
55
- type: markdown
66
attributes:
@@ -43,4 +43,3 @@ body:
4343
placeholder: System, Binaries, Browsers
4444
validations:
4545
required: true
46-

.prettierrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ module.exports = {
1414
options: { parser: 'typescript' }
1515
},
1616
{
17-
files: '**/CHANGELOG.md',
17+
files: ['**/CHANGELOG.md', '.github/renovate.json5'],
1818
options: {
1919
requirePragma: true
2020
}

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"check:publint": "pnpm --filter \"./packages/*\" --parallel check:publint",
1212
"check:types": "pnpm --filter \"./packages/*\" --parallel check:types",
1313
"check:lint": "eslint --cache --ignore-path .gitignore '**/*.{js,ts,svelte,html,svx,md}'",
14-
"check:format": "prettier --cache --ignore-path .gitignore '**/*.{css,scss,svelte,html,js,ts,svx,md}' --check",
14+
"check:format": "prettier --cache --ignore-path .gitignore . --ignore-unknown --check",
1515
"lint": "pnpm check:lint --fix",
1616
"format": "pnpm check:format --write",
1717
"fixup": "run-s lint format",
@@ -53,8 +53,8 @@
5353
},
5454
"lint-staged": {
5555
"*.{js,ts,svelte,html,md,svx}": "eslint --cache --fix",
56-
"*.{css,scss,svelte,html,js,ts,svx,md}": [
57-
"prettier --cache --write"
56+
"*": [
57+
"prettier --cache --ignore-unknown --write"
5858
]
5959
},
6060
"packageManager": "[email protected]",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module.exports = {
22
cjs_and_esm: () => 'cjs'
3-
}
3+
};
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
export function cjs_and_esm() { return 'esm' };
1+
export function cjs_and_esm() {
2+
return 'esm';
3+
}

packages/e2e-tests/_test_dependencies/cjs-and-esm/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"index.mjs",
99
"index.cjs"
1010
],
11-
"exports":{
11+
"exports": {
1212
".": {
1313
"import": "./index.mjs",
1414
"require": "./index.cjs"

packages/e2e-tests/_test_dependencies/esm-only/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"files": [
77
"esm.js"
88
],
9-
"exports":{
9+
"exports": {
1010
".": {
1111
"import": "./esm.js"
1212
},

packages/e2e-tests/_test_dependencies/svelte-exports-simple/package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99
"files": [
1010
"src",
1111
"index.js",
12-
"index.svelte.js"
12+
"index.svelte.js"
1313
],
14-
"svelte": "./index.svelte.js",
15-
"exports": {
16-
"./*": {
17-
"svelte": "./src/components/*"
18-
},
19-
".": {
20-
"svelte": "./index.js"
21-
}
22-
}
14+
"svelte": "./index.svelte.js",
15+
"exports": {
16+
"./*": {
17+
"svelte": "./src/components/*"
18+
},
19+
".": {
20+
"svelte": "./index.js"
21+
}
22+
}
2323
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
console.log('default svelte config loaded')
1+
console.log('default svelte config loaded');
22
module.exports = {};

0 commit comments

Comments
 (0)