Skip to content
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

Merged
merged 16 commits into from
Feb 27, 2020
Merged

Upgrade sort-package-json and enforce it in lint #1256

merged 16 commits into from
Feb 27, 2020

Conversation

tylerbutler
Copy link
Member

@tylerbutler tylerbutler commented Feb 17, 2020

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 layout
  • sort:lint:min - minimal linting for running in CI; called in the primary lint task
  • sort:lint:fix - auto-fixes sorting errors; called in the primary lint:fix task

@tylerbutler tylerbutler added the area: build Build related issues label Feb 17, 2020
@@ -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";
Copy link
Contributor

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?

Copy link
Member Author

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: build Build related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants