tools: format/order particular type of files automatically
Author: HotellCreated Aug 30, 2021Updated Sep 29, 2026
LabelsArea: Build SystemResolution: Soft Close
nx is properly re-ordering/formatting tsconfig.json.base#paths, nx.json, workspace.json after any kind of generator is invoked that creates/updates/removes a package to maintain consistency and to reduce merge conflicts.
We should extend this behaviour and introduce similar automation to our particular needs.
Candidates (we will update this list as needed):
- any
package.json(scripts,dependencies) should be sorted to follow npm/yarn ordering when modified manually or by generator - ADD ANOTHER ONE
How should this work:
- ideally during pre or push commit hook in the background
- CI should fail on any kind of violations to not get out of sync if some power user will use
--no-verifywhile running git commands
nit: This dependency should go on line 28 to maintain alphabetical order.
Originally posted by @khmakoto in https://github.com/microsoft/fluentui/pull/19517#discussion_r697619992
Source: microsoft/fluentui