coffeelint 1.9.1 → 1.10.0.pre.patch.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +2 -2
- data/coffeelint/lib/coffeelint.js +236 -69
- data/lib/coffeelint.rb +3 -3
- data/lib/coffeelint/version.rb +1 -1
- data/lib/tasks/coffeelint.rake +2 -2
- data/spec/config_spec.rb +1 -1
- metadata +23 -35
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 7720f637d2867a5667ef76f393504a66af63150f
|
4
|
+
data.tar.gz: fccb84fdb0d07e5da9d45787eafca17e88fd533a
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: e1132114822ce18e09c6661b557fde784ffeeb3150a72dd568eb147dddd456d318e8e0b2508eff81ed2f7a5fca1647e28b209e1871dc70590c5b8b5e8ae9dd25
|
7
|
+
data.tar.gz: 0c6fcb815fca593829c6e05d0edb0f2afdec674299f037b188e8947450ca3ce46700d0a7f4c3a0c644d55eac5274b897b07a4042572af5eadd5253a2b3f75901
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Coffeelint [![Build Status](https://travis-ci.org/zmbush/coffeelint-ruby.svg?branch=master)](https://travis-ci.org/zmbush/coffeelint-ruby) [![Gem Version](https://badge.fury.io/rb/coffeelint.png)](http://badge.fury.io/rb/coffeelint)
|
2
2
|
|
3
|
-
Using coffeelint version: v1.
|
3
|
+
Using coffeelint version: v1.10.0
|
4
4
|
|
5
5
|
Coffeelint is a set of simple ruby bindings for [coffeelint](https://github.com/clutchski/coffeelint).
|
6
6
|
|
@@ -36,7 +36,7 @@ Coffeelint.lint_dir(directory, [config_options]) do |filename, lint_report|
|
|
36
36
|
Coffeelint.display_test_results(filename, lint_report)
|
37
37
|
end
|
38
38
|
Coffeelint.run_test(filename of coffeescript source, [config_options]) # Run tests and print pretty results (return true/false)
|
39
|
-
Coffeelint.run_test_suite(directory, [config_options]) # Runs a pretty report recursively for a directory (
|
39
|
+
Coffeelint.run_test_suite(directory, [config_options]) # Runs a pretty report recursively for a directory (returns/exits with number of errors if any or 0)
|
40
40
|
```
|
41
41
|
|
42
42
|
### Config Options
|
@@ -6,7 +6,7 @@ CoffeeLint
|
|
6
6
|
Copyright (c) 2011 Matthew Perpick.
|
7
7
|
CoffeeLint is freely distributable under the MIT license.
|
8
8
|
*/
|
9
|
-
var ASTLinter, CoffeeScript, ERROR, ErrorReport, IGNORE, LexicalLinter, LineLinter, RULES, WARN, _rules, cache, coffeelint, defaults, difference, extend, hasSyntaxError, mergeDefaultConfig, nodeRequire, packageJSON,
|
9
|
+
var ASTLinter, CoffeeScript, ERROR, ErrorReport, IGNORE, LexicalLinter, LineLinter, RULES, WARN, _rules, cache, coffeelint, defaults, difference, extend, hasSyntaxError, mergeDefaultConfig, nodeRequire, packageJSON, sameJSON,
|
10
10
|
slice = [].slice,
|
11
11
|
indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
|
12
12
|
|
@@ -78,8 +78,15 @@ ASTLinter = require('./ast_linter.coffee');
|
|
78
78
|
cache = null;
|
79
79
|
|
80
80
|
mergeDefaultConfig = function(userConfig) {
|
81
|
-
var config, rule, ruleConfig;
|
81
|
+
var config, rule, ruleConfig, ruleLoader;
|
82
|
+
try {
|
83
|
+
ruleLoader = nodeRequire('./ruleLoader');
|
84
|
+
ruleLoader.loadFromConfig(coffeelint, userConfig);
|
85
|
+
} catch (_error) {}
|
82
86
|
config = {};
|
87
|
+
if (userConfig.coffeelint) {
|
88
|
+
config.coffeelint = userConfig.coffeelint;
|
89
|
+
}
|
83
90
|
for (rule in RULES) {
|
84
91
|
ruleConfig = RULES[rule];
|
85
92
|
config[rule] = defaults(userConfig[rule], ruleConfig);
|
@@ -87,6 +94,50 @@ mergeDefaultConfig = function(userConfig) {
|
|
87
94
|
return config;
|
88
95
|
};
|
89
96
|
|
97
|
+
sameJSON = function(a, b) {
|
98
|
+
return JSON.stringify(a) === JSON.stringify(b);
|
99
|
+
};
|
100
|
+
|
101
|
+
coffeelint.trimConfig = function(userConfig) {
|
102
|
+
var config, dConfig, dValue, key, newConfig, ref, rule, value;
|
103
|
+
newConfig = {};
|
104
|
+
userConfig = mergeDefaultConfig(userConfig);
|
105
|
+
for (rule in userConfig) {
|
106
|
+
config = userConfig[rule];
|
107
|
+
dConfig = RULES[rule];
|
108
|
+
if (rule === 'coffeelint') {
|
109
|
+
config.transforms = config._transforms;
|
110
|
+
delete config._transforms;
|
111
|
+
config.coffeescript = config._coffeescript;
|
112
|
+
delete config._coffeescript;
|
113
|
+
newConfig[rule] = config;
|
114
|
+
} else if ((config.level === (ref = dConfig.level) && ref === 'ignore')) {
|
115
|
+
void 0;
|
116
|
+
} else if (config.level === 'ignore') {
|
117
|
+
newConfig[rule] = {
|
118
|
+
level: 'ignore'
|
119
|
+
};
|
120
|
+
} else {
|
121
|
+
config.module = config._module;
|
122
|
+
delete config._module;
|
123
|
+
for (key in config) {
|
124
|
+
value = config[key];
|
125
|
+
if (key === 'message' || key === 'description' || key === 'name') {
|
126
|
+
continue;
|
127
|
+
}
|
128
|
+
dValue = dConfig[key];
|
129
|
+
if (value !== dValue && !sameJSON(value, dValue)) {
|
130
|
+
if (newConfig[rule] == null) {
|
131
|
+
newConfig[rule] = {};
|
132
|
+
}
|
133
|
+
newConfig[rule][key] = value;
|
134
|
+
}
|
135
|
+
}
|
136
|
+
}
|
137
|
+
}
|
138
|
+
return newConfig;
|
139
|
+
};
|
140
|
+
|
90
141
|
coffeelint.invertLiterate = function(source) {
|
91
142
|
var len, line, n, newSource, ref;
|
92
143
|
source = CoffeeScript.helpers.invertLiterate(source);
|
@@ -221,6 +272,10 @@ coffeelint.registerRule(require('./rules/transform_messes_up_line_numbers.coffee
|
|
221
272
|
|
222
273
|
coffeelint.registerRule(require('./rules/ensure_comprehensions.coffee'));
|
223
274
|
|
275
|
+
coffeelint.registerRule(require('./rules/no_this.coffee'));
|
276
|
+
|
277
|
+
coffeelint.registerRule(require('./rules/eol_last.coffee'));
|
278
|
+
|
224
279
|
hasSyntaxError = function(source) {
|
225
280
|
try {
|
226
281
|
CoffeeScript.tokens(source);
|
@@ -244,10 +299,6 @@ coffeelint.lint = function(source, userConfig, literate) {
|
|
244
299
|
literate = false;
|
245
300
|
}
|
246
301
|
errors = [];
|
247
|
-
try {
|
248
|
-
ruleLoader = nodeRequire('./ruleLoader');
|
249
|
-
ruleLoader.loadFromConfig(this, userConfig);
|
250
|
-
} catch (_error) {}
|
251
302
|
if (cache != null) {
|
252
303
|
cache.setConfig(userConfig);
|
253
304
|
}
|
@@ -263,15 +314,17 @@ coffeelint.lint = function(source, userConfig, literate) {
|
|
263
314
|
ref2 = userConfig != null ? (ref1 = userConfig.coffeelint) != null ? ref1.transforms : void 0 : void 0;
|
264
315
|
for (n = 0, len = ref2.length; n < len; n++) {
|
265
316
|
m = ref2[n];
|
266
|
-
|
267
|
-
|
317
|
+
try {
|
318
|
+
ruleLoader = nodeRequire('./ruleLoader');
|
319
|
+
transform = ruleLoader.require(m);
|
320
|
+
source = transform(source);
|
321
|
+
} catch (_error) {}
|
268
322
|
}
|
269
323
|
if (sourceLength !== source.split("\n").length && config.transform_messes_up_line_numbers.level !== 'ignore') {
|
270
324
|
errors.push(extend({
|
271
325
|
lineNumber: 1,
|
272
326
|
context: "File was transformed from " + sourceLength + " lines to " + (source.split("\n").length) + " lines"
|
273
327
|
}, config.transform_messes_up_line_numbers));
|
274
|
-
console.log(errors);
|
275
328
|
}
|
276
329
|
}
|
277
330
|
if ((userConfig != null ? (ref3 = userConfig.coffeelint) != null ? ref3.coffeescript : void 0 : void 0) != null) {
|
@@ -368,11 +421,11 @@ coffeelint.setCache = function(obj) {
|
|
368
421
|
|
369
422
|
|
370
423
|
|
371
|
-
},{"./../package.json":2,"./ast_linter.coffee":3,"./error_report.coffee":5,"./lexical_linter.coffee":6,"./line_linter.coffee":7,"./rules.coffee":8,"./rules/arrow_spacing.coffee":9,"./rules/braces_spacing.coffee":10,"./rules/camel_case_classes.coffee":11,"./rules/colon_assignment_spacing.coffee":12,"./rules/cyclomatic_complexity.coffee":13,"./rules/duplicate_key.coffee":14,"./rules/empty_constructor_needs_parens.coffee":15,"./rules/ensure_comprehensions.coffee":16,"./rules/
|
424
|
+
},{"./../package.json":2,"./ast_linter.coffee":3,"./error_report.coffee":5,"./lexical_linter.coffee":6,"./line_linter.coffee":7,"./rules.coffee":8,"./rules/arrow_spacing.coffee":9,"./rules/braces_spacing.coffee":10,"./rules/camel_case_classes.coffee":11,"./rules/colon_assignment_spacing.coffee":12,"./rules/cyclomatic_complexity.coffee":13,"./rules/duplicate_key.coffee":14,"./rules/empty_constructor_needs_parens.coffee":15,"./rules/ensure_comprehensions.coffee":16,"./rules/eol_last.coffee":17,"./rules/indentation.coffee":18,"./rules/line_endings.coffee":19,"./rules/max_line_length.coffee":20,"./rules/missing_fat_arrows.coffee":21,"./rules/newlines_after_classes.coffee":22,"./rules/no_backticks.coffee":23,"./rules/no_debugger.coffee":24,"./rules/no_empty_functions.coffee":25,"./rules/no_empty_param_list.coffee":26,"./rules/no_implicit_braces.coffee":27,"./rules/no_implicit_parens.coffee":28,"./rules/no_interpolation_in_single_quotes.coffee":29,"./rules/no_plusplus.coffee":30,"./rules/no_stand_alone_at.coffee":31,"./rules/no_tabs.coffee":32,"./rules/no_this.coffee":33,"./rules/no_throwing_strings.coffee":34,"./rules/no_trailing_semicolons.coffee":35,"./rules/no_trailing_whitespace.coffee":36,"./rules/no_unnecessary_double_quotes.coffee":37,"./rules/no_unnecessary_fat_arrows.coffee":38,"./rules/non_empty_constructor_needs_parens.coffee":39,"./rules/prefer_english_operator.coffee":40,"./rules/space_operators.coffee":41,"./rules/spacing_after_comma.coffee":42,"./rules/transform_messes_up_line_numbers.coffee":43}],2:[function(require,module,exports){
|
372
425
|
module.exports={
|
373
426
|
"name": "coffeelint",
|
374
427
|
"description": "Lint your CoffeeScript",
|
375
|
-
"version": "1.
|
428
|
+
"version": "1.10.0",
|
376
429
|
"homepage": "http://www.coffeelint.org",
|
377
430
|
"keywords": [
|
378
431
|
"lint",
|
@@ -399,21 +452,18 @@ module.exports={
|
|
399
452
|
"glob": "^4.0.0",
|
400
453
|
"ignore": "^2.2.15",
|
401
454
|
"optimist": "^0.6.1",
|
402
|
-
"resolve": "^0.6.3"
|
455
|
+
"resolve": "^0.6.3",
|
456
|
+
"strip-json-comments": "^1.0.2"
|
403
457
|
},
|
404
458
|
"devDependencies": {
|
405
459
|
"vows": ">=0.6.0",
|
406
460
|
"underscore": ">=1.4.4"
|
407
461
|
},
|
408
|
-
"
|
409
|
-
{
|
410
|
-
"type": "MIT",
|
411
|
-
"url": "http://github.com/clutchski/coffeelint/raw/master/LICENSE"
|
412
|
-
}
|
413
|
-
],
|
462
|
+
"license": "MIT",
|
414
463
|
"scripts": {
|
415
464
|
"pretest": "cake compile",
|
416
465
|
"test": "./vowsrunner.js --spec test/*.coffee test/*.litcoffee",
|
466
|
+
"testrule": "npm run compile && ./vowsrunner.js --spec",
|
417
467
|
"posttest": "npm run lint",
|
418
468
|
"prepublish": "cake prepublish",
|
419
469
|
"publish": "cake publish",
|
@@ -1053,11 +1103,11 @@ module.exports = ArrowSpacing = (function() {
|
|
1053
1103
|
ArrowSpacing.prototype.rule = {
|
1054
1104
|
name: 'arrow_spacing',
|
1055
1105
|
level: 'ignore',
|
1056
|
-
message: 'Function
|
1106
|
+
message: 'Function arrows (-> and =>) must be spaced properly',
|
1057
1107
|
description: "<p>This rule checks to see that there is spacing before and after\nthe arrow operator that declares a function. This rule is disabled\nby default.</p> <p>Note that if arrow_spacing is enabled, and you\npass an empty function as a parameter, arrow_spacing will accept\neither a space or no space in-between the arrow operator and the\nparenthesis</p>\n<pre><code># Both of this will not trigger an error,\n# even with arrow_spacing enabled.\nx(-> 3)\nx( -> 3)\n\n# However, this will trigger an error\nx((a,b)-> 3)\n</code>\n</pre>"
|
1058
1108
|
};
|
1059
1109
|
|
1060
|
-
ArrowSpacing.prototype.tokens = ['->'];
|
1110
|
+
ArrowSpacing.prototype.tokens = ['->', '=>'];
|
1061
1111
|
|
1062
1112
|
ArrowSpacing.prototype.lintToken = function(token, tokenApi) {
|
1063
1113
|
var pp;
|
@@ -1100,8 +1150,9 @@ module.exports = BracesSpacing = (function() {
|
|
1100
1150
|
name: 'braces_spacing',
|
1101
1151
|
level: 'ignore',
|
1102
1152
|
spaces: 0,
|
1153
|
+
empty_object_spaces: 0,
|
1103
1154
|
message: 'Curly braces must have the proper spacing',
|
1104
|
-
description: 'This rule checks to see that there is the proper spacing inside\ncurly braces. The spacing amount is specified by "spaces".\n\n<pre><code>\n# Spaces is 0\n{a: b} # Good\n{a: b } # Bad\n{ a: b} # Bad\n{ a: b } # Bad\n\n# Spaces is 1\n{a: b} # Bad\n{a: b } # Bad\n{ a: b} # Bad\n{ a: b } # Good\n{ a: b } # Bad\n{ a: b } # Bad\n{ a: b } # Bad\n</code></pre>\n\nThis rule is disabled by default.'
|
1155
|
+
description: 'This rule checks to see that there is the proper spacing inside\ncurly braces. The spacing amount is specified by "spaces".\nThe spacing amount for empty objects is specified by\n"empty_object_spaces".\n\n<pre><code>\n# Spaces is 0\n{a: b} # Good\n{a: b } # Bad\n{ a: b} # Bad\n{ a: b } # Bad\n\n# Spaces is 1\n{a: b} # Bad\n{a: b } # Bad\n{ a: b} # Bad\n{ a: b } # Good\n{ a: b } # Bad\n{ a: b } # Bad\n{ a: b } # Bad\n\n# Empty Object Spaces is 0\n{} # Good\n{ } # Bad\n\n# Empty Object Spaces is 1\n{} # Bad\n{ } # Good\n</code></pre>\n\nThis rule is disabled by default.'
|
1105
1156
|
};
|
1106
1157
|
|
1107
1158
|
BracesSpacing.prototype.tokens = ['{', '}'];
|
@@ -1127,6 +1178,16 @@ module.exports = BracesSpacing = (function() {
|
|
1127
1178
|
return firstToken[2].first_line === secondToken[2].first_line;
|
1128
1179
|
};
|
1129
1180
|
|
1181
|
+
BracesSpacing.prototype.getExpectedSpaces = function(tokenApi, firstToken, secondToken) {
|
1182
|
+
var config, ref;
|
1183
|
+
config = tokenApi.config[this.rule.name];
|
1184
|
+
if (firstToken[0] === '{' && secondToken[0] === '}') {
|
1185
|
+
return (ref = config.empty_object_spaces) != null ? ref : config.spaces;
|
1186
|
+
} else {
|
1187
|
+
return config.spaces;
|
1188
|
+
}
|
1189
|
+
};
|
1190
|
+
|
1130
1191
|
BracesSpacing.prototype.lintToken = function(token, tokenApi) {
|
1131
1192
|
var actual, expected, firstToken, msg, ref, secondToken;
|
1132
1193
|
if (token.generated) {
|
@@ -1136,7 +1197,7 @@ module.exports = BracesSpacing = (function() {
|
|
1136
1197
|
if (!this.tokensOnSameLine(firstToken, secondToken)) {
|
1137
1198
|
return null;
|
1138
1199
|
}
|
1139
|
-
expected =
|
1200
|
+
expected = this.getExpectedSpaces(tokenApi, firstToken, secondToken);
|
1140
1201
|
actual = this.distanceBetweenTokens(firstToken, secondToken);
|
1141
1202
|
if (actual === expected) {
|
1142
1203
|
return null;
|
@@ -1162,7 +1223,7 @@ module.exports = BracesSpacing = (function() {
|
|
1162
1223
|
var CamelCaseClasses, regexes;
|
1163
1224
|
|
1164
1225
|
regexes = {
|
1165
|
-
camelCase: /^[A-
|
1226
|
+
camelCase: /^[A-Z_][a-zA-Z\d]*$/
|
1166
1227
|
};
|
1167
1228
|
|
1168
1229
|
module.exports = CamelCaseClasses = (function() {
|
@@ -1171,8 +1232,8 @@ module.exports = CamelCaseClasses = (function() {
|
|
1171
1232
|
CamelCaseClasses.prototype.rule = {
|
1172
1233
|
name: 'camel_case_classes',
|
1173
1234
|
level: 'error',
|
1174
|
-
message: 'Class
|
1175
|
-
description: "This rule mandates that all class names are
|
1235
|
+
message: 'Class name should be UpperCamelCased',
|
1236
|
+
description: "This rule mandates that all class names are UpperCamelCased.\nCamel casing class names is a generally accepted way of\ndistinguishing constructor functions - which require the 'new'\nprefix to behave properly - from plain old functions.\n<pre>\n<code># Good!\nclass BoaConstrictor\n\n# Bad!\nclass boaConstrictor\n</code>\n</pre>\nThis rule is enabled by default."
|
1176
1237
|
};
|
1177
1238
|
|
1178
1239
|
CamelCaseClasses.prototype.tokens = ['CLASS'];
|
@@ -1407,17 +1468,24 @@ module.exports = EmptyConstructorNeedsParens = (function() {
|
|
1407
1468
|
EmptyConstructorNeedsParens.prototype.tokens = ['UNARY'];
|
1408
1469
|
|
1409
1470
|
EmptyConstructorNeedsParens.prototype.lintToken = function(token, tokenApi) {
|
1410
|
-
var expectedCallStart, expectedIdentifier, identifierIndex;
|
1471
|
+
var expectedCallStart, expectedIdentifier, identifierIndex, peek, ref;
|
1411
1472
|
if (token[1] === 'new') {
|
1473
|
+
peek = tokenApi.peek.bind(tokenApi);
|
1412
1474
|
identifierIndex = 1;
|
1413
1475
|
while (true) {
|
1414
|
-
expectedIdentifier =
|
1415
|
-
expectedCallStart =
|
1476
|
+
expectedIdentifier = peek(identifierIndex);
|
1477
|
+
expectedCallStart = peek(identifierIndex + 1);
|
1416
1478
|
if ((expectedIdentifier != null ? expectedIdentifier[0] : void 0) === 'IDENTIFIER') {
|
1417
1479
|
if ((expectedCallStart != null ? expectedCallStart[0] : void 0) === '.') {
|
1418
1480
|
identifierIndex += 2;
|
1419
1481
|
continue;
|
1420
1482
|
}
|
1483
|
+
if ((expectedCallStart != null ? expectedCallStart[0] : void 0) === 'INDEX_START') {
|
1484
|
+
while (((ref = peek(identifierIndex)) != null ? ref[0] : void 0) !== 'INDEX_END') {
|
1485
|
+
identifierIndex++;
|
1486
|
+
}
|
1487
|
+
continue;
|
1488
|
+
}
|
1421
1489
|
}
|
1422
1490
|
break;
|
1423
1491
|
}
|
@@ -1507,6 +1575,34 @@ module.exports = EnsureComprehensions = (function() {
|
|
1507
1575
|
|
1508
1576
|
|
1509
1577
|
},{}],17:[function(require,module,exports){
|
1578
|
+
var EOLLast;
|
1579
|
+
|
1580
|
+
module.exports = EOLLast = (function() {
|
1581
|
+
function EOLLast() {}
|
1582
|
+
|
1583
|
+
EOLLast.prototype.rule = {
|
1584
|
+
name: 'eol_last',
|
1585
|
+
level: 'ignore',
|
1586
|
+
message: 'File does not end with a single newline',
|
1587
|
+
description: "Checks that the file ends with a single newline"
|
1588
|
+
};
|
1589
|
+
|
1590
|
+
EOLLast.prototype.lintLine = function(line, lineApi) {
|
1591
|
+
if (!lineApi.isLastLine()) {
|
1592
|
+
return null;
|
1593
|
+
}
|
1594
|
+
if (line.length) {
|
1595
|
+
return true;
|
1596
|
+
}
|
1597
|
+
};
|
1598
|
+
|
1599
|
+
return EOLLast;
|
1600
|
+
|
1601
|
+
})();
|
1602
|
+
|
1603
|
+
|
1604
|
+
|
1605
|
+
},{}],18:[function(require,module,exports){
|
1510
1606
|
var Indentation;
|
1511
1607
|
|
1512
1608
|
module.exports = Indentation = (function() {
|
@@ -1631,7 +1727,7 @@ module.exports = Indentation = (function() {
|
|
1631
1727
|
|
1632
1728
|
|
1633
1729
|
|
1634
|
-
},{}],
|
1730
|
+
},{}],19:[function(require,module,exports){
|
1635
1731
|
var LineEndings;
|
1636
1732
|
|
1637
1733
|
module.exports = LineEndings = (function() {
|
@@ -1676,7 +1772,7 @@ module.exports = LineEndings = (function() {
|
|
1676
1772
|
|
1677
1773
|
|
1678
1774
|
|
1679
|
-
},{}],
|
1775
|
+
},{}],20:[function(require,module,exports){
|
1680
1776
|
var MaxLineLength, regexes;
|
1681
1777
|
|
1682
1778
|
regexes = {
|
@@ -1700,7 +1796,7 @@ module.exports = MaxLineLength = (function() {
|
|
1700
1796
|
var limitComments, lineLength, max, ref, ref1;
|
1701
1797
|
max = (ref = lineApi.config[this.rule.name]) != null ? ref.value : void 0;
|
1702
1798
|
limitComments = (ref1 = lineApi.config[this.rule.name]) != null ? ref1.limitComments : void 0;
|
1703
|
-
lineLength = line.
|
1799
|
+
lineLength = line.replace(/\s+$/, '').length;
|
1704
1800
|
if (lineApi.isLiterate() && regexes.literateComment.test(line)) {
|
1705
1801
|
lineLength -= 2;
|
1706
1802
|
}
|
@@ -1722,7 +1818,7 @@ module.exports = MaxLineLength = (function() {
|
|
1722
1818
|
|
1723
1819
|
|
1724
1820
|
|
1725
|
-
},{}],
|
1821
|
+
},{}],21:[function(require,module,exports){
|
1726
1822
|
var MissingFatArrows, any, containsButIsnt,
|
1727
1823
|
bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
|
1728
1824
|
indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
|
@@ -1761,8 +1857,9 @@ module.exports = MissingFatArrows = (function() {
|
|
1761
1857
|
MissingFatArrows.prototype.rule = {
|
1762
1858
|
name: 'missing_fat_arrows',
|
1763
1859
|
level: 'ignore',
|
1860
|
+
is_strict: false,
|
1764
1861
|
message: 'Used `this` in a function without a fat arrow',
|
1765
|
-
description: "Warns when you use `this` inside a function that wasn't defined\nwith a fat arrow. This rule does not apply to methods defined in a\nclass, since they have `this` bound to the class instance (or the\nclass itself, for class methods).\n\nIt is impossible to statically determine whether a function using\n`this` will be bound with the correct `this` value due to language\nfeatures like `Function.prototype.call` and\n`Function.prototype.bind`, so this rule may produce false positives."
|
1862
|
+
description: "Warns when you use `this` inside a function that wasn't defined\nwith a fat arrow. This rule does not apply to methods defined in a\nclass, since they have `this` bound to the class instance (or the\nclass itself, for class methods). The option `is_strict` is\navailable for checking bindings of class methods.\n\nIt is impossible to statically determine whether a function using\n`this` will be bound with the correct `this` value due to language\nfeatures like `Function.prototype.call` and\n`Function.prototype.bind`, so this rule may produce false positives."
|
1766
1863
|
};
|
1767
1864
|
|
1768
1865
|
MissingFatArrows.prototype.lintAST = function(node, astApi) {
|
@@ -1772,11 +1869,15 @@ module.exports = MissingFatArrows = (function() {
|
|
1772
1869
|
};
|
1773
1870
|
|
1774
1871
|
MissingFatArrows.prototype.lintNode = function(node, methods) {
|
1775
|
-
var error;
|
1872
|
+
var error, is_strict, ref;
|
1776
1873
|
if (methods == null) {
|
1777
1874
|
methods = [];
|
1778
1875
|
}
|
1779
|
-
|
1876
|
+
is_strict = (ref = this.astApi.config[this.rule.name]) != null ? ref.is_strict : void 0;
|
1877
|
+
if (this.isConstructor(node)) {
|
1878
|
+
return;
|
1879
|
+
}
|
1880
|
+
if ((!this.isFatArrowCode(node)) && (is_strict ? true : indexOf.call(methods, node) < 0) && (this.needsFatArrow(node))) {
|
1780
1881
|
error = this.astApi.createError({
|
1781
1882
|
lineNumber: node.locationData.first_line + 1
|
1782
1883
|
});
|
@@ -1822,6 +1923,11 @@ module.exports = MissingFatArrows = (function() {
|
|
1822
1923
|
return this.isCode(node) && node.bound;
|
1823
1924
|
};
|
1824
1925
|
|
1926
|
+
MissingFatArrows.prototype.isConstructor = function(node) {
|
1927
|
+
var ref, ref1;
|
1928
|
+
return ((ref = node.variable) != null ? (ref1 = ref.base) != null ? ref1.value : void 0 : void 0) === 'constructor';
|
1929
|
+
};
|
1930
|
+
|
1825
1931
|
MissingFatArrows.prototype.needsFatArrow = function(node) {
|
1826
1932
|
return this.isCode(node) && (any(node.params, (function(_this) {
|
1827
1933
|
return function(param) {
|
@@ -1849,7 +1955,7 @@ module.exports = MissingFatArrows = (function() {
|
|
1849
1955
|
|
1850
1956
|
|
1851
1957
|
|
1852
|
-
},{}],
|
1958
|
+
},{}],22:[function(require,module,exports){
|
1853
1959
|
var NewlinesAfterClasses;
|
1854
1960
|
|
1855
1961
|
module.exports = NewlinesAfterClasses = (function() {
|
@@ -1860,7 +1966,7 @@ module.exports = NewlinesAfterClasses = (function() {
|
|
1860
1966
|
value: 3,
|
1861
1967
|
level: 'ignore',
|
1862
1968
|
message: 'Wrong count of newlines between a class and other code',
|
1863
|
-
description: "Checks the number of newlines between classes and other code"
|
1969
|
+
description: "<p>Checks the number of newlines between classes and other code.</p>\n\nOptions:\n- <pre><code>value</code></pre> - The number of required newlines\nafter class definitions. Defaults to 3."
|
1864
1970
|
};
|
1865
1971
|
|
1866
1972
|
NewlinesAfterClasses.prototype.lintLine = function(line, lineApi) {
|
@@ -1885,7 +1991,7 @@ module.exports = NewlinesAfterClasses = (function() {
|
|
1885
1991
|
|
1886
1992
|
|
1887
1993
|
|
1888
|
-
},{}],
|
1994
|
+
},{}],23:[function(require,module,exports){
|
1889
1995
|
var NoBackticks;
|
1890
1996
|
|
1891
1997
|
module.exports = NoBackticks = (function() {
|
@@ -1910,7 +2016,7 @@ module.exports = NoBackticks = (function() {
|
|
1910
2016
|
|
1911
2017
|
|
1912
2018
|
|
1913
|
-
},{}],
|
2019
|
+
},{}],24:[function(require,module,exports){
|
1914
2020
|
var NoDebugger;
|
1915
2021
|
|
1916
2022
|
module.exports = NoDebugger = (function() {
|
@@ -1919,16 +2025,28 @@ module.exports = NoDebugger = (function() {
|
|
1919
2025
|
NoDebugger.prototype.rule = {
|
1920
2026
|
name: 'no_debugger',
|
1921
2027
|
level: 'warn',
|
1922
|
-
message: '
|
1923
|
-
|
2028
|
+
message: 'Found debugging code',
|
2029
|
+
console: false,
|
2030
|
+
description: "This rule detects `debugger` and optionally `console` calls\nThis rule is `warn` by default."
|
1924
2031
|
};
|
1925
2032
|
|
1926
|
-
NoDebugger.prototype.tokens = ["DEBUGGER"];
|
2033
|
+
NoDebugger.prototype.tokens = ["DEBUGGER", "IDENTIFIER"];
|
1927
2034
|
|
1928
2035
|
NoDebugger.prototype.lintToken = function(token, tokenApi) {
|
1929
|
-
|
1930
|
-
|
1931
|
-
|
2036
|
+
var method, ref, ref1;
|
2037
|
+
if (token[0] === 'DEBUGGER') {
|
2038
|
+
return {
|
2039
|
+
context: "found '" + token[0] + "'"
|
2040
|
+
};
|
2041
|
+
}
|
2042
|
+
if ((ref = tokenApi.config[this.rule.name]) != null ? ref.console : void 0) {
|
2043
|
+
if (token[1] === 'console' && ((ref1 = tokenApi.peek(1)) != null ? ref1[0] : void 0) === '.') {
|
2044
|
+
method = tokenApi.peek(2);
|
2045
|
+
return {
|
2046
|
+
context: "found 'console." + method[1] + "'"
|
2047
|
+
};
|
2048
|
+
}
|
2049
|
+
}
|
1932
2050
|
};
|
1933
2051
|
|
1934
2052
|
return NoDebugger;
|
@@ -1937,7 +2055,7 @@ module.exports = NoDebugger = (function() {
|
|
1937
2055
|
|
1938
2056
|
|
1939
2057
|
|
1940
|
-
},{}],
|
2058
|
+
},{}],25:[function(require,module,exports){
|
1941
2059
|
var NoEmptyFunctions, isEmptyCode;
|
1942
2060
|
|
1943
2061
|
isEmptyCode = function(node, astApi) {
|
@@ -1982,7 +2100,7 @@ module.exports = NoEmptyFunctions = (function() {
|
|
1982
2100
|
|
1983
2101
|
|
1984
2102
|
|
1985
|
-
},{}],
|
2103
|
+
},{}],26:[function(require,module,exports){
|
1986
2104
|
var NoEmptyParamList;
|
1987
2105
|
|
1988
2106
|
module.exports = NoEmptyParamList = (function() {
|
@@ -2009,7 +2127,7 @@ module.exports = NoEmptyParamList = (function() {
|
|
2009
2127
|
|
2010
2128
|
|
2011
2129
|
|
2012
|
-
},{}],
|
2130
|
+
},{}],27:[function(require,module,exports){
|
2013
2131
|
var NoImplicitBraces;
|
2014
2132
|
|
2015
2133
|
module.exports = NoImplicitBraces = (function() {
|
@@ -2069,7 +2187,7 @@ module.exports = NoImplicitBraces = (function() {
|
|
2069
2187
|
|
2070
2188
|
|
2071
2189
|
|
2072
|
-
},{}],
|
2190
|
+
},{}],28:[function(require,module,exports){
|
2073
2191
|
var NoImplicitParens;
|
2074
2192
|
|
2075
2193
|
module.exports = NoImplicitParens = (function() {
|
@@ -2112,7 +2230,7 @@ module.exports = NoImplicitParens = (function() {
|
|
2112
2230
|
|
2113
2231
|
|
2114
2232
|
|
2115
|
-
},{}],
|
2233
|
+
},{}],29:[function(require,module,exports){
|
2116
2234
|
var NoInterpolationInSingleQuotes;
|
2117
2235
|
|
2118
2236
|
module.exports = NoInterpolationInSingleQuotes = (function() {
|
@@ -2130,7 +2248,7 @@ module.exports = NoInterpolationInSingleQuotes = (function() {
|
|
2130
2248
|
NoInterpolationInSingleQuotes.prototype.lintToken = function(token, tokenApi) {
|
2131
2249
|
var hasInterpolation, tokenValue;
|
2132
2250
|
tokenValue = token[1];
|
2133
|
-
hasInterpolation = tokenValue.match(
|
2251
|
+
hasInterpolation = tokenValue.match(/^\'.*#\{[^}]+\}.*\'$/);
|
2134
2252
|
return hasInterpolation;
|
2135
2253
|
};
|
2136
2254
|
|
@@ -2140,7 +2258,7 @@ module.exports = NoInterpolationInSingleQuotes = (function() {
|
|
2140
2258
|
|
2141
2259
|
|
2142
2260
|
|
2143
|
-
},{}],
|
2261
|
+
},{}],30:[function(require,module,exports){
|
2144
2262
|
var NoPlusPlus;
|
2145
2263
|
|
2146
2264
|
module.exports = NoPlusPlus = (function() {
|
@@ -2167,7 +2285,7 @@ module.exports = NoPlusPlus = (function() {
|
|
2167
2285
|
|
2168
2286
|
|
2169
2287
|
|
2170
|
-
},{}],
|
2288
|
+
},{}],31:[function(require,module,exports){
|
2171
2289
|
var NoStandAloneAt;
|
2172
2290
|
|
2173
2291
|
module.exports = NoStandAloneAt = (function() {
|
@@ -2204,7 +2322,7 @@ module.exports = NoStandAloneAt = (function() {
|
|
2204
2322
|
|
2205
2323
|
|
2206
2324
|
|
2207
|
-
},{}],
|
2325
|
+
},{}],32:[function(require,module,exports){
|
2208
2326
|
var NoTabs, indentationRegex,
|
2209
2327
|
indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
|
2210
2328
|
|
@@ -2236,7 +2354,32 @@ module.exports = NoTabs = (function() {
|
|
2236
2354
|
|
2237
2355
|
|
2238
2356
|
|
2239
|
-
},{}],
|
2357
|
+
},{}],33:[function(require,module,exports){
|
2358
|
+
var NoThis;
|
2359
|
+
|
2360
|
+
module.exports = NoThis = (function() {
|
2361
|
+
function NoThis() {}
|
2362
|
+
|
2363
|
+
NoThis.prototype.rule = {
|
2364
|
+
name: 'no_this',
|
2365
|
+
description: 'This rule prohibits \'this\'.\nUse \'@\' instead.',
|
2366
|
+
level: 'ignore',
|
2367
|
+
message: "Don't use 'this', use '@' instead"
|
2368
|
+
};
|
2369
|
+
|
2370
|
+
NoThis.prototype.tokens = ['THIS'];
|
2371
|
+
|
2372
|
+
NoThis.prototype.lintToken = function(token, tokenApi) {
|
2373
|
+
return true;
|
2374
|
+
};
|
2375
|
+
|
2376
|
+
return NoThis;
|
2377
|
+
|
2378
|
+
})();
|
2379
|
+
|
2380
|
+
|
2381
|
+
|
2382
|
+
},{}],34:[function(require,module,exports){
|
2240
2383
|
var NoThrowingStrings;
|
2241
2384
|
|
2242
2385
|
module.exports = NoThrowingStrings = (function() {
|
@@ -2264,7 +2407,7 @@ module.exports = NoThrowingStrings = (function() {
|
|
2264
2407
|
|
2265
2408
|
|
2266
2409
|
|
2267
|
-
},{}],
|
2410
|
+
},{}],35:[function(require,module,exports){
|
2268
2411
|
var NoTrailingSemicolons, regexes,
|
2269
2412
|
indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; },
|
2270
2413
|
slice = [].slice;
|
@@ -2317,7 +2460,7 @@ module.exports = NoTrailingSemicolons = (function() {
|
|
2317
2460
|
|
2318
2461
|
|
2319
2462
|
|
2320
|
-
},{}],
|
2463
|
+
},{}],36:[function(require,module,exports){
|
2321
2464
|
var NoTrailingWhitespace, regexes;
|
2322
2465
|
|
2323
2466
|
regexes = {
|
@@ -2381,7 +2524,7 @@ module.exports = NoTrailingWhitespace = (function() {
|
|
2381
2524
|
|
2382
2525
|
|
2383
2526
|
|
2384
|
-
},{}],
|
2527
|
+
},{}],37:[function(require,module,exports){
|
2385
2528
|
var NoUnnecessaryDoubleQuotes;
|
2386
2529
|
|
2387
2530
|
module.exports = NoUnnecessaryDoubleQuotes = (function() {
|
@@ -2400,7 +2543,7 @@ module.exports = NoUnnecessaryDoubleQuotes = (function() {
|
|
2400
2543
|
NoUnnecessaryDoubleQuotes.prototype.tokens = ['STRING', 'STRING_START', 'STRING_END'];
|
2401
2544
|
|
2402
2545
|
NoUnnecessaryDoubleQuotes.prototype.lintToken = function(token, tokenApi) {
|
2403
|
-
var hasLegalConstructs, stringValue, tokenValue, type;
|
2546
|
+
var hasLegalConstructs, ref, stringValue, tokenValue, type;
|
2404
2547
|
type = token[0], tokenValue = token[1];
|
2405
2548
|
if (type === 'STRING_START' || type === 'STRING_END') {
|
2406
2549
|
return this.trackParens.apply(this, arguments);
|
@@ -2409,6 +2552,9 @@ module.exports = NoUnnecessaryDoubleQuotes = (function() {
|
|
2409
2552
|
if (!stringValue) {
|
2410
2553
|
return false;
|
2411
2554
|
}
|
2555
|
+
if (((ref = tokenApi.peek(2)) != null ? ref[0] : void 0) === 'REGEX_END') {
|
2556
|
+
return false;
|
2557
|
+
}
|
2412
2558
|
hasLegalConstructs = this.isInterpolation || this.hasSingleQuote(tokenValue);
|
2413
2559
|
return !hasLegalConstructs;
|
2414
2560
|
};
|
@@ -2432,7 +2578,7 @@ module.exports = NoUnnecessaryDoubleQuotes = (function() {
|
|
2432
2578
|
|
2433
2579
|
|
2434
2580
|
|
2435
|
-
},{}],
|
2581
|
+
},{}],38:[function(require,module,exports){
|
2436
2582
|
var NoUnnecessaryFatArrows, any,
|
2437
2583
|
bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
|
2438
2584
|
|
@@ -2514,7 +2660,7 @@ module.exports = NoUnnecessaryFatArrows = (function() {
|
|
2514
2660
|
|
2515
2661
|
|
2516
2662
|
|
2517
|
-
},{}],
|
2663
|
+
},{}],39:[function(require,module,exports){
|
2518
2664
|
var NonEmptyConstructorNeedsParens, ParentClass,
|
2519
2665
|
extend = 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; },
|
2520
2666
|
hasProp = {}.hasOwnProperty;
|
@@ -2547,7 +2693,7 @@ module.exports = NonEmptyConstructorNeedsParens = (function(superClass) {
|
|
2547
2693
|
|
2548
2694
|
|
2549
2695
|
|
2550
|
-
},{"./empty_constructor_needs_parens.coffee":15}],
|
2696
|
+
},{"./empty_constructor_needs_parens.coffee":15}],40:[function(require,module,exports){
|
2551
2697
|
var RuleProcessor;
|
2552
2698
|
|
2553
2699
|
module.exports = RuleProcessor = (function() {
|
@@ -2609,7 +2755,7 @@ module.exports = RuleProcessor = (function() {
|
|
2609
2755
|
|
2610
2756
|
|
2611
2757
|
|
2612
|
-
},{}],
|
2758
|
+
},{}],41:[function(require,module,exports){
|
2613
2759
|
var SpaceOperators,
|
2614
2760
|
indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
|
2615
2761
|
|
@@ -2714,12 +2860,10 @@ module.exports = SpaceOperators = (function() {
|
|
2714
2860
|
|
2715
2861
|
|
2716
2862
|
|
2717
|
-
},{}],
|
2863
|
+
},{}],42:[function(require,module,exports){
|
2718
2864
|
var RuleProcessor;
|
2719
2865
|
|
2720
2866
|
module.exports = RuleProcessor = (function() {
|
2721
|
-
function RuleProcessor() {}
|
2722
|
-
|
2723
2867
|
RuleProcessor.prototype.rule = {
|
2724
2868
|
name: 'spacing_after_comma',
|
2725
2869
|
description: 'This rule requires a space after commas.',
|
@@ -2727,23 +2871,46 @@ module.exports = RuleProcessor = (function() {
|
|
2727
2871
|
message: 'Spaces are required after commas'
|
2728
2872
|
};
|
2729
2873
|
|
2730
|
-
RuleProcessor.prototype.tokens = [','];
|
2874
|
+
RuleProcessor.prototype.tokens = [',', 'REGEX_START', 'REGEX_END'];
|
2875
|
+
|
2876
|
+
function RuleProcessor() {
|
2877
|
+
this.inRegex = false;
|
2878
|
+
}
|
2731
2879
|
|
2732
2880
|
RuleProcessor.prototype.lintToken = function(token, tokenApi) {
|
2733
|
-
|
2881
|
+
var type;
|
2882
|
+
type = token[0];
|
2883
|
+
if (type === 'REGEX_START') {
|
2884
|
+
this.inRegex = true;
|
2885
|
+
return;
|
2886
|
+
}
|
2887
|
+
if (type === 'REGEX_END') {
|
2888
|
+
this.inRegex = false;
|
2889
|
+
return;
|
2890
|
+
}
|
2891
|
+
if (!(token.spaced || token.newLine || token.generated || this.isRegexFlag(token, tokenApi))) {
|
2734
2892
|
return {
|
2735
2893
|
context: token[1]
|
2736
2894
|
};
|
2737
2895
|
}
|
2738
2896
|
};
|
2739
2897
|
|
2898
|
+
RuleProcessor.prototype.isRegexFlag = function(token, tokenApi) {
|
2899
|
+
var maybeEnd;
|
2900
|
+
if (!this.inRegex) {
|
2901
|
+
return false;
|
2902
|
+
}
|
2903
|
+
maybeEnd = tokenApi.peek(3);
|
2904
|
+
return (maybeEnd != null ? maybeEnd[0] : void 0) === 'REGEX_END';
|
2905
|
+
};
|
2906
|
+
|
2740
2907
|
return RuleProcessor;
|
2741
2908
|
|
2742
2909
|
})();
|
2743
2910
|
|
2744
2911
|
|
2745
2912
|
|
2746
|
-
},{}],
|
2913
|
+
},{}],43:[function(require,module,exports){
|
2747
2914
|
var CamelCaseClasses;
|
2748
2915
|
|
2749
2916
|
module.exports = CamelCaseClasses = (function() {
|
data/lib/coffeelint.rb
CHANGED
@@ -107,11 +107,11 @@ module Coffeelint
|
|
107
107
|
|
108
108
|
def self.run_test_suite(directory, config = {})
|
109
109
|
pretty_output = config.has_key?(:pretty_output) ? config.delete(:pretty_output) : true
|
110
|
-
|
110
|
+
errors_count = 0
|
111
111
|
Coffeelint.lint_dir(directory, config) do |name, errors|
|
112
|
+
errors_count += errors.count
|
112
113
|
result = Coffeelint.display_test_results(name, errors, pretty_output)
|
113
|
-
success = false if not result
|
114
114
|
end
|
115
|
-
|
115
|
+
errors_count
|
116
116
|
end
|
117
117
|
end
|
data/lib/coffeelint/version.rb
CHANGED
data/lib/tasks/coffeelint.rake
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
desc "lint application javascript"
|
2
2
|
task :coffeelint do
|
3
|
-
|
4
|
-
fail "Lint!" unless
|
3
|
+
failures = Coffeelint.run_test_suite('app') + Coffeelint.run_test_suite('spec')
|
4
|
+
fail "Lint!" unless failures == 0
|
5
5
|
end
|
data/spec/config_spec.rb
CHANGED
@@ -51,7 +51,7 @@ module CoffeeLint
|
|
51
51
|
expect(Config.send(:config_files_in_path, [''])).to eq(result)
|
52
52
|
end
|
53
53
|
|
54
|
-
it 'builds
|
54
|
+
it 'builds useful path segements' do
|
55
55
|
result = %w(config/coffeelint.json config/.coffeelint.json)
|
56
56
|
expect(Config.send(:config_files_in_path, 'config')).to eq(result)
|
57
57
|
expect(Config.send(:config_files_in_path, ['config'])).to eq(result)
|
metadata
CHANGED
@@ -1,94 +1,83 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: coffeelint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
5
|
-
prerelease:
|
4
|
+
version: 1.10.0.pre.patch.1
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Zachary Bush
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2015-
|
11
|
+
date: 2015-08-19 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: coffee-script
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - ">="
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '0'
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - ">="
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '0'
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: json
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - ">="
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: '0'
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- -
|
38
|
+
- - ">="
|
44
39
|
- !ruby/object:Gem::Version
|
45
40
|
version: '0'
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: execjs
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- -
|
45
|
+
- - ">="
|
52
46
|
- !ruby/object:Gem::Version
|
53
47
|
version: '0'
|
54
48
|
type: :runtime
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
|
-
- -
|
52
|
+
- - ">="
|
60
53
|
- !ruby/object:Gem::Version
|
61
54
|
version: '0'
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: rspec
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
|
-
- - ~>
|
59
|
+
- - "~>"
|
68
60
|
- !ruby/object:Gem::Version
|
69
61
|
version: 3.1.0
|
70
62
|
type: :development
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
|
-
- - ~>
|
66
|
+
- - "~>"
|
76
67
|
- !ruby/object:Gem::Version
|
77
68
|
version: 3.1.0
|
78
69
|
- !ruby/object:Gem::Dependency
|
79
70
|
name: rake
|
80
71
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
72
|
requirements:
|
83
|
-
- -
|
73
|
+
- - ">="
|
84
74
|
- !ruby/object:Gem::Version
|
85
75
|
version: '0'
|
86
76
|
type: :development
|
87
77
|
prerelease: false
|
88
78
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
79
|
requirements:
|
91
|
-
- -
|
80
|
+
- - ">="
|
92
81
|
- !ruby/object:Gem::Version
|
93
82
|
version: '0'
|
94
83
|
description: Ruby bindings for coffeelint
|
@@ -99,16 +88,17 @@ executables:
|
|
99
88
|
extensions: []
|
100
89
|
extra_rdoc_files: []
|
101
90
|
files:
|
102
|
-
- .gitignore
|
103
|
-
- .gitmodules
|
104
|
-
- .rspec
|
105
|
-
- .travis.yml
|
91
|
+
- ".gitignore"
|
92
|
+
- ".gitmodules"
|
93
|
+
- ".rspec"
|
94
|
+
- ".travis.yml"
|
106
95
|
- Gemfile
|
107
96
|
- LICENSE.txt
|
108
97
|
- README.md
|
109
98
|
- Rakefile
|
110
99
|
- bin/coffeelint.rb
|
111
100
|
- coffeelint.gemspec
|
101
|
+
- coffeelint/lib/coffeelint.js
|
112
102
|
- lib/coffeelint.rb
|
113
103
|
- lib/coffeelint/cmd.rb
|
114
104
|
- lib/coffeelint/config.rb
|
@@ -119,31 +109,29 @@ files:
|
|
119
109
|
- spec/coffeelint_spec.rb
|
120
110
|
- spec/config_spec.rb
|
121
111
|
- spec/spec_helper.rb
|
122
|
-
- coffeelint/lib/coffeelint.js
|
123
112
|
homepage: https://github.com/zipcodeman/coffeelint-ruby
|
124
113
|
licenses:
|
125
114
|
- MIT
|
115
|
+
metadata: {}
|
126
116
|
post_install_message:
|
127
117
|
rdoc_options: []
|
128
118
|
require_paths:
|
129
119
|
- lib
|
130
120
|
required_ruby_version: !ruby/object:Gem::Requirement
|
131
|
-
none: false
|
132
121
|
requirements:
|
133
|
-
- -
|
122
|
+
- - ">="
|
134
123
|
- !ruby/object:Gem::Version
|
135
124
|
version: '0'
|
136
125
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
137
|
-
none: false
|
138
126
|
requirements:
|
139
|
-
- -
|
127
|
+
- - ">"
|
140
128
|
- !ruby/object:Gem::Version
|
141
|
-
version:
|
129
|
+
version: 1.3.1
|
142
130
|
requirements: []
|
143
131
|
rubyforge_project:
|
144
|
-
rubygems_version:
|
132
|
+
rubygems_version: 2.4.5
|
145
133
|
signing_key:
|
146
|
-
specification_version:
|
134
|
+
specification_version: 4
|
147
135
|
summary: Ruby bindings for coffeelint along with railtie to add rake task to rails
|
148
136
|
test_files:
|
149
137
|
- spec/assets/.coffeelint.json
|