GithubHelp home page GithubHelp logo

Comments (4)

romainmenke avatar romainmenke commented on June 11, 2024 1

Hi @boris-petrov,
Thank you for reporting this.

In 16.4.0 we fixed the reported source locations for this rule.
Because the location of the error is now correct (but different) you also need to place ignore comments at the correct position.

See this example :

/* stylelint-disable-next-line selector-max-universal */
.a *,
.b * { /* stylelint-disable-line selector-max-universal */
	display: contents;
}

.a *,
.b * { 
	display: contents;
}

https://stylelint.io/demo/#N4Igxg9gJgpiBcID0AqABAZwC4E8A2MeAlgHZYC0URGAhgEYHkkwAeFxzmhMYWEATuQC2NFuQCuJIgDcY-WnjQokAHRIA6GkoA0a9XSVpgaVJlwEOFKrQYxyHGFwK8Bw0RKmz5NRcrUqsawAHPBoceDRIMhgyDABuNQBffw0tFF0NA3Rjf0DqELCIqKwYrHikkG0QADMiAgA5GiE4RFYmkJh1MAwMSvAIElqAcwQQYDU0NBUQfnECDGmI8ZJJyemMbhdBETFJGTkFRbQAbQAGAF0JtGSSRL6o4YAxAREsUYArDAG+2CDexGWaxA2HwhFIWCO01CJWw0wyQJBFnB5AeRCG5GwNBIUBo-CgkJA0JgsJAFUSQA

from stylelint.

romainmenke avatar romainmenke commented on June 11, 2024 1

I don't have a SCSS setup, so I can't quickly test variations, but maybe someone else has advice?


A sequence of disable and enable comments might also be an option:

/* stylelint-disable selector-max-universal */
.a *,
.b * {
/* stylelint-enable selector-max-universal */
	display: contents;
}

https://stylelint.io/demo/#N4Igxg9gJgpiBcID0AqABAZwC4E8A2MeAlgHZYC0URGAhgEYGaExhYQBO5AtjQB7kBXEkQBuMdrTxoUSADokAdDWkAaeQrrS0weaky4CxMuRgl6jDM1YdufQcLESaUmfNlYqGAA54aOeGiQZKZYGADc8gC+borKKGqKmujAaG4e1D5+AUFYIeFRICogAGZEBAByNFxwiDC8VT4wCmAYGIXgECSlAOYIIDokaKkg7AIEGLII2vJDQ5OWBNacPPxCouKSkwEA2gAMALozaNEkke1BPQBiHDxYfQBWGJ3tsF5tiANzINj4hKRYW2Gvly2EmCS+P0M-3IFyI3XI2BoJCgNHYUEBk2BMFBIAKkSAA

from stylelint.

boris-petrov avatar boris-petrov commented on June 11, 2024

from stylelint.

ybiquitous avatar ybiquitous commented on June 11, 2024

@romainmenke is right. See also https://stylelint.io/user-guide/ignore-code

from stylelint.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.