Skip to content

Commit 0087d5e

Browse files
committed
chore: migrate repository formatting to rs fmt
1 parent 0af3478 commit 0087d5e

4 files changed

Lines changed: 12 additions & 16 deletions

File tree

.prettierignore

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

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
"type": "module",
77
"scripts": {
88
"build": "pnpm --filter './packages/**' build",
9-
"check:format": "prettier . --check --experimental-cli",
9+
"check:format": "rs fmt --check",
1010
"check:spell": "pnpm dlx cspell && heading-case",
1111
"doc": "pnpm --dir website dev",
1212
"doc:build": "node --run build && pnpm --dir website build",
13-
"format": "prettier . --write --experimental-cli && heading-case --write",
13+
"format": "rs fmt && heading-case --write",
1414
"lint": "rs lint --type-check",
1515
"prepare": "node scripts/rs.js setup",
1616
"test": "pnpm --filter './packages/**' test"

prettier.config.mjs

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

rstack.config.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,15 @@ define.lint(async () => {
3838
];
3939
});
4040

41+
define.fmt({
42+
ignorePatterns: ['**/dist/**', 'pnpm-lock.yaml'],
43+
// TODO: Enable after rs fmt supports resolving Prettier plugins from the project root.
44+
// plugins: ['prettier-plugin-packagejson'],
45+
printWidth: 100,
46+
singleQuote: true,
47+
});
48+
4149
define.staged({
42-
'*.{js,jsx,ts,tsx,mjs,cjs,mts,cts}': [
43-
'rs lint --fix',
44-
'prettier --write --experimental-cli --no-error-on-unmatched-pattern',
45-
],
46-
'*.{json,jsonc,md,mdx,css,html,yml,yaml}':
47-
'prettier --write --experimental-cli --no-error-on-unmatched-pattern',
50+
'*.{js,jsx,ts,tsx,mjs,cjs,mts,cts}': ['rs lint --fix', 'rs fmt'],
51+
'*.{json,jsonc,md,mdx,css,html,yml,yaml}': 'rs fmt',
4852
});

0 commit comments

Comments
 (0)