Skip to content

Commit

Permalink
jsdoc: Update eslint-plugin-jsdoc to 32.3.0 (#368)
Browse files Browse the repository at this point in the history
Enables require-yields and require-yields-check
  • Loading branch information
edg2s committed Mar 25, 2021
1 parent bde581f commit b4f54e8
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 20 deletions.
35 changes: 19 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"eslint": "^7.17.0",
"eslint-plugin-compat": "^3.9.0",
"eslint-plugin-es": "^4.1.0",
"eslint-plugin-jsdoc": "^30.7.13",
"eslint-plugin-jsdoc": "^32.3.0",
"eslint-plugin-json-es": "^1.5.3",
"eslint-plugin-mediawiki": "^0.2.7",
"eslint-plugin-mocha": "^8.1.0",
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/jsdoc/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"root": true,
"extends": [
"../../../client",
"../../../client-es6",
"../../../jsdoc"
],
"rules": {
Expand Down
17 changes: 16 additions & 1 deletion test/fixtures/jsdoc/invalid.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @property {Function} APP
* @property {Function} APP
*/
var APP;
let APP;
/* eslint-enable jsdoc/check-property-names */

// eslint-disable-next-line jsdoc/require-property-type
Expand Down Expand Up @@ -88,6 +88,21 @@
APP.method = function () {
};

// eslint-disable-next-line jsdoc/require-yields
/**
* @param {number} foo
*/
APP.async = function * quux( foo ) {
yield foo;
};

// eslint-disable-next-line jsdoc/require-yields-check
/**
* @yield {number}
*/
APP.async = function * quux() {
};

// eslint-disable-next-line jsdoc/check-alignment
/**
* @param {number} a
Expand Down
7 changes: 6 additions & 1 deletion test/fixtures/jsdoc/valid.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
/**
* @property {Object}
*/
var APP;
let APP;

// Valid: settings.jsdoc.tagNamePreference
/**
Expand Down Expand Up @@ -78,6 +78,11 @@
return a + b;
};

// Off: jsdoc/require-throws
APP.err = function () {
throw new Error( 'Oops' );
};

// Off: jsdoc/check-examples
// Off: jsdoc/check-line-alignment
/**
Expand Down

0 comments on commit b4f54e8

Please sign in to comment.