Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: LintMessage.line and column are possibly undefined #15032

Merged
merged 1 commit into from Sep 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/developer-guide/nodejs-api.md
Expand Up @@ -376,9 +376,9 @@ The `LintMessage` value is the information of each linting error. The `messages`
`true` if this is a fatal error unrelated to a rule, like a parsing error.
* `message` (`string`)<br>
The error message.
* `line` (`number`)<br>
* `line` (`number | undefined`)<br>
The 1-based line number of the begin point of this message.
* `column` (`number`)<br>
* `column` (`number | undefined`)<br>
The 1-based column number of the begin point of this message.
* `endLine` (`number | undefined`)<br>
The 1-based line number of the end point of this message. This property is undefined if this message is not a range.
Expand Down
4 changes: 2 additions & 2 deletions lib/shared/types.js
Expand Up @@ -83,12 +83,12 @@ module.exports = {};

/**
* @typedef {Object} LintMessage
* @property {number} column The 1-based column number.
* @property {number|undefined} column The 1-based column number.
* @property {number} [endColumn] The 1-based column number of the end location.
* @property {number} [endLine] The 1-based line number of the end location.
* @property {boolean} fatal If `true` then this is a fatal error.
* @property {{range:[number,number], text:string}} [fix] Information for autofix.
* @property {number} line The 1-based line number.
* @property {number|undefined} line The 1-based line number.
* @property {string} message The error message.
* @property {string|null} ruleId The ID of the rule which makes this message.
* @property {0|1|2} severity The severity of this message.
Expand Down