-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Add less linter via npx #6936
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add less linter via npx #6936
Conversation
Codecov Report
@@ Coverage Diff @@
## master #6936 +/- ##
=========================================
+ Coverage 41.4% 41.4% +<.01%
=========================================
Files 441 441
Lines 59736 59736
=========================================
+ Hits 24731 24732 +1
+ Misses 31767 31765 -2
- Partials 3238 3239 +1
Continue to review full report at Codecov.
|
Good idea adding a linter. Generally, I came to prefer stylelint, maybe something we want to migrate to later. |
@silverwind no problem with it. Should be easy to use a similar ruleset I tried a few linter for less (i normally work with yarn, sass and a gulp pipeline) and this one was the fastest. I searched based on links in lessc tool i found. |
FYI stylelint replacement up in #7305. |
Why?
Add a linter to ensure consistent/unified code style.
Why this less liniter?
Other linter had nicer output, but was slower and no clear name of broken rule.
Config
Different config formats supported:
.lesshintrc (no highlight by default - json)
.lesshintrc.json (json with highlight - easy to find - currently used)
.lesshintrc.y?ml
package.json
Rules
Some rules from default stylish ruleset are disabled because of heavy usage. Maybe some can be removed, but changes some styles.
https://github.com/lesshint/lesshint/blob/master/lib/linters/README.md
Exit codes for drone
https://github.com/lesshint/lesshint#exit-status-codes