This commit is contained in:
2026-03-15 12:22:42 +01:00
parent cd99275933
commit 311ba5e7f3
558 changed files with 55182 additions and 22981 deletions

View File

@@ -93,6 +93,19 @@ class WarningService {
"ESLintPoorConcurrencyWarning",
);
}
/**
* Emits a warning when eslint-env configuration comments are found.
* @param {string} filename The name of the file being linted.
* @param {number} line The line number of the comment.
* @returns {void}
*/
emitESLintEnvWarning(filename, line) {
this.emitWarning(
`/* eslint-env */ comments are no longer recognized when linting with flat config and will be reported as errors as of v10.0.0. Replace them with /* global */ comments or define globals in your config file. See https://eslint.org/docs/latest/use/configure/migration-guide#eslint-env-configuration-comments for details. Found in ${filename} at line ${line}.`,
"ESLintEnvWarning",
);
}
}
module.exports = { WarningService };