From 391f480173fd7f45b4eb276954e9b254561eb829 Mon Sep 17 00:00:00 2001 From: Joel Kemp Date: Fri, 19 Sep 2014 00:13:50 -0400 Subject: [PATCH] validateJSDoc: Deprecate rule Closes gh-638 Fixes #59 --- README.md | 49 ++----------------------------------------- lib/string-checker.js | 2 +- 2 files changed, 3 insertions(+), 48 deletions(-) diff --git a/README.md b/README.md index 9ec2442fd..5d887d816 100644 --- a/README.md +++ b/README.md @@ -2850,55 +2850,10 @@ function a(b, c) {} function a(b , c) {} ``` -### validateJSDoc +### ~~validateJSDoc~~ -Enables JSDoc validation. +Please use the [JSCS-JSDoc](https://github.com/jscs-dev/jscs-jsdoc) plugin instead. -Type: `Object` - -Values: - - - "checkParamNames" ensures param names in jsdoc and in function declaration are equal - - "requireParamTypes" ensures params in jsdoc contains type - - "checkRedundantParams" reports redundant params in jsdoc - -#### Example - -```js -"validateJSDoc": { - "checkParamNames": true, - "checkRedundantParams": true, - "requireParamTypes": true -} -``` - -##### Valid - -```js -/** - * Adds style error to the list - * - * @param {String} message - * @param {Number|Object} line - * @param {Number} [column] - */ -add: function(message, line, column) { -} -``` - -##### Invalid - -```js -/** - * Adds style error to the list - * - * @param {String} message - * @param {Number|Object} line - * @param {Number} [column] - */ -add: function() { -} -``` ### safeContextKeyword Option to check `var that = this` expressions diff --git a/lib/string-checker.js b/lib/string-checker.js index 2e7fd45ca..fe1d4bb35 100644 --- a/lib/string-checker.js +++ b/lib/string-checker.js @@ -43,6 +43,7 @@ StringChecker.prototype = { this.registerRule(new (require('./rules/disallow-left-sticked-operators'))()); this.registerRule(new (require('./rules/require-right-sticked-operators'))()); this.registerRule(new (require('./rules/disallow-right-sticked-operators'))()); + this.registerRule(new (require('./rules/validate-jsdoc'))()); /* deprecated rules (end) */ this.registerRule(new (require('./rules/require-operator-before-line-break'))()); @@ -60,7 +61,6 @@ StringChecker.prototype = { this.registerRule(new (require('./rules/disallow-keywords-on-new-line'))()); this.registerRule(new (require('./rules/require-line-feed-at-file-end'))()); this.registerRule(new (require('./rules/maximum-line-length'))()); - this.registerRule(new (require('./rules/validate-jsdoc'))()); this.registerRule(new (require('./rules/require-yoda-conditions'))()); this.registerRule(new (require('./rules/disallow-yoda-conditions'))()); this.registerRule(new (require('./rules/require-spaces-inside-object-brackets'))());