grunt-lesshint
Advanced tools
Comparing version 0.2.7 to 0.3.1
@@ -9,5 +9,4 @@ /* | ||
'use strict'; | ||
module.exports = function( grunt ){ | ||
'use strict'; | ||
grunt.initConfig({ | ||
@@ -29,3 +28,3 @@ jshint: { | ||
}, | ||
use_force: { | ||
useForce: { | ||
options: { | ||
@@ -38,3 +37,3 @@ force: true | ||
}, | ||
no_errors: { | ||
noErrors: { | ||
files: { | ||
@@ -44,3 +43,3 @@ src: [ 'test/fixtures/errorless.less' ] | ||
}, | ||
custom_options: { | ||
customOptions: { | ||
options: { | ||
@@ -47,0 +46,0 @@ spaceAfterPropertyColon: 'no_space', |
{ | ||
"name": "grunt-lesshint", | ||
"description": "Lint lesscss files with grunt", | ||
"version": "0.2.7", | ||
"version": "0.3.1", | ||
"homepage": "https://github.com/kokarn/grunt-lesshint", | ||
@@ -6,0 +6,0 @@ "author": { |
@@ -55,2 +55,4 @@ # grunt-lesshint | ||
|---|---|---| | ||
|2015-05-21|0.3.1|Forgot to update everything for the 0.3.0 release....| | ||
|2015-05-21|0.3.0|<ul><li>Use a real force system instead of faking the <code>--force</code> grunt parameter</li><li>Update JSHint options and clean up errors</li></ul>| | ||
|2015-05-19|0.2.7|Update lesshint to 0.5.1| | ||
@@ -57,0 +59,0 @@ |2015-05-18|0.2.6|Fix NPM publish| |
@@ -18,9 +18,4 @@ /* | ||
linter = new lesshint(), | ||
task = this; | ||
success = true; | ||
if( options.force ){ | ||
grunt.option( 'force', true ); | ||
delete options.force; | ||
} | ||
linter.configure( options ); | ||
@@ -66,3 +61,3 @@ | ||
if( errorCount > 0 ){ | ||
response = 'Finished with ' + errorCount + grunt.util.pluralize( errorCount, ' error in / errors in ' ) + errorFileCount + grunt.util.pluralize( errorFileCount, ' file/ files' ); | ||
response = errorCount + grunt.util.pluralize( errorCount, ' error in / errors in ' ) + errorFileCount + grunt.util.pluralize( errorFileCount, ' file/ files' ); | ||
@@ -76,3 +71,4 @@ if( cleanFileCount > 0 ){ | ||
grunt.log.warn( response ); | ||
grunt.fail.warn( 'Task "' + task.name + '" failed.' ); | ||
success = false; | ||
} else { | ||
@@ -82,3 +78,9 @@ grunt.log.ok( cleanFileCount + grunt.util.pluralize( cleanFileCount, ' file / files ' ) + 'without linting errors.' ); | ||
}); | ||
if( options.force ){ | ||
success = true; | ||
} | ||
return success; | ||
}); | ||
}; |
'use strict'; | ||
var grunt = require( 'grunt' ), | ||
childProcess = require( 'child_process' ); | ||
var childProcess = require( 'child_process' ); | ||
@@ -14,3 +13,3 @@ exports.lesshint = { | ||
// task: lesshint | ||
// should fail with warnings | ||
// should fail | ||
@@ -21,3 +20,3 @@ var response = childProcess.spawnSync( 'grunt', [ 'lesshint' ], { | ||
test.equal( response.status, 6, 'This assertion should exit with status code 6 (Warning)' ); | ||
test.equal( response.status, 3, 'This assertion should exit with status code 3 (Task error)' ); | ||
@@ -32,3 +31,3 @@ test.done(); | ||
var response = childProcess.spawnSync( 'grunt', [ 'lesshint:no_errors' ], { | ||
var response = childProcess.spawnSync( 'grunt', [ 'lesshint:noErrors' ], { | ||
encoding: 'utf8' | ||
@@ -47,3 +46,3 @@ }); | ||
var response = childProcess.spawnSync( 'grunt', [ 'lesshint:custom_options' ], { | ||
var response = childProcess.spawnSync( 'grunt', [ 'lesshint:customOptions' ], { | ||
encoding: 'utf8' | ||
@@ -62,3 +61,3 @@ }); | ||
var response = childProcess.spawnSync( 'grunt', [ 'lesshint:use_force' ], { | ||
var response = childProcess.spawnSync( 'grunt', [ 'lesshint:useForce' ], { | ||
encoding: 'utf8' | ||
@@ -70,3 +69,3 @@ }); | ||
test.done(); | ||
}, | ||
} | ||
}; |
Sorry, the diff of this file is not supported yet
11777
71
172