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

style: Apply prettier config consistently #2063

Merged
merged 5 commits into from
Dec 5, 2020
Merged

style: Apply prettier config consistently #2063

merged 5 commits into from
Dec 5, 2020

Conversation

kriskowal
Copy link
Member

This change regularizes the use of the prettier config block in package.json, demonstrating that all packages already lint properly with this configuration.

This also sets regularizes lint in dapp-svelte-wallet/api.

@kriskowal
Copy link
Member Author

@katelynsills This change brings Agoric SDK into alignment with the companion change endojs/endo#538 but is almost a noöp for style. Welcome feedback would be to abandon this and use .prettierrc in SES-shim instead. Though, I think you previously expressed favor for doing more in package.json. Either way, I think the next level of polish would be to make an @agoric/dev dependency that in turn draws upon @agoric/eslint-config and the other common tooling like ava and rollup, and a bin that we can use to incrementally rescaffold package.json to bring these into alignment, possibly as a postinstall hook.

Copy link
Contributor

@katelynsills katelynsills left a comment

Choose a reason for hiding this comment

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

Looks good to me! Did you happen to try Michael's solution of including a .prettierrc at the top level?

@@ -1902,6 +1902,16 @@ array.prototype.flat@^1.2.1, array.prototype.flat@^1.2.3:
define-properties "^1.1.3"
es-abstract "^1.17.0-next.1"

array.prototype.flatmap@^1.2.3:
Copy link
Contributor

@katelynsills katelynsills Dec 4, 2020

Choose a reason for hiding this comment

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

huh do you know why we have so many new entries in the lock file? Not important, but I'm just curious. I would have thought this would be the same or a reduction.

Copy link
Member Author

Choose a reason for hiding this comment

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

This does suggest something went wrong. I’ll look into it.

@kriskowal
Copy link
Member Author

Looks good to me! Did you happen to try Michael's solution of including a .prettierrc at the top level?

I did not. It would probably work, as it did for .eslintrc in the SES-shim. Decided not to go that way with .eslintrc since we can’t package that solution. We can’t package prettier anyway, so it might make sense to go a different way.

I think that we need a prettier config block that is redundant with the eslint config, when eslint is driving prettier, is itself a bug and I’m wondering whether we’ll need any prettier config at all after we upgrade.

@kriskowal
Copy link
Member Author

My best guess for the reason for the lockfile growth is that the eslint dependencies were previously only devDependencies in multiple packages. They do have to be promoted for this arrangement, since the devDependencies of devDependencies don’t get entrained.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants