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

fix: ignore .yarn directory #392

Merged
merged 1 commit into from
May 6, 2021
Merged

fix: ignore .yarn directory #392

merged 1 commit into from
May 6, 2021

Conversation

varl
Copy link
Contributor

@varl varl commented May 6, 2021

No description provided.

@HendrikThePendric
Copy link
Contributor

I'll update dhis2/ui#580 once this gets released.

@ismay
Copy link
Contributor

ismay commented May 6, 2021

Now that I think about it, I had forgotten that there are ignores for .yarn in ./.eslintignore and ./.prettierignore. So cli-style's behaviour is correct here: it's warning us that we're passing it something we've ignored.

I suspect the problem here is that we've explicitly ignored the .yarn dir in ui, but the d2-style apply command we're running in ui will match files in .yarn and pass them to eslint. So I suspect we either need:

  1. A mechanism in cli-style that will omit ignored files when you run d2-style apply without any file arguments. So that linters don't receive ignored files
  2. Or, we need to pass a more specific glob to d2-style in ui, which omits .yarn so that d2-style won't log the warning.

edit: Actually, I'm wondering now if this PR does exactly what I'm mentioning in 1. If so, then consider this another roundabout way of me being on board with the suggested changes 😅👍

@varl
Copy link
Contributor Author

varl commented May 6, 2021

A mechanism in cli-style that will omit ignored files when you run d2-style apply without any file arguments. So that linters don't receive ignored files

This is what this does: https://github.com/dhis2/cli-style/blob/master/src/utils/files.js#L9-L19

@varl
Copy link
Contributor Author

varl commented May 6, 2021

This does fix the problem, so I'm going ahead with releasing it.

@varl varl merged commit 7481cfa into master May 6, 2021
@varl varl deleted the ignore-yarn-dir branch May 6, 2021 16:22
dhis2-bot added a commit that referenced this pull request May 6, 2021
## [8.0.1](v8.0.0...v8.0.1) (2021-05-06)

### Bug Fixes

* ignore .yarn directory ([#392](#392)) ([7481cfa](7481cfa))
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 8.0.1 🎉

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