mirror of
https://github.com/google/blockly.git
synced 2026-01-06 16:40:07 +01:00
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:
@@ -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]) + "'";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user