Skip to content

Commit ecefdc6

Browse files
author
Alexej Yaroshevich
committed
fixup bug in .jscsrc, clean up codestyle errors, fixup versions
1 parent aee2805 commit ecefdc6

8 files changed

Lines changed: 12 additions & 13 deletions

File tree

.jscsrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"preset": "google",
3-
"fileExtensions": "jscs",
43

54
"requireParenthesesAroundIIFE": true,
65
"maximumLineLength": 120,

lib/jsdoc-helpers.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ function jsDocParseComments (comments) {
3030
}
3131

3232
function jsDocForEachTag (fn) {
33-
if (!this.data.tags || !this.data.tags.length) return;
33+
if (!this.data.tags || !this.data.tags.length) {
34+
return;
35+
}
3436
this.data.tags.forEach(fn);
3537
}
3638

lib/rules/validate-jsdoc.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ module.exports.prototype = {
2424
validators.checkOptions(v, options);
2525
}
2626
}.bind(this));
27-
28-
2927
},
3028

3129
getOptionName: function () {

lib/rules/validate-jsdoc/check-redundant-access.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ function checkRedundantAccess(node, err) {
1414
return;
1515
}
1616

17-
var access;
17+
var access;
1818
node.jsDoc.data.tags.forEach(function (tag) {
1919
if (['private', 'protected', 'public', 'access'].indexOf(tag.tag) === -1) {
2020
return;
2121
}
2222

2323
if (access) {
24-
err('Multiple access definition');
25-
return;
24+
err('Multiple access definition');
25+
return;
2626
}
2727

2828
if (tag.tag === 'access' && !tag.name) {

lib/rules/validate-jsdoc/leading-underscore-access.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function validateLeadingUnderscoresAccess(node, err) {
2727
name = node.parentNode.key.name;
2828
break;
2929
default: // try to use func name itself (if not anonymous)
30-
name = (node.id||{}).name;
30+
name = (node.id || {}).name;
3131
break;
3232
}
3333

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "jscs-jsdoc",
33
"author": "Alexej Yaroshevich <[email protected]>",
44
"description": "JSCS jsdoc plugin",
5-
"version": "0.0.8",
5+
"version": "0.0.9",
66
"main": "lib/index",
77
"homepage": "https://github.com/zxqfox/jscs-jsdoc",
88
"license": "MIT",
@@ -17,7 +17,7 @@
1717
"Alexej Yaroshevich <[email protected]>"
1818
],
1919
"engines": {
20-
"node": ">= 0.8.0"
20+
"node": ">= 0.10.0"
2121
},
2222
"dependencies": {
2323
"comment-parser": "zxqfox/comment-parser#jscs-jsdoc",
@@ -27,7 +27,7 @@
2727
"browserify": "~3.30.2",
2828
"chai": "^1.9.1",
2929
"esprima": "^1.2.2",
30-
"jscs": ">=1.3.0 <2.0",
30+
"jscs": ">=1.5.9 <2.0",
3131
"jshint": "~2.5.4",
3232
"mocha": "~1.17.1"
3333
},

test/init.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ function rulesChecker(opts) {
5353
items = items || [];
5454
items.forEach(function (test) {
5555

56-
(test.skip? it.skip : it)(test.it, function () {
56+
(test.skip ? it.skip : it)(test.it, function () {
5757
if (test.rules) {
5858
checker.configure({ jsDoc: test.rules });
5959
}

test/lib/rules/validate-jsdoc/leading-underscore-access.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ describe('rules/validate-jsdoc', function () {
7070
*/
7171
function _funcName(p) {}
7272
},
73-
errors: [{ line: 6, column: 0, message: "Method access doesn't match", rule: "jsDoc" }]
73+
errors: [{ line: 6, column: 0, message: 'Method access doesn\'t match', rule: 'jsDoc' }]
7474
}, {
7575
it: 'should skip anonymous',
7676
rules: {leadingUnderscoreAccess: true},

0 commit comments

Comments
 (0)