Registry / testing / grunt-contrib-csslint

grunt-contrib-csslint

JSON →
library2.0.0jsnpmunverified

Grunt plugin to lint CSS files using CSSLint. Version 2.0.0 is the latest stable release, compatible with Node.js >=0.10.0. This plugin integrates CSSLint into Grunt, allowing configuration of CSSLint rules directly in the Gruntfile. It supports custom rule sets and reports warnings and errors. Compared to other CSS linters, it leverages the CSSLint library and is designed for Grunt-based workflows. It has been maintained as part of the grunt-contrib series, but note that CSSLint itself is no longer actively maintained.

npm install grunt-contrib-csslint
INSTALL
IMPORT
SIG · GRUNT-CONTRIB-CSSL
G
grunt-contrib-csslint
testingjavascriptv2.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

grunt-contrib-csslint
grunt.loadNpmTasks('grunt-contrib-csslint')
require('grunt-contrib-csslint')
Grunt plugins are loaded via grunt.loadNpmTasks, not require.

Install plugin, configure CSSLint rules, and run the csslint task.

npm install grunt-contrib-csslint --save-dev // Gruntfile.js module.exports = function(grunt) { grunt.initConfig({ csslint: { options: { 'adjoining-classes': false, 'box-sizing': false }, src: ['public/css/*.css'] } }); grunt.loadNpmTasks('grunt-contrib-csslint'); grunt.registerTask('default', ['csslint']); };
Debug
Known issues
deprecatedCSSLint is no longer actively maintained. Consider using stylelint instead.
fix
Migrate to stylelint or another maintained CSS linter.
affects: >=2.0.0
Errors
Common errors & fixes
Warning: Task "csslint" not found.
Missing grunt.loadNpmTasks('grunt-contrib-csslint') line.
fix
Add grunt.loadNpmTasks('grunt-contrib-csslint'); to your Gruntfile.
Upgrade
Version history
2.0.0latest on npm
Audit
Dependencies
gruntrequiredPeer dependency required for Grunt plugin
Agent activity
5 hits · last 30 days
node
4
Amazon
1
Resources
grunt-contrib-csslint — npm install grunt-contrib-csslint · libregistry