Skip to content

Commit 2263035

Browse files
committed
Improve jsdoc
1 parent a88a606 commit 2263035

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

src/js/_enqueues/vendor/codemirror/fakejshint.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ window.JSHINT = ( () => {
5858
errors.length = 0;
5959
try {
6060
espree.parse( source, {
61-
...getOptions( options ),
61+
...getEspreeOptions( options ),
6262
loc: true,
6363
} );
6464
} catch ( error ) {
@@ -69,15 +69,15 @@ window.JSHINT = ( () => {
6969
/**
7070
* Gets the options for Espree from the supported JSHint options.
7171
*
72-
* @param {SupportedJSHintOptions} [options={}] - Linting options.
72+
* @param {SupportedJSHintOptions} [options={}] - Linting options for JSHint.
7373
* @return {{
7474
* ecmaVersion?: number|'latest',
7575
* ecmaFeatures?: {
7676
* impliedStrict?: true
7777
* }
7878
* }}
7979
*/
80-
function getOptions( options ) {
80+
function getEspreeOptions( options ) {
8181
const ecmaFeatures = {};
8282
if ( options.strict === 'implied' ) {
8383
ecmaFeatures.impliedStrict = true;
@@ -94,7 +94,7 @@ window.JSHINT = ( () => {
9494
* Converts a SyntaxError to a JSHINT error.
9595
*
9696
* @param {SyntaxError} error - SyntaxError to convert.
97-
* @returns {JSHintError}
97+
* @return {JSHintError} JSHint error.
9898
*/
9999
function convertError( error ) {
100100
return {
@@ -108,8 +108,8 @@ window.JSHINT = ( () => {
108108
/**
109109
* Gets the ECMAScript version.
110110
*
111-
* @param {SupportedJSHintOptions} options
112-
* @returns {number|'latest'}
111+
* @param {SupportedJSHintOptions} options - Options.
112+
* @return {number|'latest'}
113113
*/
114114
function getEcmaVersion( options ) {
115115
if ( typeof options.esversion === 'number' ) {
@@ -146,7 +146,7 @@ window.JSHINT = ( () => {
146146
/**
147147
* Generates a report containing details about the most recent invocation of JSHINT.
148148
*
149-
* @returns {{
149+
* @return {{
150150
* options: SupportedJSHintOptions,
151151
* errors: JSHintError[]
152152
* }}

0 commit comments

Comments
 (0)