fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

tools: format/order particular type of files automatically

Open Hotell opened this issue 4 years ago • 13 comments

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-verify while 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

Hotell avatar Aug 30 '21 18:08 Hotell