Comments (7)
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.
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.
https://github.com/dontwork/lessLintTestRepo
There we go, same errors as before in this test repo!
from grunt-lesslint.
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:
- Ignore rollup warnings in this task (they are just warnings after all)
- 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.
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.
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.
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)
- NPM package should be named 'grunt-contrib-lesslint' HOT 4
- DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead. HOT 1
- Imported files aren't linted HOT 21
- Please read the question from closed issue #53
- Possiblity to mute certain errors? HOT 3
- Way to rewrite import rules HOT 3
- Comments in .csslintrc HOT 3
- Load options through the .csslintrc file in the current working directory HOT 2
- Import Statement leads to Parse Error HOT 3
- Change to using grunt in js instead of coffee HOT 4
- Update less to 2.5.x? HOT 1
- I can't get lesslint to honor newer HOT 1
- Not Validating HOT 13
- Add support for showing lint warnings HOT 2
- Would like to add imports before parsing HOT 1
- [Question] Dislay multiple errors per file HOT 1
- Update dependencies HOT 1
- Is it possible to ignore lines? HOT 1
- parsing error: Cannot read property 'lineNumber' of undefined HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grunt-lesslint.