3

I config stylelintrc.js like this:

rules: {
    "selector-pseudo-element-no-unknown": [true, {
      "ignorePseudoClasses": ["deep",""]
    }]
  } 

but not ok, my vue file is here link

the error is:

Unexpected unknown pseudo-class selector selector-pseudo-class-no-unknown
":deep"

the error image is here link

2
  • 1
    Please do not post code as images... (stackoverflow.com/help/how-to-ask) Commented Oct 23, 2021 at 13:27
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. Commented Oct 23, 2021 at 18:50

3 Answers 3

12

add ignorePseudoClasses sub rule

If this problem occurs, you can simply modify the rules in [stylelint.config.js]:

add ignorePseudoClasses rule item naming [deep]

Sign up to request clarification or add additional context in comments.

Comments

7

this can work

'selector-pseudo-class-no-unknown': [
     true,
     {
         ignorePseudoClasses: ['deep'],
     },
],

Comments

0

According to documentation Stylelint uses cosmiconfig to find and load your configuration object. And there is defined sequence where it is going to search for your config. In my project I had both a stylelint property in package.json and as well a .stylelintrc file. When I added rule to package.json file which has higher priority everything started to work as it should.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.