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

[stylelint-plugin] feat: migrate from @import to @use statements #5640

Merged
merged 4 commits into from
Oct 7, 2022

Conversation

kmark
Copy link
Contributor

@kmark kmark commented Oct 4, 2022

@blueprintjs/stylelint-plugin now supports Sass @use and drops support for Sass @import. Less @import support remains.

@blueprint-bot
Copy link

Update docs

Previews: documentation | landing | table | demo

@kmark kmark marked this pull request as ready for review October 4, 2022 05:38
@kmark kmark requested a review from adidahiya October 4, 2022 05:40
packages/stylelint-plugin/README.md Outdated Show resolved Hide resolved
packages/stylelint-plugin/README.md Outdated Show resolved Hide resolved
packages/stylelint-plugin/README.md Outdated Show resolved Hide resolved
packages/stylelint-plugin/src/utils/cssSyntax.ts Outdated Show resolved Hide resolved
packages/stylelint-plugin/test/no-prefix-literal.test.js Outdated Show resolved Hide resolved
packages/stylelint-plugin/src/utils/checkImportExists.ts Outdated Show resolved Hide resolved
@kmark kmark requested a review from styu October 6, 2022 04:25
@blueprint-bot
Copy link

Apply PR suggestions

Previews: documentation | landing | table | demo

Copy link
Contributor

@adidahiya adidahiya left a comment

Choose a reason for hiding this comment

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

LGTM other than the one comment here. We'll release this as a breaking change to the rule in a new major version for the plugin.

hasBpVariablesImport = checkImportExists(
cssSyntaxType,
root,
[importPath, `${importPath}.${extension}`],
Copy link
Contributor

Choose a reason for hiding this comment

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

minor: can we now infer the file extension from the first argument cssSyntaxType? it seems like we no longer need an array of import paths, we can just provide one and checkImportExists should check for both paths with and without the extension.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'll address this in a follow-up PR

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@adidahiya adidahiya changed the title Migrate stylelint rules from import to use [stylelint-plugin] feat: migrate from @import to @use statements Oct 7, 2022
@adidahiya adidahiya merged commit a7142e9 into develop Oct 7, 2022
@adidahiya adidahiya deleted the kmark/stylelint-use branch October 7, 2022 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants