Skip to content

Commit 4768a12

Browse files
author
Alexej Yaroshevich
committed
checkTypes: fixup indent
1 parent 08e307f commit 4768a12

File tree

1 file changed

+30
-30
lines changed

1 file changed

+30
-30
lines changed

lib/rules/validate-jsdoc/check-types.js

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -72,36 +72,36 @@ function validateTypesInTags(file, errors) {
7272
*/
7373
function(tag) {
7474

75-
if (!tag.type) {
76-
// skip untyped params
77-
return;
78-
}
79-
if (!tag.type.valid) {
80-
// throw an error if not valid
81-
errors.add('expects valid type instead of ' + tag.type.value, tag.type.loc);
82-
}
83-
if (strictNativeCase || capitalizedNativeCase) {
84-
tag.type.iterate(function(node) {
85-
// it shouldn't be!
86-
if (!node.typeName) {
87-
// skip untyped unknown things
88-
return;
89-
}
75+
if (!tag.type) {
76+
// skip untyped params
77+
return;
78+
}
79+
if (!tag.type.valid) {
80+
// throw an error if not valid
81+
errors.add('expects valid type instead of ' + tag.type.value, tag.type.loc);
82+
}
83+
if (strictNativeCase || capitalizedNativeCase) {
84+
tag.type.iterate(function(node) {
85+
// it shouldn't be!
86+
if (!node.typeName) {
87+
// skip untyped unknown things
88+
return;
89+
}
9090

91-
// is native?
92-
var type = node.typeName;
93-
var lowerType = type.toLowerCase();
94-
//console.log(capitalizedNativeCase, type, lowerType, strictNatives.hasOwnProperty(type));
95-
if (!strictNatives.hasOwnProperty(lowerType)) {
96-
return;
97-
}
98-
var normType = strictNatives[lowerType];
99-
if (strictNativeCase && type !== normType ||
100-
capitalizedNativeCase && type !== (normType[0].toUpperCase() + normType.substr(1))) {
101-
errors.add('invalid case of type `' + type + '`', tag.type.loc);
102-
}
103-
});
104-
}
105-
});
91+
// is native?
92+
var type = node.typeName;
93+
var lowerType = type.toLowerCase();
94+
//console.log(capitalizedNativeCase, type, lowerType, strictNatives.hasOwnProperty(type));
95+
if (!strictNatives.hasOwnProperty(lowerType)) {
96+
return;
97+
}
98+
var normType = strictNatives[lowerType];
99+
if (strictNativeCase && type !== normType ||
100+
capitalizedNativeCase && type !== (normType[0].toUpperCase() + normType.substr(1))) {
101+
errors.add('invalid case of type `' + type + '`', tag.type.loc);
102+
}
103+
});
104+
}
105+
});
106106
});
107107
}

0 commit comments

Comments
 (0)