question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add ignoreAtRules: [] to no-invalid-position-at-import-rule

See original GitHub issue

It would be nice to have an option to keep the no-invalid-position-at-import-rule on and also support @use. This syntax is used by both Sass but some PostCSS plugins also use at rules in the CSS directly. Adding this option give some flexibility.

Not a must for me, but it would be a nice to have.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
jeddy3commented, Aug 24, 2021

@GrimLink Thanks for the request.

Adding this option give some flexibility.

I agree. The primary purpose of secondary options is to make rules more permissive. We can add an ignoreAtRules: [] secondary option to the rule.

As @Semigradsky and @ybiquitous suggested, this would eventually make it into stylelint-scss as scss/at-import-no-invalid-position, which would make use of this new ignoreAtRules: [] secondary option and the checkAgainstRule util.

I’ve labelled the issue as ready to implement. Please consider contributing if you have time.

There are steps on how to add a new option in the Developer guide.

Please branch of v14 rather than master.


For context, this earlier comment is about @import being proceeded by rule-sets rather than other at-rules. This request is different as it about the interplay between @use and @import.

2reactions
Semigradskycommented, Aug 23, 2021

Ideally it would be to create scss/at-import-no-invalid-position rule but option would be nice workaround.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found