Skip to content

Commit c84453a

Browse files
committed
Merge pull request #78 from /issues/71
checkTypes: Drop null from natives list
2 parents ef50d17 + cd94799 commit c84453a

File tree

3 files changed

+11
-14
lines changed

3 files changed

+11
-14
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ function method() {}
384384

385385
Reports invalid types for bunch of tags
386386

387-
In `strictNativeCase` mode ensures that case of natives is the same as in this list: `boolean`, `number`, `string`, `null`, `Object`, `Array`, `Date`, `RegExp`.
387+
In `strictNativeCase` mode ensures that case of natives is the same as in this list: `boolean`, `number`, `string`, `Object`, `Array`, `Date`, `RegExp`.
388388

389389
In `capitalizedNativeCase` mode ensures that first letter in all native types and primitives is uppercased except the case with `function` in google closure format: `{function(...)}`
390390

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ var strictNatives = {
3737
boolean: 'boolean',
3838
number: 'number',
3939
string: 'string',
40-
'null': 'null',
4140
// titlecased
4241
array: 'Array',
4342
object: 'Object',

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

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,6 @@ describe('lib/rules/validate-jsdoc/check-types', function() {
173173
* @param {number}
174174
* @param {string}
175175
* @param {boolean}
176-
* @param {null}
177176
* @param {Array}
178177
* @param {Object}
179178
* @param {Date}
@@ -185,7 +184,7 @@ describe('lib/rules/validate-jsdoc/check-types', function() {
185184
it: 'should not report joined strict natives',
186185
code: function() {
187186
/**
188-
* @param {number|string|boolean|null|Array|Object|Date}
187+
* @param {number|string|boolean|Array|Object|Date}
189188
*/
190189
function _f () {}
191190
}
@@ -213,10 +212,10 @@ describe('lib/rules/validate-jsdoc/check-types', function() {
213212
}
214213
}, {
215214
it: 'should report joined wrong cased strict natives',
216-
errors: 7,
215+
errors: 6,
217216
code: function() {
218217
/**
219-
* @param {Number|String|Boolean|Null}
218+
* @param {Number|String|Boolean}
220219
* @param {array|object|date}
221220
*/
222221
function _f () {}
@@ -225,11 +224,11 @@ describe('lib/rules/validate-jsdoc/check-types', function() {
225224
it: 'should report joined strict wrong cased natives',
226225
code: function() {
227226
/**
228-
* @param {Number|String|Boolean|Null|array|object|date|regexp|function}
227+
* @param {Number|String|Boolean|array|object|date|regexp|function}
229228
*/
230229
function _f () {}
231230
},
232-
errors: 9
231+
errors: 8
233232
}
234233
/* jshint ignore:end *//* jscs: enable */
235234
]);
@@ -248,7 +247,6 @@ describe('lib/rules/validate-jsdoc/check-types', function() {
248247
* @param {Number}
249248
* @param {String}
250249
* @param {Boolean}
251-
* @param {Null}
252250
* @param {Array}
253251
* @param {Object}
254252
* @param {Date}
@@ -260,7 +258,7 @@ describe('lib/rules/validate-jsdoc/check-types', function() {
260258
it: 'should not report joined native types',
261259
code: function() {
262260
/**
263-
* @param {Number|String|Boolean|Null|Array|Object|Date}
261+
* @param {Number|String|Boolean|Array|Object|Date}
264262
*/
265263
function _f () {}
266264
}
@@ -288,10 +286,10 @@ describe('lib/rules/validate-jsdoc/check-types', function() {
288286
}
289287
}, {
290288
it: 'should report joined lowercased natives',
291-
errors: 7,
289+
errors: 6,
292290
code: function() {
293291
/**
294-
* @param {number|string|boolean|null}
292+
* @param {number|string|boolean}
295293
* @param {array|object|date}
296294
*/
297295
function _f () {}
@@ -300,11 +298,11 @@ describe('lib/rules/validate-jsdoc/check-types', function() {
300298
it: 'should report joined strict wrong cased natives',
301299
code: function() {
302300
/**
303-
* @param {number|string|boolean|null|array|object|date|regexp|function}
301+
* @param {number|string|boolean|array|object|date|regexp|function}
304302
*/
305303
function _f () {}
306304
},
307-
errors: 9
305+
errors: 8
308306
}
309307
/* jshint ignore:end *//* jscs: enable */
310308
]);

0 commit comments

Comments
 (0)