You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d3703fd
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: .agents/skills/migrate-to-rstack-cli/references/prettier.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,8 @@ Read this reference when the project uses the `prettier` CLI or API, `package.js
15
15
7. Delete old config and ignore files only after their behavior is represented in `define.fmt`.
16
16
8. Remove direct dependencies only when no script, config, API call, plugin peer requirement, or other tool still needs them.
17
17
18
+
`rs fmt` ignores `package-lock.json` and `pnpm-lock.yaml` by default. Drop redundant ignore entries during migration, but keep intentional negations.
19
+
18
20
`rs fmt` does not read Prettier configuration files, `.prettierignore`, or `.editorconfig`.
19
21
20
22
Keep `.editorconfig` when editors or other tools use it. Keep Prettier when application code uses APIs such as `prettier.format()`; `rs fmt` is not a drop-in replacement for the programmatic API.
Copy file name to clipboardExpand all lines: website/docs/en/guide/formatting.mdx
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -85,6 +85,20 @@ define.fmt({
85
85
86
86
Patterns follow Gitignore syntax and are resolved relative to the directory containing the Rstack configuration file. Because they are applied after the files are selected, they also exclude files passed explicitly on the command line.
87
87
88
+
### Lock files
89
+
90
+
By default, `rs fmt` ignores common lock files, including `package-lock.json` and `pnpm-lock.yaml`.
91
+
92
+
To format these files, use a negated pattern to explicitly include them:
93
+
94
+
```ts title="rstack.config.ts"
95
+
import { define } from'rstack';
96
+
97
+
define.fmt({
98
+
ignorePatterns: ['!pnpm-lock.yaml'],
99
+
});
100
+
```
101
+
88
102
## Sort package.json fields \{#sort-package-json}
89
103
90
104
Enable `sortPackageJson` to sort fields in each selected `package.json` with [`sort-package-json`](https://github.com/keithamus/sort-package-json):
0 commit comments