Giter Site home page Giter Site logo

Comments (7)

jgable avatar jgable commented on July 30, 2024

Do you have a repo I can clone down and take a look at to confirm? If not,
would you mind creating a simple one so I don't chase the wrong thing down?

from grunt-lesslint.

dontwork avatar dontwork commented on July 30, 2024

I will be able to get you a repo in a day or 2. All I'm doing is linting an
less file which has imports. The grunt task then shows the 'rollup' errors
in terminal. If I do not include the bootstrap import it does not have the
errors so they are definitely caused by the bootstrap.less file being
imported.

Cheers. Great plugin apart from this minor issue!
On 30 Jan 2015 17:00, "Jacob Gable" [email protected] wrote:

Do you have a repo I can clone down and take a look at to confirm? If not,
would you mind creating a simple one so I don't chase the wrong thing
down?


Reply to this email directly or view it on GitHub
#61 (comment)
.

from grunt-lesslint.

dontwork avatar dontwork commented on July 30, 2024

https://github.com/dontwork/lessLintTestRepo

There we go, same errors as before in this test repo!

from grunt-lesslint.

jgable avatar jgable commented on July 30, 2024

Those are what are called "rollup" errors. They aren't necessarily specific to a certain file, but the whole aggregate of the generated stylesheet.

{ type: 'warning',
  rollup: true,
  message: 'Too many !important declarations (63), try to use less than 10 to avoid specificity issues.',
  rule: 
   { id: 'important',
     name: 'Disallow !important',
     desc: 'Be careful when using !important declaration',
     browsers: 'All',
     init: [Function] } }

There is no filename associated with the error so we have no way of telling whether it's in an import file or not. I started showing these with PR #34 since we were just silently ignoring them before.

You can ignore the errors explicitly by adding a csslint option

lesslint: {
  src: ['less/style.less'],
  options: {
    csslint: {
      important: false,
      "font-sizes": false,
      floats: false,
      "unique-headings": false
    }
  }
}

I see a couple options from here that this task could do, but I'm hesitant to jump right in on either:

  1. Ignore rollup warnings in this task (they are just warnings after all)
  2. Add a config option to treat these as errors optionally (combined with 1)

I'm going to close for now, since this isn't something we will be fixing for the time being.

from grunt-lesslint.

dontwork avatar dontwork commented on July 30, 2024

If I ignore those lint warnings won't it then ignore those warnings in my own style sheets? I wouldn't want that. Is there a setting to ignore the 'rollup' warnings and have them not appear. For this task to pass in a build I would have to permanently run it with force.

from grunt-lesslint.

jgable avatar jgable commented on July 30, 2024

I looked for something on the CSS lint site that would disable rollups, but I could not find it. Ignoring rollups should be something that they support upstream and we pass to them as options.

If they are adamant about not providing a way to ignore rollups, then I'll consider ignoring and erroring behind a config option.

from grunt-lesslint.

dontwork avatar dontwork commented on July 30, 2024

Just to confirm then, the only option is to ignore the warnings from the bootstrap.less import at the expense of not seeing them for my own style sheets?

from grunt-lesslint.

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.