Lesshint for MSBuild
Add this package using the Visual Studio's NuGet Package Manager. It should be automatically added to your project.
LessCompile property in your
.targets consisting of the names of .less files to lint.
Lesshint target runs after a target named
Lesshint's default configurations are used by default.
If you'd like to use your own
.lesshintrc file, add a
LesshintConfig property to your project:
All overrideable item groups and properties are below. Read the Lesshint documentation for Lesshint-specific linting details.
Overrideable Item Groups
||A minimatch glob pattern or a file to exclude form being linted.||
||Require paths of custom linters to add to the built-in list.||
Note that to use special characters (such as
* wildcards) in
LesshintExclude you must escape the special characters.
<!-- Equivalent to "styles/external/*.less" --> <LesshintExclude Include="styles/external/%2A.less" />
||Whether linting failures should break the build.||
||Path to a specific .lesshintrc.||
||Path to a Lesshint CLI to run with.||The highest-versioned Lesshint version in the solution's
||Whether to skip running Lesshint.||
||Any extra arguments to pass to the Lesshint CLI.||
||Path to a Node executable to execute the runner script.||The
||Glob filter for the version of Lesshint to use (ignored if
Output Item Groups
||Lines of console output from the Lesshint CLI.|
||Exit code of the Lesshint CLI.|
The first available Lesshint version in your NuGet packages directory will be used.
Run the following commands to initialize your environment:
gulp to build.
gulp test just runs tests.
Updating the version
The version number is stored both in
Make sure to update it in both places.