From 4b4b41b74dc44178c571aac8b1a3d3437727cc7f Mon Sep 17 00:00:00 2001 From: injuly <50487716+srijan-paul@users.noreply.github.com> Date: Sat, 12 Mar 2022 20:35:40 +0530 Subject: [PATCH] fix: update parameter names in JSDocs. Co-authored-by: Milos Djermanovic Co-authored-by: Bryan Mishkin <698306+bmish@users.noreply.github.com> --- espree.js | 2 +- lib/espree.js | 2 +- lib/features.js | 6 +++--- lib/options.js | 16 ++++++++-------- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/espree.js b/espree.js index add3edb6..fa664b84 100644 --- a/espree.js +++ b/espree.js @@ -108,7 +108,7 @@ const parsers = { /** * Tokenizes the given code. * @param {string} code The code to tokenize. - * @param {ParserOptions} options Options defining how to tokenize. + * @param {ParserOptions} [options] Options defining how to tokenize. * @returns {EsprimaToken[]} An array of tokens. * @throws {SyntaxError} If the input code is invalid. * @private diff --git a/lib/espree.js b/lib/espree.js index defa37a3..fa99adf9 100644 --- a/lib/espree.js +++ b/lib/espree.js @@ -18,7 +18,7 @@ const ESPRIMA_FINISH_NODE = Symbol("espree's esprimaFinishNode"); * @property {number|undefined} start Start column of a comment. * @property {number|undefined} end End column of the comment. * @property {Range|undefined} range The [start, end] range of a comment. - * @property {acorn.Position} startLoc End location of the comment. + * @property {acorn.Position} startLoc Start location of the comment. * @property {acorn.Position} endLoc End location of the comment. */ diff --git a/lib/features.js b/lib/features.js index f22719c6..c95d4dc6 100644 --- a/lib/features.js +++ b/lib/features.js @@ -16,9 +16,9 @@ /** * @typedef {Object} EcmaFeatures - * @property {boolean} jsx - * @property {boolean} globalReturn - * @property {boolean} impliedStrict + * @property {boolean} [jsx] + * @property {boolean} [globalReturn] + * @property {boolean} [impliedStrict] */ /** diff --git a/lib/options.js b/lib/options.js index b592d561..111179d0 100644 --- a/lib/options.js +++ b/lib/options.js @@ -87,14 +87,14 @@ function normalizeSourceType(sourceType = "script") { /** * @typedef {Object} ParserOptions - * @property {boolean} range Whether to include the range information for each node. - * @property {boolean} loc Whether to include the location information for every node. - * @property {boolean} comments Whether to include an array of all comments - * @property {boolean} tokens Whether to include an array of all tokens - * @property {number|"latest"} ecmaVersion The ECMAScript version to use (between 3 and 13, or 2015 and 2022, or "latest"). - * @property {boolean} allowReserved Only allowed when `ecmaVersion` is set to 3. - * @property {"script"|"module"|"commonjs"} sourceType The kind of the source string being parsed. - * @property {EcmaFeatures} ecmaFeatures The additional features to enable. + * @property {boolean} [range] Whether to include the range information for each node. + * @property {boolean} [loc] Whether to include the location information for every node. + * @property {boolean} [comment] Whether to include an array of all comments + * @property {boolean} [tokens] Whether to include an array of all tokens + * @property {number|"latest"} [ecmaVersion] The ECMAScript version to use (between 3 and 13, or 2015 and 2022, or "latest"). + * @property {boolean} [allowReserved] Only allowed when `ecmaVersion` is set to 3. + * @property {"script"|"module"|"commonjs"} [sourceType] The kind of the source string being parsed. + * @property {EcmaFeatures} [ecmaFeatures] The additional features to enable. */ /**