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

Implements @monorepo-lint/expect-package-order #1

Merged
merged 2 commits into from
Dec 18, 2018

Conversation

maclockard
Copy link
Contributor

This PR adds a check for enforcing a standard order for package.json fields. Can take either an array or a function for doing doing the comparison.

message: "Incorrect order of fields in package.json",
longMessage: diff(expectedOrder, actualOrder, { expand: true }),
fixer: () => {
writeJson(packagePath, expectedPackageJson);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One day, these fixers may not run serially, so it would be better to re-read before writing the order but its probably good for now

@maclockard maclockard merged commit 4330957 into monorepolint:master Dec 18, 2018
@ericanderson ericanderson changed the title Maclockard/order package Implements @monorepo-lint/expect-package-order Dec 19, 2018
@ericanderson ericanderson added the enhancement New feature or request label Dec 19, 2018
@maclockard maclockard deleted the maclockard/order-package branch December 19, 2018 05:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants