Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lesshint

Package Overview
Dependencies
Maintainers
2
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lesshint

A tool to aid you in writing clean and consistent Less.

  • 6.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7.3K
increased by8.84%
Maintainers
2
Weekly downloads
 
Created
Source

lesshint

npm Build Status Build status Coverage Status

lesshint is a tool to aid you in writing clean and consistent Less.

Installation

Node.js 6 (or later) is required.

Run the following from the command line to install lesshint (add -g to install globally):

npm install lesshint

Configuration

For information on how to configure lesshint and other available options, see the user guide.

Since lesshint is highly customizable we recommend you to also take a look at the available rule options to tailor it to your needs.

CLI usage

Run lesshint from the command-line by passing one or more files/directories to recursively scan. Quote the glob patterns for optimal cross-platform results.

lesshint "src/less/" "lib/style.less"
Available FlagsDescription
-c/--configSpecify the configuration file to use (will be merged with defaults).
-e/--excludeA globby glob pattern or a file to exclude from being linted.
-l/--lintersPaths to custom linters to add to the built-in list. See "Linters" below for more information.
-r/--reporterThe reporter to use. See "Reporters" below for more information.
-V/--versionShow the version.
-x/--max-warningsNumber of warnings to allow before exiting with a non-zero code. Omit it to always exit with zero code.

Exit status codes

Depending on the linter results and options supplied, the exit status code returned by the CLI will differ.

Exit status codeDescription
0Everything is alright or only linting errors with a severity of warning were found.
1One or more linting errors with a severity of error were found. Or when --max-warnings flag is set and the number of linting errors with a severity of warning found is greater than the given value.
66No files to lint were supplied.
70An unknown error occurred within lesshint, possibly a bug. Please file an issue!
78Something is wrong with the config file, most likely invalid JSON.

These codes were chosen with regards to the preferable exit codes.

Complementary tools

Linters

In addition to the linters included with lesshint, it's also possible to include custom ones. For example to check something team or project specific.

For more information on using custom linters, see the user guide.

Reporters

Reporters are small modules that can be used to perform actions with the lint results, for example printing something to the terminal or generate custom reports.

For more information on using reporters, see the user guide.

Developer resources

Keywords

FAQs

Package last updated on 26 Dec 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc