Permalink
Browse files

Updating to CoffeeScript 1.3.1.

  • Loading branch information...
1 parent 1c19121 commit c2eaace079440f4287c7836231e2625a103cbec5 @clutchski committed Apr 14, 2012
Showing with 98 additions and 40 deletions.
  1. +30 −12 bin/coffeelint
  2. +67 −27 lib/coffeelint.js
  3. +1 −1 package.json
View
@@ -1,4 +1,5 @@
#!/usr/bin/env node
+// Generated by CoffeeScript 1.3.1
/*
CoffeeLint
@@ -7,10 +8,11 @@ Copyright (c) 2011 Matthew Perpick.
CoffeeLint is freely distributable under the MIT license.
*/
+
(function() {
var CSVReporter, ErrorReport, Reporter, ReporterClass, coffeelint, config, configPath, errorReport, findCoffeeScripts, fs, glob, lint, optimist, options, path, paths, read, reporter, scripts, thisdir,
- __slice = Array.prototype.slice,
- __hasProp = Object.prototype.hasOwnProperty,
+ __slice = [].slice,
+ __hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; };
path = require("path");
@@ -47,14 +49,18 @@ CoffeeLint is freely distributable under the MIT license.
ErrorReport = (function() {
+ ErrorReport.name = 'ErrorReport';
+
function ErrorReport() {
this.paths = {};
}
ErrorReport.prototype.getExitCode = function() {
var path;
for (path in this.paths) {
- if (this.pathHasError(path)) return 1;
+ if (this.pathHasError(path)) {
+ return 1;
+ }
}
return 0;
};
@@ -68,8 +74,12 @@ CoffeeLint is freely distributable under the MIT license.
pathCount++;
for (_i = 0, _len = errors.length; _i < _len; _i++) {
error = errors[_i];
- if (error.level === 'error') errorCount++;
- if (error.level === 'warn') warningCount++;
+ if (error.level === 'error') {
+ errorCount++;
+ }
+ if (error.level === 'warn') {
+ warningCount++;
+ }
}
}
return {
@@ -96,7 +106,9 @@ CoffeeLint is freely distributable under the MIT license.
_ref = this.paths[path];
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
error = _ref[_i];
- if (error.level === level) return true;
+ if (error.level === level) {
+ return true;
+ }
}
return false;
};
@@ -107,6 +119,8 @@ CoffeeLint is freely distributable under the MIT license.
Reporter = (function() {
+ Reporter.name = 'Reporter';
+
function Reporter(errorReport) {
this.errorReport = errorReport;
this.ok = '';
@@ -164,7 +178,9 @@ CoffeeLint is freely distributable under the MIT license.
e = errors[_i];
o = e.level === 'error' ? this.err : this.warn;
msg = " " + ("" + o + " " + (this.stylize("#" + e.lineNumber, color)) + ": " + e.message + ".");
- if (e.context) msg += " " + e.context + ".";
+ if (e.context) {
+ msg += " " + e.context + ".";
+ }
_results.push(this.print(msg));
}
return _results;
@@ -190,8 +206,10 @@ CoffeeLint is freely distributable under the MIT license.
__extends(CSVReporter, _super);
+ CSVReporter.name = 'CSVReporter';
+
function CSVReporter() {
- CSVReporter.__super__.constructor.apply(this, arguments);
+ return CSVReporter.__super__.constructor.apply(this, arguments);
}
CSVReporter.prototype.publish = function() {
@@ -201,14 +219,14 @@ CoffeeLint is freely distributable under the MIT license.
for (path in _ref) {
errors = _ref[path];
_results.push((function() {
- var _i, _len, _results2;
- _results2 = [];
+ var _i, _len, _results1;
+ _results1 = [];
for (_i = 0, _len = errors.length; _i < _len; _i++) {
e = errors[_i];
f = [path, e.lineNumber, e.level, e.message];
- _results2.push(this.print(f.join(",")));
+ _results1.push(this.print(f.join(",")));
}
- return _results2;
+ return _results1;
}).call(this));
}
return _results;
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -15,7 +15,7 @@
},
"dependencies": {
"optimist" : ">=0.2.8",
- "coffee-script" : ">=1.2.0",
+ "coffee-script" : ">=1.3.1",
"glob" : ">=3.1.9"
},
"devDependencies" : {

0 comments on commit c2eaace

Please sign in to comment.