{"id":25676,"library":"grunt-lesshint","title":"grunt-lesshint","description":"Lint LESSCSS files with Grunt. Version 2.0.0 requires Node >= 4.0.0 and Grunt ~0.4.5. This plugin integrates the lesshint linter into the Grunt build system, providing a task named 'lesshint' for checking LESS files. Options include force (continue on errors), reporter (custom error formatting), lesshintrc (configuration file), and allowWarnings (allow warnings without failure). Release history shows updates to lesshint v3.0.0 and support for custom reporters and allowing warnings. Less frequently updated; last release 2017.","status":"maintenance","version":"2.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/lesshint/grunt-lesshint","tags":["javascript","gruntplugin","less","lesscss","lint","linter","linting"],"install":[{"cmd":"npm install grunt-lesshint","lang":"bash","label":"npm"},{"cmd":"yarn add grunt-lesshint","lang":"bash","label":"yarn"},{"cmd":"pnpm add grunt-lesshint","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core linting logic; peer dependency","package":"lesshint","optional":false},{"reason":"Grunt plugin; peer dependency","package":"grunt","optional":false}],"imports":[{"note":"Grunt plugin, not a Node module. Load via grunt.loadNpmTasks.","wrong":"const lesshint = require('grunt-lesshint');","symbol":"grunt-lesshint task","correct":"grunt.loadNpmTasks('grunt-lesshint');"},{"note":"Configuration is plain object, not a class.","wrong":"grunt.initConfig({ lesshint: { ... } }) is correct; no separate import for config type.","symbol":"LesshintTaskConfig","correct":"// Define task in grunt.initConfig\nlesshint: { options: {}, your_target: { src: ['**/*.less'] } }"}],"quickstart":{"code":"// Install: npm install grunt-lesshint --save-dev\n// In Gruntfile:\nmodule.exports = function(grunt) {\n  grunt.loadNpmTasks('grunt-lesshint');\n  grunt.initConfig({\n    lesshint: {\n      options: {\n        force: true,\n        lesshintrc: true\n      },\n      all: {\n        src: ['src/**/*.less']\n      }\n    }\n  });\n  grunt.registerTask('default', ['lesshint']);\n};","lang":"javascript","description":"Gruntfile configuration for grunt-lesshint task linting all .less files in src/."},"warnings":[{"fix":"Set 'force: true' in options to continue despite errors.","message":"Task 'lesshint' fails build on lint errors by default.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Check package.json peerDependencies; use Grunt 0.4.5 or later but note v1.2.0+ compatible with Grunt 1.0.0.","message":"Requires Grunt ~0.4.5; incompatible with Grunt 1.x?","severity":"gotcha","affected_versions":">=2.0.0"},{"fix":"Consider migrating to standalone lesshint or an alternative linter.","message":"Not updated since 2017; lesshint may have breaking changes.","severity":"deprecated","affected_versions":">=1.5.1"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Add grunt.loadNpmTasks('grunt-lesshint'); in Gruntfile.","cause":"Forgot to call grunt.loadNpmTasks('grunt-lesshint');","error":"Warning: Task \"lesshint\" not found."},{"fix":"npm install lesshint@3.0.0 --save-dev and ensure version matches plugin.","cause":"Incompatible lesshint version or missing peer dep.","error":"Fatal error: lesshint is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}