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

feat: stop auto-install of prettier and other config files #29

Merged
merged 2 commits into from
Mar 18, 2019

Conversation

amcgee
Copy link
Member

@amcgee amcgee commented Mar 17, 2019

Instead of auto-installing config files (.prettierrc.js, .browserslistrc, .editorconfig) whenever applying styles (which could be at an arbitrary working directory) install them explicitly with a separate command d2-style js install.

Future work:

  1. Find-up to get to the nearest package.json when installing, rather than using the working directory.
  2. Warn of out-of-date configuration when applying styles

@amcgee amcgee requested a review from varl March 17, 2019 16:29
@ismay
Copy link
Contributor

ismay commented Mar 18, 2019

@amcgee I assume you already know this one, but just in case, this is a convenient package for finding the closest package.json: https://github.com/sindresorhus/pkg-up

@varl varl merged commit 8c030b1 into master Mar 18, 2019
@varl varl deleted the feat/stop-auto-install branch March 18, 2019 11:12
@amcgee
Copy link
Member Author

amcgee commented Mar 18, 2019

@ismay yep, that's what I'd use (or the more general https://www.npmjs.com/package/find-up)

@ismay
Copy link
Contributor

ismay commented Mar 18, 2019

Ah nice, didn't know that one. Missed that you were referring to a package name in the opening comment 😋

dhis2-bot pushed a commit that referenced this pull request Mar 25, 2019
# [2.0.0](v1.7.0...v2.0.0) (2019-03-25)

### Bug Fixes

* add 'target' to blacklisted folders ([#9](#9)) ([d6170b9](d6170b9))
* add apply/check command to js ([3da7d5c](3da7d5c))
* change to debug msg ([5be1ad2](5be1ad2))
* clean up js filter mechanism ([#21](#21)) ([ece8c53](ece8c53))
* do not put a scary error message when checking files ([#27](#27)) ([4cecb27](4cecb27))
* make the messages more meaningful ([#25](#25)) ([d2ae8af](d2ae8af))
* only the apply command was properly whitelisted ([#19](#19)) ([8a7556a](8a7556a))
* only whitelist js under js subcommand ([9dc010a](9dc010a))
* reset prettier and browserslists ([d1eab91](d1eab91))
* resolve cli-style path by using dirname ([3a61532](3a61532))
* update help text ([f820a66](f820a66))
* update pre-hook ([6988cf9](6988cf9))
* use reporter from helpers-engine ([ef79104](ef79104))
* use the new release script ([#31](#31)) ([2e2e454](2e2e454))
* use two-param version for pkg to identify assets ([284ce0b](284ce0b))

### Features

* add ability to pass in files to check and apply ([2e7fcdd](2e7fcdd))
* add editorconfig ([#13](#13)) ([8b0c392](8b0c392))
* add option to not stage formatted files ([00d5bc7](00d5bc7))
* allow check/apply commands for commit msgs ([aca257f](aca257f))
* convert to @dhis2/cli format ([d95179c](d95179c))
* set an exit code if js check fails ([#18](#18)) ([3833bea](3833bea))
* stop auto-install of prettier and other config files ([#29](#29)) ([8c030b1](8c030b1))

### BREAKING CHANGES

* removes the binaries for `code-style.js` and
`commit-style.js` and instead exposes a binary named `d2-style` which is
the subcommand which the `d2` cli will use.
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 2.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

4 participants