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

Refactor to remove redundant calls to isStandardSyntaxMediaFeatureName utility #7021

Conversation

romainmenke
Copy link
Member

Which issue, if any, is this issue related to?

Closes #6848

Is there anything in the PR that needs further explanation?

These utilities aren't needed anymore.
@csstools/media-query-list-parser only parses standard CSS as media feature AST nodes.


I think #6848 can be closed as completed after this change.

@changeset-bot
Copy link

changeset-bot bot commented Jun 30, 2023

⚠️ No Changeset found

Latest commit: 9046aba

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@Mouvedia
Copy link
Member

Mouvedia commented Jun 30, 2023

Can we wait for elirasza/stylelint-stylistic to be refactored first?

https://github.com/elirasza/stylelint-stylistic/blob/dce7ea440d44a8e6aa28251eca4e3fbd98a376ba/lib/rules/media-feature-name-case/index.js#L5

If not we will have to remove our recommendations for the plugins in the documentation.

@romainmenke
Copy link
Member Author

romainmenke commented Jun 30, 2023

I didn't know the functions from utils were part of the public API of Stylelint.
I assumed they were not given this comment : https://github.com/stylelint/stylelint/blob/main/docs/developer-guide/plugins.md#external-helper-modules


I will restore these files.

@romainmenke romainmenke changed the title Refactor to remove unneeded isStandardSyntaxMediaFeature utilities Remove redundant calls to isStandardSyntaxMediaFeature utilities Jun 30, 2023
@Mouvedia
Copy link
Member

@romainmenke it's complicated: #6866

@romainmenke romainmenke changed the title Remove redundant calls to isStandardSyntaxMediaFeature utilities Remove redundant calls to isStandardSyntaxMediaFeatureName utility Jun 30, 2023
@ybiquitous
Copy link
Member

To be honest, I'm not in favor of leaving unused and internal modules (see also #6866 (comment)). As a maintainer, I feel it isn't easy to care about internal modules used by plugins. 😓

However, only this time, we've removed many utilities toward v16 (see #7002), so we can delay removing unused modules. I think it's acceptable to remove isStandardSyntaxMediaFeatureName on the v16 branch.

Could you open a new PR to remove it for v16?

Copy link
Member

@ybiquitous ybiquitous left a comment

Choose a reason for hiding this comment

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

Anyway, the series of refactoring work for #6848 is great! 👏🏼

Thank you so much for your effort! @romainmenke

@jeddy3 jeddy3 changed the title Remove redundant calls to isStandardSyntaxMediaFeatureName utility Refactor to remove redundant calls to isStandardSyntaxMediaFeatureName utility Jul 1, 2023
Copy link
Member

@jeddy3 jeddy3 left a comment

Choose a reason for hiding this comment

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

Thank you.

Two minor requests, otherwise LGTM.

Anyway, the series of refactoring work for #6848 is great! 👏🏼

Totally agree!

lib/rules/media-feature-name-case/__tests__/index.js Outdated Show resolved Hide resolved
romainmenke and others added 2 commits July 1, 2023 09:54
Co-authored-by: Richard Hallows <jeddy3@users.noreply.github.com>
Copy link
Member

@jeddy3 jeddy3 left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

@romainmenke
Copy link
Member Author

Thank you again for the reviews on all this 🙇
Awesome to wrap this up!

@romainmenke romainmenke merged commit 096e7fc into main Jul 1, 2023
18 checks passed
@romainmenke romainmenke deleted the refactor-to-remove-isStandardSyntaxMediaFeatureName--witty-pygmy-marmoset-f083bee9e8 branch July 1, 2023 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Refactor to replace postcss-media-query-parser with @csstools/media-query-list-parser
4 participants