mirror of
https://github.com/google/blockly.git
synced 2026-01-07 00:50:27 +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:
@@ -30,7 +30,6 @@ export interface ISerializer {
|
||||
* state to record.
|
||||
*/
|
||||
save(workspace: Workspace): object | null;
|
||||
/* eslint-enable valid-jsdoc */
|
||||
|
||||
/**
|
||||
* Loads the state of the plugin or system.
|
||||
|
||||
@@ -31,16 +31,12 @@ export class ConstantProvider extends BaseConstantProvider {
|
||||
|
||||
override getCSS_(selector: string) {
|
||||
return super.getCSS_(selector).concat([
|
||||
/* eslint-disable indent */
|
||||
/* clang-format off */
|
||||
// Insertion marker.
|
||||
`${selector} .blocklyInsertionMarker>.blocklyPathLight,`,
|
||||
`${selector} .blocklyInsertionMarker>.blocklyPathDark {`,
|
||||
`fill-opacity: ${this.INSERTION_MARKER_OPACITY};`,
|
||||
`stroke: none;`,
|
||||
'}',
|
||||
/* clang-format on */
|
||||
/* eslint-enable indent */
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -786,7 +786,6 @@ export class ConstantProvider extends BaseConstantProvider {
|
||||
|
||||
override getCSS_(selector: string) {
|
||||
return [
|
||||
/* eslint-disable indent */
|
||||
// Text.
|
||||
`${selector} .blocklyText,`,
|
||||
`${selector} .blocklyFlyoutLabelText {`,
|
||||
@@ -871,4 +870,3 @@ export class ConstantProvider extends BaseConstantProvider {
|
||||
];
|
||||
}
|
||||
}
|
||||
/* eslint-enable indent */
|
||||
|
||||
@@ -32,9 +32,6 @@ import {
|
||||
import * as priorities from './priorities.js';
|
||||
import * as serializationRegistry from './registry.js';
|
||||
|
||||
// TODO(#5160): Remove this once lint is fixed.
|
||||
/* eslint-disable no-use-before-define */
|
||||
|
||||
/**
|
||||
* Represents the state of a connection.
|
||||
*/
|
||||
@@ -795,7 +792,6 @@ const saveBlock = save;
|
||||
export class BlockSerializer implements ISerializer {
|
||||
priority: number;
|
||||
|
||||
/* eslint-disable-next-line require-jsdoc */
|
||||
constructor() {
|
||||
/** The priority for deserializing blocks. */
|
||||
this.priority = priorities.BLOCKS;
|
||||
|
||||
@@ -26,7 +26,6 @@ export interface State {
|
||||
export class VariableSerializer implements ISerializer {
|
||||
priority: number;
|
||||
|
||||
/* eslint-disable-next-line require-jsdoc */
|
||||
constructor() {
|
||||
/** The priority for deserializing variables. */
|
||||
this.priority = priorities.VARIABLES;
|
||||
|
||||
@@ -202,7 +202,6 @@ export function generateUniqueNameFromOptions(
|
||||
let letterIndex = letters.indexOf(startChar);
|
||||
let potName = startChar;
|
||||
|
||||
// eslint-disable-next-line no-constant-condition
|
||||
while (true) {
|
||||
let inUse = false;
|
||||
for (let i = 0; i < usedNames.length; i++) {
|
||||
|
||||
@@ -1077,14 +1077,12 @@ export class WorkspaceSvg extends Workspace implements IASTNodeLocationSvg {
|
||||
* @internal
|
||||
*/
|
||||
updateScreenCalculationsIfScrolled() {
|
||||
/* eslint-disable indent */
|
||||
const currScroll = svgMath.getDocumentScroll();
|
||||
if (!Coordinate.equals(this.lastRecordedPageScroll, currScroll)) {
|
||||
this.lastRecordedPageScroll = currScroll;
|
||||
this.updateScreenCalculations();
|
||||
}
|
||||
}
|
||||
/* eslint-enable indent */
|
||||
|
||||
/**
|
||||
* @returns The layer manager for this workspace.
|
||||
|
||||
Reference in New Issue
Block a user