Skip to content

feat: update to Stylelint v15#243

Open
dstaley wants to merge 2 commits into
mainfrom
ds.stylelint-15
Open

feat: update to Stylelint v15#243
dstaley wants to merge 2 commits into
mainfrom
ds.stylelint-15

Conversation

@dstaley
Copy link
Copy Markdown
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
Copy Markdown

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
Copy Markdown
Contributor

github-actions Bot commented Jul 18, 2023

📦 Canary Packages Published

Latest commit: 06af1d3

Published 1 packages

@hashicorp/platform-cli@3.0.0-canary-202361820465

npm install @hashicorp/platform-cli@canary

Comment thread packages/cli/package.json
"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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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