Skip to content

Navigation Menu

Sign in
Appearance settings
Sign up
Appearance settings

Fix at-rule-prelude-no-invalid false positives for @import #9472

Copy link
Copy link

Description

@coderaiser
Issue body actions

What minimal example or steps are needed to reproduce the bug?

what is wrong with this css?

@import url('./highlight.css');
@import url('../fontcustom/fontcustom.css');

I get two errors:

 1:9   error   Invalid prelude "url('./highlight.css')" for at-rule "@import"               at-rule-prelude-no-invalid (stylelint) 
 2:9   error   Invalid prelude "url('../fontcustom/fontcustom.css')" for at-rule "@import"  at-rule-prelude-no-invalid (stylelint) 
 1:13  error   Expected no quotes around "url" function argument                            function-url-quotes (stylelint)        
 2:13  error   Expected no quotes around "url" function argument                            function-url-quotes (stylelint) 

With this

@import './highlight.css';
@import '../fontcustom/fontcustom.css';

I have:

 1:9  error   Invalid prelude "'./highlight.css'" for at-rule "@import"                              at-rule-prelude-no-invalid (stylelint) 
 2:9  error   Invalid prelude "'../fontcustom/fontcustom.css'" for at-rule "@import"                 at-rule-prelude-no-invalid (stylelint) 
 1:9  error   Expected "'./highlight.css'" to be "url('./highlight.css')"                            import-notation (stylelint)            
 2:9  error   Expected "'../fontcustom/fontcustom.css'" to be "url('../fontcustom/fontcustom.css')"  import-notation (stylelint)

Which one is correct and should I use, looks like bug in at-rule-prelude-no-invalid

What minimal configuration is needed to reproduce the bug?

{
    "extends": ["stylelint-config-standard"],
    "rules": {
        "function-url-quotes": "always",
    },
    "plugins": [
        "@stylistic/stylelint-plugin"
    ]
}

How did you run Stylelint?

api

Which Stylelint-related dependencies are you using?

latest

What did you expect to happen?

no warnings

What actually happened?

see errors

Do you have a proposal to fix the bug?

No response

Reactions are currently unavailable

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.