Comments (8)
This should be fixed in 6.3.3
.
from lesshint.
Thank you @jwilsson . I will test as soon as yarn spots the new version.
from lesshint.
@jwilsson I'm pretty sure I upgraded (yarn upgrade lesshint
- although I am using it through the gulp plugin). I checked yarn.lock
and saw 6.3.3 in there, so it looks to be installed. But i'm still getting the errors, but now in different places.
The example in the original post is fine. But this now gives an error:
.something {
display: block;
.font-size(18);
.fontMedium;
}
Gives the error:
Warning: test.less: line 3, col 3, newlineAfterBlock: All blocks should be followed by a new line.
I also see lots of weird newlineAfterBlock
errors where I clearly don't have a mixin in use.
For example in my variables.less
:
@columnWidth: 60px;
@gutterWidth: 57px;
@desktop: 1400px;
@tablet: 1024px;
@mobile: 720px;
// colors
@bodyBackground: #F4F2EF;
@bodyForeground: #373737;
@norr3Blue: #175E6F;
@green: #4FA389;
@orange: #FF9662;
@pink: #FFBCBD;
@yellow: #FFDD84;
@tabletBreakPoint: @tablet - 1px;
Error: Warning: variables.less: line 1, col 1, newlineAfterBlock: All blocks should be followed by a new line.
from lesshint.
@deanc Please check with 6.3.5
, that should take care of both issues.
I decided to refactor the whole rule, hence the new errors. Thanks for working through them with me!
from lesshint.
Thanks @jwilsson - I'm still getting some related issues. Here's another test-case:
@sectionPadding: 8em;
.homepage-section {
padding-left: 15%;
display: flex;
width: 100%;
max-width: @desktop;
margin: 0 auto;
position: relative;
.side {
width: 200px;
padding: @sectionPadding 2em;
outline: 1px solid red;
.label {
transform: rotate(90deg);
transform-origin: 0;
.font-size(24);
}
}
.main {
position: relative;
flex: 1;
> p:last-child {
margin-bottom: 0;
}
}
}
Note how it's correctly reporting. As soon as I add a new line it gives this instead: Warning: test.less: line 22, col 4, trailingWhitespace: There shouldn't be any trailing whitespace.
from lesshint.
Here's another case where it has issues:
@import 'base/variables';
@import 'base/mixins';
@import 'base/typography';
Gives:
Warning: test.less: line 1, col 1, newlineAfterBlock: All blocks should be followed by a new line.
Warning: test.less: line 2, col 1, newlineAfterBlock: All blocks should be followed by a new line.
from lesshint.
@deanc Your first case might be correct though (GitHub seems to strip trailing whitespace), are there any trailing whitespace on that line?
The second case is definitely a bug, though. I'll take a look.
from lesshint.
@deanc With 6.3.6
@import
s shouldn't be reported anymore.
from lesshint.
Related Issues (20)
- Property order concentric
- Upgrade report on propertyOrder error
- Ordering bug
- "parse error: Missed semicolon" for variable body starting with `&` HOT 2
- Lesshint Throws Different Warnings for Single Line Comments HOT 1
- Several False Positives of stringQuotes Rule HOT 3
- An in-range update of rimraf is breaking the build 🚨 HOT 1
- Upgrading from 5.3.0 to 6.3.0 leads to many false positives HOT 6
- Upgrading to 6.3.0 gives unexpected results HOT 4
- newlineAfterBlock doesn't work properly HOT 2
- An in-range update of postcss-less is breaking the build 🚨 HOT 3
- Upgrading to 6.3.1 leads to incorrect newlineAfterBlock warnings HOT 4
- An in-range update of sinon is breaking the build 🚨 HOT 1
- Rule proposal: spaceAroundChildCombinator HOT 1
- An in-range update of sinon is breaking the build 🚨 HOT 2
- An in-range update of mocha is breaking the build 🚨 HOT 1
- LESS "extend" syntax violates spaceAfterPropertyColon rule HOT 1
- An in-range update of coveralls is breaking the build 🚨 HOT 2
- TypeError: Cannot read property 'valueOf' of undefined HOT 2
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 lesshint.