chore: Organise imports (#8527)

* chore(deps): Add pretter-plugin-organize-imports

* chore: Remove insignificant blank lines in import sections

  Since prettier-plugin-organize-imports sorts imports within
  sections separated by blank lines, but preserves the section
  divisions, remove any blank lines that are not dividing imports
  into meaningful sections.

  Do not remove blank lines separating side-effect-only imports
  from main imports.

* chore: Remove unneded eslint-disable directives

* chore: Organise imports
This commit is contained in:
Christopher Allen
2024-08-15 03:16:14 +01:00
committed by GitHub
parent ec8f9c8589
commit ce22f42868
274 changed files with 985 additions and 1048 deletions

View File

@@ -6,8 +6,8 @@
// Former goog.module ID: Blockly.IASTNodeLocationWithBlock
import type {IASTNodeLocation} from './i_ast_node_location.js';
import type {Block} from '../block.js';
import type {IASTNodeLocation} from './i_ast_node_location.js';
/**
* An AST node location that has an associated block.

View File

@@ -4,9 +4,10 @@
* SPDX-License-Identifier: Apache-2.0
*/
import type {Rect} from '../utils/rect.js';
// Former goog.module ID: Blockly.IBoundedElement
import type {Rect} from '../utils/rect.js';
/**
* A bounded element interface.
*/

View File

@@ -4,9 +4,9 @@
* SPDX-License-Identifier: Apache-2.0
*/
import type {Coordinate} from '../utils/coordinate.js';
// Former goog.module ID: Blockly.IBubble
import type {Coordinate} from '../utils/coordinate.js';
import type {IContextMenu} from './i_contextmenu.js';
import type {IDraggable} from './i_draggable.js';

View File

@@ -4,11 +4,11 @@
* SPDX-License-Identifier: Apache-2.0
*/
import {IconType} from '../icons/icon_types.js';
import {CommentState} from '../icons/comment_icon.js';
import {IIcon, isIcon} from './i_icon.js';
import {IconType} from '../icons/icon_types.js';
import {Size} from '../utils/size.js';
import {IHasBubble, hasBubble} from './i_has_bubble.js';
import {IIcon, isIcon} from './i_icon.js';
import {ISerializable, isSerializable} from './i_serializable.js';
export interface ICommentIcon extends IIcon, IHasBubble, ISerializable {

View File

@@ -4,9 +4,10 @@
* SPDX-License-Identifier: Apache-2.0
*/
// Former goog.module ID: Blockly.IConnectionChecker
import type {Connection} from '../connection.js';
import type {RenderedConnection} from '../rendered_connection.js';
// Former goog.module ID: Blockly.IConnectionChecker
/**
* Class for connection type checking logic.

View File

@@ -4,13 +4,11 @@
* SPDX-License-Identifier: Apache-2.0
*/
import {Rect} from '../utils/rect.js';
import {IDraggable} from './i_draggable.js';
// Former goog.module ID: Blockly.IDragTarget
import {Rect} from '../utils/rect.js';
import type {IComponent} from './i_component.js';
import {IDraggable} from './i_draggable.js';
/**
* Interface for a component with custom behaviour when a block or bubble is

View File

@@ -6,13 +6,13 @@
// Former goog.module ID: Blockly.IFlyout
import type {WorkspaceSvg} from '../workspace_svg.js';
import type {BlockSvg} from '../block_svg.js';
import type {Coordinate} from '../utils/coordinate.js';
import type {FlyoutDefinition} from '../utils/toolbox.js';
import type {Svg} from '../utils/svg.js';
import type {IRegistrable} from './i_registrable.js';
import {FlyoutItem} from '../flyout_base.js';
import type {Coordinate} from '../utils/coordinate.js';
import type {Svg} from '../utils/svg.js';
import type {FlyoutDefinition} from '../utils/toolbox.js';
import type {WorkspaceSvg} from '../workspace_svg.js';
import type {IRegistrable} from './i_registrable.js';
/**
* Interface for a flyout.

View File

@@ -4,9 +4,10 @@
* SPDX-License-Identifier: Apache-2.0
*/
import {KeyboardShortcut} from '../shortcut_registry.js';
// Former goog.module ID: Blockly.IKeyboardAccessible
import {KeyboardShortcut} from '../shortcut_registry.js';
/**
* An interface for an object that handles keyboard shortcuts.
*/

View File

@@ -4,15 +4,16 @@
* SPDX-License-Identifier: Apache-2.0
*/
// Former goog.module ID: Blockly.IMetricsManager
import type {
AbsoluteMetrics,
ContainerRegion,
ToolboxMetrics,
AbsoluteMetrics,
UiMetrics,
} from '../metrics_manager.js';
import type {Size} from '../utils/size.js';
import type {Metrics} from '../utils/metrics.js';
// Former goog.module ID: Blockly.IMetricsManager
import type {Size} from '../utils/size.js';
/**
* Interface for a metrics manager.

View File

@@ -4,10 +4,10 @@
* SPDX-License-Identifier: Apache-2.0
*/
import type {Rect} from '../utils/rect.js';
import type {UiMetrics} from '../metrics_manager.js';
// Former goog.module ID: Blockly.IPositionable
import type {UiMetrics} from '../metrics_manager.js';
import type {Rect} from '../utils/rect.js';
import type {IComponent} from './i_component.js';
/**

View File

@@ -4,9 +4,10 @@
* SPDX-License-Identifier: Apache-2.0
*/
// Former goog.module ID: Blockly.procedures.IProcedureBlock
import type {Block} from '../block.js';
import {IProcedureModel} from './i_procedure_model.js';
// Former goog.module ID: Blockly.procedures.IProcedureBlock
/** The interface for a block which models a procedure. */
export interface IProcedureBlock {

View File

@@ -4,9 +4,9 @@
* SPDX-License-Identifier: Apache-2.0
*/
import type {FlyoutItemInfoArray} from '../utils/toolbox';
// Former goog.module ID: Blockly.ISelectableToolboxItem
import type {FlyoutItemInfoArray} from '../utils/toolbox';
import type {IToolboxItem} from './i_toolbox_item.js';
/**

View File

@@ -22,8 +22,6 @@ export interface ISerializer {
*/
priority: number;
/* eslint-disable no-unused-vars, valid-jsdoc */
/**
* Saves the state of the plugin or system.
*
@@ -52,4 +50,3 @@ export interface ISerializer {
*/
clear(workspace: Workspace): void;
}
/* eslint-enable no-unused-vars */

View File

@@ -6,11 +6,11 @@
// Former goog.module ID: Blockly.IToolbox
import type {ToolboxInfo} from '../utils/toolbox.js';
import type {WorkspaceSvg} from '../workspace_svg.js';
import type {IFlyout} from './i_flyout.js';
import type {IRegistrable} from './i_registrable.js';
import type {IToolboxItem} from './i_toolbox_item.js';
import type {ToolboxInfo} from '../utils/toolbox.js';
import type {IFlyout} from './i_flyout.js';
import type {WorkspaceSvg} from '../workspace_svg.js';
/**
* Interface for a toolbox.