chore: Migrate ESLint configuration file to new flat format. (#8675)

* chore: rename .eslintrc.js to eslint.config.js

* chore: Rename eslint.config.js to eslint.config.mjs.

* refactor: Migrate ESLint config to new flat format.

* chore: Remove old per-directory and global ignore ESLint config files.

* fix: Allowlist JSDoc tag aliases.

* fix: Don't require @license in tests/*.

* fix: Add NodeJS globals to several files that run under Node.

* chore: Remove now-unneeded ESLint directives in core.

* chore: Remove invalid/unneeded ESLint directives.

* fix: Fix invalid use of `await` outside of an `async` function.

* fix: Improve screenshot error message.

* fix: Update ESLint config file to not warn on existing violations.

* chore: Remove suppressions of rules that weren't triggering.

* chore: Fix package-lock.json.
This commit is contained in:
Aaron Dodson
2024-12-03 12:40:48 -08:00
committed by GitHub
parent 61bbd7dbf6
commit 5870c66cf0
22 changed files with 716 additions and 719 deletions

View File

@@ -35,7 +35,7 @@ function posixPath(target) {
* @return {string} The value s as a eval-able string literal.
*/
function quote(str) {
/* eslint-disable no-control-regex, no-multi-spaces */
/* eslint-disable no-control-regex */
/** Regexp for characters to be escaped in a single-quoted string. */
const singleRE = /[\x00-\x1f\\\u2028\u2029']/g;
@@ -63,7 +63,7 @@ function quote(str) {
'\u2028': '\\u2028',
'\u2029': '\\u2029',
};
/* eslint-enable no-control-regex, no-multi-spaces */
/* eslint-enable no-control-regex */
return "'" + str.replace(singleRE, (c) => replacements[c]) + "'";
}