-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Contains overrides for jsdoc for legacy environments still using jsduck. Fixes #285
- Loading branch information
Showing
8 changed files
with
115 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"extends": [ "./jsdoc" ], | ||
"settings": { | ||
"jsdoc": { | ||
"tagNamePreference": { | ||
"this": "context", | ||
"alias": "alternateClassName", | ||
"typedef": "type" | ||
} | ||
} | ||
}, | ||
"rules": { | ||
"jsdoc/require-returns": "off", | ||
"jsdoc/require-returns-check": "off" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"root": true, | ||
"extends": [ | ||
"../../../client", | ||
"../../../jsduck" | ||
], | ||
"rules": { | ||
"no-usused-vars": "off", | ||
"no-implicit-globals": "off" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
( function () { | ||
|
||
// eslint-disable-next-line jsdoc/check-tag-names | ||
/** | ||
* @this Foo | ||
*/ | ||
|
||
// eslint-disable-next-line jsdoc/check-tag-names | ||
/** | ||
* @alias Bar | ||
*/ | ||
|
||
// eslint-disable-next-line jsdoc/check-tag-names | ||
/** | ||
* @typedef Baz | ||
*/ | ||
|
||
}( this ) ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
( function () { | ||
var APP; | ||
|
||
// In jsduck environments we need to support this use case | ||
// to document complex returns, however this triggers | ||
// require-returns and require-returns check: | ||
|
||
// Off: jsdoc/require-returns | ||
// Off: jsdoc/require-returns-check | ||
/** | ||
* @return {Object} foo | ||
* @return {number} foo.bar | ||
*/ | ||
APP.method = function () { | ||
return { bar: 7 }; | ||
}; | ||
|
||
// These means we can't catch the following errors: | ||
|
||
// Off: jsdoc/require-returns | ||
/** | ||
* @param {number} bar | ||
*/ | ||
APP.method = function ( bar ) { | ||
return { bar: bar }; | ||
}; | ||
|
||
// Off: jsdoc/require-returns-check | ||
/** | ||
* @return {number} | ||
*/ | ||
APP.method = function () { | ||
}; | ||
|
||
// Some different aliases are used in jsduck: | ||
/** | ||
* @context {jQuery} | ||
* @alternateClassName otherName | ||
* @type {Object} | ||
*/ | ||
APP.method = function () { | ||
}; | ||
|
||
}( this ) ); |