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: update to Stylelint v15 #243

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

feat: update to Stylelint v15 #243

wants to merge 2 commits into from

Conversation

dstaley
Copy link
Contributor

@dstaley dstaley commented Jul 18, 2023

🎟️ Asana Task


Description

This PR updates Stylelint in platform-cli to the latest version to ensure compatibility with the latest versions of CSS.

PR Checklist πŸš€

  • Conduct thorough self-review.
  • Add or update tests as appropriate.
  • Write a useful description (above) to give reviewers appropriate context.
  • Identify (in the description above) and document (add Asana tasks on this board) any technical debt that you're aware of, but are not addressing as part of this PR.

@dstaley dstaley added the release:canary Publish a canary release label Jul 18, 2023
@dstaley dstaley requested a review from a team July 18, 2023 20:10
@changeset-bot
Copy link

changeset-bot bot commented Jul 18, 2023

πŸ¦‹ Changeset detected

Latest commit: 06af1d3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@hashicorp/platform-cli Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Jul 18, 2023

πŸ“¦ Canary Packages Published

Latest commit: 06af1d3

Published 1 packages

@hashicorp/[email protected]

npm install @hashicorp/platform-cli@canary

"stylelint-config-css-modules": "^4.2.0",
"stylelint-config-standard": "^34.0.0",
"stylelint-order": "^6.0.3",
"stylelint-use-nesting": "^4.1.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

Just so I'm following, what is the explanation for removal of

  • stylelint-config-prettier
  • stylelint-media-use-custom-media
  • stylelint-value-no-unknown-custom-properties

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The first one isn't necessary anymore, and the latter two are not compatible with v15. I figured we can probably live without those two for now and add them back when/if they update for v15.

Copy link
Contributor

@thiskevinwang thiskevinwang left a comment

Choose a reason for hiding this comment

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

Looks reasonable to me! Left a non-blocking question

@dstaley
Copy link
Contributor Author

dstaley commented Jul 18, 2023

@thiskevinwang looks like we'd need to disable a good chunk of rules to prevent auto-fixes on www.

    // we don't enforce a standard naming pattern
    'selector-class-pattern': null,
    'keyframes-name-pattern': null,
    'custom-property-pattern': null,

    // we didn't previously limit numerical precision
    'number-max-precision': null,

    // we didn't previously enforce empty lines
    'at-rule-empty-line-before': null,
    'custom-property-empty-line-before': null,
    'declaration-empty-line-before': null,
    'rule-empty-line-before': null,

    // we
    'declaration-block-no-redundant-longhand-properties': null,
    'shorthand-property-no-redundant-values': null,
    'media-feature-range-notation': null,
    'color-function-notation': null,
    'alpha-value-notation': null,
    'import-notation': null,
    'function-url-quotes': null,
    'property-no-vendor-prefix': null,
    'value-no-vendor-prefix': null,
    'at-rule-no-vendor-prefix': null,

A few rules are dumb imo (such as declaration-block-no-redundant-longhand-properties which collapses properties into the shorthand form), but since all of these can be automatically fixed, I kind of think it'd be worthwhile to examine what rules we'd like to keep.

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

Successfully merging this pull request may close these issues.

2 participants