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

Update @humanmade/stylelint-config in preparation for v2 release #248

Merged
merged 7 commits into from
Aug 19, 2021

Conversation

mattheu
Copy link
Member

@mattheu mattheu commented Feb 23, 2021

I am having some issues with HM Linter bot flagging style issues, but I'm not getting the same errors locally. and I'm a little stumped by it. I don't know for sure, but i think committing the package lock file could help ensure this isn't caused by mismatched versions.

The actual problem is this: https://github.com/humanmade/HM-Playbook/pull/200, and the errors flagged are related to the rule function-calc-no-invalid. Yet its not happening locally. Looks like this was a bug in stylelint when used with sass files, and it was fixed a year ago. This makes me suspect that this could be caused by a version mismatch, and therefore may be fixed by committing the lockfile.

@mattheu
Copy link
Member Author

mattheu commented Feb 23, 2021

Looking a bit closer... this doesn't necessarily solve my problem either. It looks like the bugfix I'm after was released in v13.30, so if HM Linter Bot is using the version of stylelint from here... its still not new enough.

Either way, I wonder why we're not committing the lockfile. We do for eslint.

@kadamwhite
Copy link
Contributor

@mattheu There's no reason not to include the lockfile that I can see. If you can PR the update / version pin, I can get that pushed out as a patch release

@kadamwhite
Copy link
Contributor

@mattheu We include the package lockfile in ESLint because I deployed with NPM, and since Ryan used Yarn, only Yarn was ignored :)

@mattheu
Copy link
Member Author

mattheu commented Feb 23, 2021

Updated this PR to also update the the stylelint and WP stylelint rules to latest versions.

@ntwb ntwb changed the title Commit lockfile for stylelint Migrate from stylelint-config-wordpress to @wordpress/stylelint-config Feb 25, 2021
@ntwb
Copy link
Member

ntwb commented Feb 25, 2021

For the most part this is working as expected testing locally, as @tfrommen highlights here in Slack that this will need to be shipped as a major SemVer release in HM CS v2.0.

Whilst testing this locally works fine for me, hmlinter linter-bot continues to fail, I need to look closer at either the linter-bot stylelint integration in humanmade/linter-bot#144 or in stylelint itself to resolve the underlying issue.

I've published the updated config here in pull request as it currently stands as stylelint-next and is now available to projects to use and test, that is if of course if stylelint is working with linter-bot for your project, to test this PR on your project you can use the following config option for stylelint in hmlinter.yml of your project:

stylelint:
  enabled: true
  version: next

@mattheu
Copy link
Member Author

mattheu commented Feb 25, 2021

Oh now that is a neat idea. Although running this I get the following error:

Could not run: Error: Could not find "stylelint-config-wordpress/scss". Do you need a configBasedir?

@ntwb
Copy link
Member

ntwb commented Feb 25, 2021

Oh now that is a neat idea. Although running this I get the following error:

Could not run: Error: Could not find "stylelint-config-wordpress/scss". Do you need a configBasedir?

This was fixed with this commit @mattheu That was fixed in 8bc47f4 (#248)

@ntwb ntwb changed the title Migrate from stylelint-config-wordpress to @wordpress/stylelint-config WIP - @humanmade/stylelint-config v2 Aug 15, 2021
@ntwb ntwb changed the title WIP - @humanmade/stylelint-config v2 Update @humanmade/stylelint-config in preparation for v2 release Aug 18, 2021
@ntwb
Copy link
Member

ntwb commented Aug 18, 2021

I've got a few more things to do, will follow this up in further PRs

For now, this can be merged and I'll push up a new next release

Copy link
Contributor

@tfrommen tfrommen left a comment

Choose a reason for hiding this comment

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

If we treat master as home for the upcoming v2 releases, this looks alright to me. 👍

@ntwb ntwb merged commit ce200ea into master Aug 19, 2021
@ntwb ntwb deleted the commit-package-lock-file branch August 19, 2021 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants