-
Notifications
You must be signed in to change notification settings - Fork 535
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade sort-package-json and enforce it in lint #1256
Upgrade sort-package-json and enforce it in lint #1256
Conversation
tools/fluid-build/src/npmPackage.ts
Outdated
@@ -7,7 +7,7 @@ import { queue } from "async"; | |||
import * as chalk from "chalk"; | |||
import * as fs from "fs"; | |||
import * as path from "path"; | |||
import { sortPackageJson } from "sort-package-json"; | |||
import sortPackageJson from "sort-package-json"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the reason for this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's because the typings changed in the new version, but I don't quite understand how that all works and all the import syntaxes. Without this change tsc -b
failed.
@curtisman Can you explain the difference between the two imports above?
This initial iteration should fail the CI lint run. Once confirmed, a second iteration will correct the build break.All PR builds pass.This PR upgrades the version of sort-package-json to the latest, but it remains pinned. New npm tasks are added to support linting and lint auto-fixing.
Relevant NPM tasks
sort:lint
- checks that all package.json files are sorted; this task is designed to be run locally given the current repo layoutsort:lint:min
- minimal linting for running in CI; called in the primarylint
tasksort:lint:fix
- auto-fixes sorting errors; called in the primarylint:fix
task