Socket
Socket
Sign inDemoInstall

grunt-coffeelint

Package Overview
Dependencies
58
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.4 to 0.0.5

.travis.yml

16

package.json
{
"name": "grunt-coffeelint",
"description": "Lint your Coffee",
"version": "0.0.4",
"version": "0.0.5",
"homepage": "https://github.com/vojtajina/grunt-coffeelint",

@@ -11,3 +11,5 @@ "author": {

"contributors": [
"Ed Siok <sioked@gmail.com>"
"Christoph Neuroth <christoph.neuroth@gmail.com>",
"Ed Siok <sioked@gmail.com>",
"travis4all <travis4all@diamon.dz>"
],

@@ -28,7 +30,11 @@ "repository": {

},
"peerDependencies": {
"grunt": "~0.4"
},
"dependencies": {
"grunt": ">= 0.3.8",
"coffeelint": ">= 0.4.0"
"coffeelint": "~0.4"
},
"devDependencies": {},
"devDependencies": {
"grunt": "~0.4"
},
"keywords": [

@@ -35,0 +41,0 @@ "gruntplugin"

@@ -0,1 +1,2 @@

[![build status](https://secure.travis-ci.org/vojtajina/grunt-coffeelint.png)](http://travis-ci.org/vojtajina/grunt-coffeelint)
# grunt-coffeelint

@@ -39,6 +40,8 @@

tests: {
files: ['tests/*.coffee'],
files: {
src: ['tests/*.coffee']
},
options: {
"no_trailing_whitespace": {
"level": "error"
'no_trailing_whitespace': {
'level': 'error'
}

@@ -57,5 +60,7 @@ }

...
coffeelintOptions: {
"no_trailing_whitespace": {
"level": "error"
coffeelint: {
options: {
'no_trailing_whitespace': {
'level': 'error'
}
}

@@ -62,0 +67,0 @@ },

@@ -6,10 +6,12 @@ module.exports = function(grunt) {

var files = grunt.file.expandFiles(this.data.files || this.data);
var options = this.data.options || grunt.config('coffeelintOptions') || {};
var files = this.filesSrc;
var options = this.options()
var errorCount = 0;
var warnCount = 0;
files.forEach(function(file) {
grunt.verbose.writeln('Linting ' + file + '...');
var errors = coffeelint.lint(grunt.file.read(file), options);
if (!errors.length) {

@@ -19,18 +21,27 @@ grunt.verbose.ok();

errors.forEach(function(error) {
var status = "[warn]".yellow;
if(/error/.test(error.level)){
var status;
if (error.level === 'error') {
errorCount += 1;
status = "[error]".red;
} else if (error.level === 'warn') {
warnCount += 1;
status = "[warn]".yellow;
} else {
return;
}
grunt.log.writeln(status + ' ' +file + ':' + error.lineNumber + ' ' + error.message + ' (' + error.rule + ')');
grunt.log.writeln(status + ' ' + file + ':' + error.lineNumber + ' ' + error.message + ' (' + error.rule + ')');
});
}
});
if(!errorCount){
grunt.log.write("Lint free");
} else {
if (errorCount) {
return false;
}
if (!warnCount) {
grunt.log.ok(files.length + ' file' + (files.length === 1 ? '' : 's') + ' lint free.');
}
});
};
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc