coffeelint/lib/coffeelint.js in coffeelint-0.2.7 vs coffeelint/lib/coffeelint.js in coffeelint-0.3.0
- old
+ new
@@ -1,10 +1,10 @@
!function(e){if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.coffeelint=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
module.exports={
"name": "coffeelint",
"description": "Lint your CoffeeScript",
- "version": "1.3.0",
+ "version": "1.4.1",
"homepage": "http://www.coffeelint.org",
"keywords": [
"lint",
"coffeescript",
"coffee-script"
@@ -20,15 +20,16 @@
},
"bin": {
"coffeelint": "./bin/coffeelint"
},
"dependencies": {
- "optimist": ">=0.2.8",
+ "browserify": "~3.37",
"coffee-script": "~1.7",
+ "coffeeify": "~0.6.0",
"glob": ">=3.1.9",
- "browserify": "~3.37",
- "coffeeify": "~0.6.0"
+ "optimist": ">=0.2.8",
+ "resolve": "^0.6.3"
},
"devDependencies": {
"vows": ">=0.6.0",
"underscore": ">=1.4.4"
},
@@ -469,18 +470,25 @@
} catch (_error) {}
return true;
};
coffeelint.lint = function(source, userConfig, literate) {
- var all_errors, astErrors, block_config, cmd, config, disabled, disabled_initially, e, errors, i, l, lexErrors, lexicalLinter, lineErrors, lineLinter, next_line, r, rules, s, tokensByLine, _i, _j, _k, _len, _len1, _ref, _ref1, _ref2, _ref3, _ref4;
+ var all_errors, astErrors, block_config, cmd, config, disabled, disabled_initially, e, errors, i, l, lexErrors, lexicalLinter, lineErrors, lineLinter, name, next_line, r, rules, s, tokensByLine, _i, _j, _k, _len, _len1, _ref, _ref1, _ref2, _ref3, _ref4;
if (userConfig == null) {
userConfig = {};
}
if (literate == null) {
literate = false;
}
if (literate) {
source = this.invertLiterate(source);
+ }
+ for (name in userConfig) {
+ if (name !== 'coffeescript_error' && name !== '_comment') {
+ if (_rules[name] == null) {
+ void 0;
+ }
+ }
}
config = mergeDefaultConfig(userConfig);
disabled_initially = [];
_ref = source.split('\n');
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
\ No newline at end of file