diff --git a/lib/cli-engine/cli-engine.js b/lib/cli-engine/cli-engine.js index 5f327fca1340..be98762118cf 100644 --- a/lib/cli-engine/cli-engine.js +++ b/lib/cli-engine/cli-engine.js @@ -308,6 +308,7 @@ function createIgnoreResult(filePath, baseDir) { filePath: path.resolve(filePath), messages: [ { + ruleId: null, fatal: false, severity: 1, message, diff --git a/lib/eslint/eslint-helpers.js b/lib/eslint/eslint-helpers.js index e9faa5ee7e07..8caa54851936 100644 --- a/lib/eslint/eslint-helpers.js +++ b/lib/eslint/eslint-helpers.js @@ -607,6 +607,7 @@ function createIgnoreResult(filePath, baseDir) { filePath: path.resolve(filePath), messages: [ { + ruleId: null, fatal: false, severity: 1, message, diff --git a/lib/shared/types.js b/lib/shared/types.js index 233e1d428c7a..b78b0ffad375 100644 --- a/lib/shared/types.js +++ b/lib/shared/types.js @@ -101,7 +101,7 @@ module.exports = {}; * @property {number} line The 1-based line number. * @property {string} message The error message. * @property {string} [messageId] The ID of the message in the rule's meta. - * @property {(string|null)} [nodeType] Type of node + * @property {(string|null)} nodeType Type of node * @property {string|null} ruleId The ID of the rule which makes this message. * @property {0|1|2} severity The severity of this message. * @property {Array<{desc?: string, messageId?: string, fix: {range: [number, number], text: string}}>} [suggestions] Information for suggestions. @@ -117,7 +117,7 @@ module.exports = {}; * @property {number|undefined} line The 1-based line number. * @property {string} message The error message. * @property {string} [messageId] The ID of the message in the rule's meta. - * @property {(string|null)} [nodeType] Type of node + * @property {(string|null)} nodeType Type of node * @property {string|null} ruleId The ID of the rule which makes this message. * @property {0|1|2} severity The severity of this message. * @property {Array<{kind: string, justification: string}>} suppressions The suppression info. diff --git a/tests/lib/eslint/flat-eslint.js b/tests/lib/eslint/flat-eslint.js index 5279a22ab2d3..9c8eeedb5877 100644 --- a/tests/lib/eslint/flat-eslint.js +++ b/tests/lib/eslint/flat-eslint.js @@ -5012,6 +5012,7 @@ describe("FlatESLint", () => { fixableWarningCount: 0, messages: [ { + ruleId: null, fatal: false, message: "File ignored by default. Use \"--ignore-pattern '!node_modules/*'\" to override.", severity: 1,