From 8fc1acd872d435ee9aa4f493252cd98df5918214 Mon Sep 17 00:00:00 2001 From: Beka Westberg Date: Wed, 20 Jul 2022 15:11:17 +0000 Subject: [PATCH] chore: use `import type` where possible (#6279) * chore: automatically change imports to import types * chore: revert changes that actually need to be imports * chore: format * chore: add more import type statements based on importsNotUsedAsValues * chore: fix tsconfig * chore: add link to compiler issue --- core/block.ts | 27 +++------ core/block_animations.ts | 3 +- core/block_dragger.ts | 18 ++---- core/block_svg.ts | 44 +++++--------- core/bubble.ts | 14 ++--- core/bubble_dragger.ts | 18 ++---- core/bump_objects.ts | 28 ++++----- core/clipboard.ts | 2 +- core/comment.ts | 11 ++-- core/common.ts | 15 ++--- core/component_manager.ts | 15 ++--- core/connection.ts | 15 ++--- core/connection_checker.ts | 6 +- core/connection_db.ts | 9 +-- core/contextmenu.ts | 11 ++-- core/contextmenu_items.ts | 6 +- core/contextmenu_registry.ts | 6 +- core/delete_area.ts | 6 +- core/drag_target.ts | 9 +-- core/dropdowndiv.ts | 12 ++-- core/events/events_abstract.ts | 1 - core/events/events_block_base.ts | 3 +- core/events/events_block_change.ts | 6 +- core/events/events_block_create.ts | 3 +- core/events/events_block_delete.ts | 3 +- core/events/events_block_drag.ts | 3 +- core/events/events_block_move.ts | 3 +- core/events/events_bubble_open.ts | 3 +- core/events/events_click.ts | 3 +- core/events/events_comment_base.ts | 9 +-- core/events/events_comment_change.ts | 3 +- core/events/events_comment_create.ts | 3 +- core/events/events_comment_delete.ts | 3 +- core/events/events_comment_move.ts | 3 +- core/events/events_marker_move.ts | 6 +- core/events/events_ui.ts | 3 +- core/events/events_var_base.ts | 3 +- core/events/events_var_create.ts | 3 +- core/events/events_var_delete.ts | 3 +- core/events/events_var_rename.ts | 3 +- core/events/utils.ts | 30 ++++------ core/events/workspace_events.ts | 3 +- core/extensions.ts | 5 +- core/field.ts | 32 ++++------ core/field_angle.ts | 3 +- core/field_checkbox.ts | 3 +- core/field_colour.ts | 3 +- core/field_dropdown.ts | 6 +- core/field_image.ts | 3 +- core/field_label.ts | 3 +- core/field_multilineinput.ts | 3 +- core/field_number.ts | 3 +- core/field_registry.ts | 6 +- core/field_textinput.ts | 9 +-- core/field_variable.ts | 12 ++-- core/flyout_base.ts | 16 ++--- core/flyout_button.ts | 6 +- core/flyout_horizontal.ts | 9 +-- core/flyout_metrics_manager.ts | 6 +- core/flyout_vertical.ts | 9 +-- core/generator.ts | 10 ++-- core/gesture.ts | 19 ++---- core/icon.ts | 6 +- core/inject.ts | 3 +- core/input.ts | 15 ++--- core/insertion_marker_manager.ts | 18 ++---- core/interfaces/i_ast_node_location_svg.ts | 3 +- .../i_ast_node_location_with_block.ts | 3 +- core/interfaces/i_autohideable.ts | 3 +- core/interfaces/i_bubble.ts | 6 +- core/interfaces/i_collapsible_toolbox_item.ts | 2 +- core/interfaces/i_copyable.ts | 7 +-- core/interfaces/i_delete_area.ts | 2 +- core/interfaces/i_drag_target.ts | 2 +- core/interfaces/i_draggable.ts | 3 +- core/interfaces/i_flyout.ts | 6 +- core/interfaces/i_positionable.ts | 2 +- core/interfaces/i_registrable_field.ts | 3 +- core/interfaces/i_selectable.ts | 6 +- core/interfaces/i_selectable_toolbox_item.ts | 3 +- core/interfaces/i_serializer.ts | 3 +- core/interfaces/i_toolbox.ts | 3 +- core/keyboard_nav/ast_node.ts | 21 +++---- core/keyboard_nav/marker.ts | 5 +- core/keyboard_nav/tab_navigate_cursor.ts | 3 +- core/marker_manager.ts | 9 +-- core/menu.ts | 6 +- core/metrics_manager.ts | 15 ++--- core/mutator.ts | 18 ++---- core/names.ts | 6 +- core/options.ts | 9 +-- core/positionable_helpers.ts | 8 +-- core/procedures.ts | 18 ++---- core/registry.ts | 39 ++++-------- core/rendered_connection.ts | 9 +-- core/renderers/common/block_rendering.ts | 5 +- core/renderers/common/constants.ts | 5 +- core/renderers/common/debugger.ts | 24 +++----- core/renderers/common/drawer.ts | 27 +++------ core/renderers/common/i_path_object.ts | 5 +- core/renderers/common/info.ts | 18 ++---- core/renderers/common/marker_svg.ts | 24 +++----- core/renderers/common/path_object.ts | 14 ++--- core/renderers/common/renderer.ts | 24 +++----- core/renderers/geras/drawer.ts | 17 ++---- core/renderers/geras/highlight_constants.ts | 3 +- core/renderers/geras/highlighter.ts | 20 +++---- core/renderers/geras/info.ts | 27 ++++----- .../geras/measurables/inline_input.ts | 8 +-- .../geras/measurables/statement_input.ts | 8 +-- core/renderers/geras/path_object.ts | 7 +-- core/renderers/geras/renderer.ts | 8 +-- core/renderers/measurables/base.ts | 3 +- core/renderers/measurables/bottom_row.ts | 9 +-- core/renderers/measurables/connection.ts | 5 +- .../measurables/external_value_input.ts | 5 +- core/renderers/measurables/field.ts | 8 +-- core/renderers/measurables/hat.ts | 3 +- core/renderers/measurables/icon.ts | 5 +- core/renderers/measurables/in_row_spacer.ts | 3 +- core/renderers/measurables/inline_input.ts | 5 +- .../renderers/measurables/input_connection.ts | 12 ++-- core/renderers/measurables/input_row.ts | 3 +- core/renderers/measurables/jagged_edge.ts | 3 +- core/renderers/measurables/next_connection.ts | 6 +- .../measurables/output_connection.ts | 6 +- .../measurables/previous_connection.ts | 6 +- core/renderers/measurables/round_corner.ts | 3 +- core/renderers/measurables/row.ts | 14 ++--- core/renderers/measurables/spacer_row.ts | 3 +- core/renderers/measurables/square_corner.ts | 3 +- core/renderers/measurables/statement_input.ts | 5 +- core/renderers/measurables/top_row.ts | 9 +-- core/renderers/measurables/types.ts | 6 +- core/renderers/minimalist/drawer.ts | 6 +- core/renderers/minimalist/info.ts | 6 +- core/renderers/minimalist/renderer.ts | 6 +- core/renderers/thrasos/info.ts | 19 +++--- core/renderers/thrasos/renderer.ts | 3 +- core/renderers/zelos/constants.ts | 8 +-- core/renderers/zelos/drawer.ts | 26 +++----- core/renderers/zelos/info.ts | 22 +++---- core/renderers/zelos/marker_svg.ts | 21 +++---- .../renderers/zelos/measurables/bottom_row.ts | 5 +- core/renderers/zelos/measurables/inputs.ts | 5 +- .../zelos/measurables/row_elements.ts | 3 +- core/renderers/zelos/measurables/top_row.ts | 5 +- core/renderers/zelos/path_object.ts | 9 ++- core/renderers/zelos/renderer.ts | 18 +++--- core/scrollbar.ts | 6 +- core/scrollbar_pair.ts | 6 +- core/serialization/blocks.ts | 15 ++--- core/serialization/exceptions.ts | 7 +-- core/serialization/registry.ts | 2 +- core/serialization/variables.ts | 6 +- core/serialization/workspaces.ts | 4 +- core/shortcut_items.ts | 5 +- core/shortcut_registry.ts | 3 +- core/theme_manager.ts | 9 +-- core/toolbox/category.ts | 11 ++-- core/toolbox/collapsible_category.ts | 9 +-- core/toolbox/separator.ts | 6 +- core/toolbox/toolbox.ts | 38 ++++-------- core/toolbox/toolbox_item.ts | 15 ++--- core/touch.ts | 3 +- core/touch_gesture.ts | 3 +- core/trashcan.ts | 29 ++++----- core/utils.ts | 8 +-- core/utils/dom.ts | 3 +- core/utils/svg_math.ts | 3 +- core/utils/toolbox.ts | 7 +-- core/variable_map.ts | 6 +- core/variable_model.ts | 3 +- core/variables.ts | 6 +- core/variables_dynamic.ts | 6 +- core/warning.ts | 6 +- core/widgetdiv.ts | 9 +-- core/workspace.ts | 25 +++----- core/workspace_audio.ts | 3 +- core/workspace_comment.ts | 6 +- core/workspace_comment_svg.ts | 17 ++---- core/workspace_drag_surface_svg.ts | 3 +- core/workspace_dragger.ts | 3 +- core/workspace_svg.ts | 60 ++++++------------- core/xml.ts | 21 +++---- core/zoom_controls.ts | 8 +-- tsconfig.json | 5 ++ 187 files changed, 598 insertions(+), 1127 deletions(-) diff --git a/core/block.ts b/core/block.ts index 499cdaef0e2..2931dd6ac40 100644 --- a/core/block.ts +++ b/core/block.ts @@ -23,40 +23,31 @@ import './events/events_block_create.js'; import './events/events_block_delete.js'; import {Blocks} from './blocks.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Comment} from './comment.js'; +import type {Comment} from './comment.js'; import * as common from './common.js'; import {Connection} from './connection.js'; import {ConnectionType} from './connection_type.js'; import * as constants from './constants.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Abstract} from './events/events_abstract.js'; -/* eslint-disable-next-line no-unused-vars */ -import {BlockMove} from './events/events_block_move.js'; +import type {Abstract} from './events/events_abstract.js'; +import type {BlockMove} from './events/events_block_move.js'; import * as eventUtils from './events/utils.js'; import * as Extensions from './extensions.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Field} from './field.js'; +import type {Field} from './field.js'; import * as fieldRegistry from './field_registry.js'; import {Align, Input} from './input.js'; import {inputTypes} from './input_types.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IASTNodeLocation} from './interfaces/i_ast_node_location.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IDeletable} from './interfaces/i_deletable.js'; +import type {IASTNodeLocation} from './interfaces/i_ast_node_location.js'; +import type {IDeletable} from './interfaces/i_deletable.js'; import {ASTNode} from './keyboard_nav/ast_node.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Mutator} from './mutator.js'; +import type {Mutator} from './mutator.js'; import * as Tooltip from './tooltip.js'; import * as arrayUtils from './utils/array.js'; import {Coordinate} from './utils/coordinate.js'; import * as idGenerator from './utils/idgenerator.js'; import * as parsing from './utils/parsing.js'; import {Size} from './utils/size.js'; -/* eslint-disable-next-line no-unused-vars */ -import {VariableModel} from './variable_model.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Workspace} from './workspace.js'; +import type {VariableModel} from './variable_model.js'; +import type {Workspace} from './workspace.js'; /** diff --git a/core/block_animations.ts b/core/block_animations.ts index 105f771e8cc..104ef0b38ee 100644 --- a/core/block_animations.ts +++ b/core/block_animations.ts @@ -15,8 +15,7 @@ import * as goog from '../closure/goog/goog.js'; goog.declareModuleId('Blockly.blockAnimations'); -/* eslint-disable-next-line no-unused-vars */ -import {BlockSvg} from './block_svg.js'; +import type {BlockSvg} from './block_svg.js'; import * as dom from './utils/dom.js'; import {Svg} from './utils/svg.js'; diff --git a/core/block_dragger.ts b/core/block_dragger.ts index 7f6537ea060..c540fd2a8a3 100644 --- a/core/block_dragger.ts +++ b/core/block_dragger.ts @@ -19,25 +19,19 @@ goog.declareModuleId('Blockly.BlockDragger'); import './events/events_block_drag.js'; import * as blockAnimation from './block_animations.js'; -/* eslint-disable-next-line no-unused-vars */ -import {BlockSvg} from './block_svg.js'; +import type {BlockSvg} from './block_svg.js'; import * as bumpObjects from './bump_objects.js'; import * as common from './common.js'; -/* eslint-disable-next-line no-unused-vars */ -import {BlockMove} from './events/events_block_move.js'; +import type {BlockMove} from './events/events_block_move.js'; import * as eventUtils from './events/utils.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Icon} from './icon.js'; +import type {Icon} from './icon.js'; import {InsertionMarkerManager} from './insertion_marker_manager.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IBlockDragger} from './interfaces/i_block_dragger.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IDragTarget} from './interfaces/i_drag_target.js'; +import type {IBlockDragger} from './interfaces/i_block_dragger.js'; +import type {IDragTarget} from './interfaces/i_drag_target.js'; import * as registry from './registry.js'; import {Coordinate} from './utils/coordinate.js'; import * as dom from './utils/dom.js'; -/* eslint-disable-next-line no-unused-vars */ -import {WorkspaceSvg} from './workspace_svg.js'; +import type {WorkspaceSvg} from './workspace_svg.js'; /** diff --git a/core/block_svg.ts b/core/block_svg.ts index da46dc61d87..f4aff257df5 100644 --- a/core/block_svg.ts +++ b/core/block_svg.ts @@ -26,58 +26,44 @@ import './touch.js'; import {Block} from './block.js'; import * as blockAnimations from './block_animations.js'; import * as browserEvents from './browser_events.js'; -/* eslint-disable-next-line no-unused-vars */ import {Comment} from './comment.js'; import * as common from './common.js'; import {config} from './config.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Connection} from './connection.js'; +import type {Connection} from './connection.js'; import {ConnectionType} from './connection_type.js'; import * as constants from './constants.js'; import * as ContextMenu from './contextmenu.js'; import {ContextMenuOption, ContextMenuRegistry, LegacyContextMenuOption} from './contextmenu_registry.js'; -/* eslint-disable-next-line no-unused-vars */ -import {BlockMove} from './events/events_block_move.js'; +import type {BlockMove} from './events/events_block_move.js'; import * as eventUtils from './events/utils.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Field} from './field.js'; +import type {Field} from './field.js'; import {FieldLabel} from './field_label.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Icon} from './icon.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Input} from './input.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IASTNodeLocationSvg} from './interfaces/i_ast_node_location_svg.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IBoundedElement} from './interfaces/i_bounded_element.js'; -import {CopyData, ICopyable} from './interfaces/i_copyable.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IDraggable} from './interfaces/i_draggable.js'; +import type {Icon} from './icon.js'; +import type {Input} from './input.js'; +import type {IASTNodeLocationSvg} from './interfaces/i_ast_node_location_svg.js'; +import type {IBoundedElement} from './interfaces/i_bounded_element.js'; +import type {CopyData, ICopyable} from './interfaces/i_copyable.js'; +import type {IDraggable} from './interfaces/i_draggable.js'; import * as internalConstants from './internal_constants.js'; import {ASTNode} from './keyboard_nav/ast_node.js'; import {TabNavigateCursor} from './keyboard_nav/tab_navigate_cursor.js'; import {MarkerManager} from './marker_manager.js'; import {Msg} from './msg.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Mutator} from './mutator.js'; +import type {Mutator} from './mutator.js'; import {RenderedConnection} from './rendered_connection.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Debug as BlockRenderingDebug} from './renderers/common/debugger.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IPathObject} from './renderers/common/i_path_object.js'; +import type {Debug as BlockRenderingDebug} from './renderers/common/debugger.js'; +import type {IPathObject} from './renderers/common/i_path_object.js'; import * as blocks from './serialization/blocks.js'; -import {BlockStyle} from './theme.js'; +import type {BlockStyle} from './theme.js'; import * as Tooltip from './tooltip.js'; import {Coordinate} from './utils/coordinate.js'; import * as dom from './utils/dom.js'; import {Rect} from './utils/rect.js'; import {Svg} from './utils/svg.js'; import * as svgMath from './utils/svg_math.js'; -/* eslint-disable-next-line no-unused-vars */ import {Warning} from './warning.js'; -import {Workspace} from './workspace.js'; -/* eslint-disable-next-line no-unused-vars */ -import {WorkspaceSvg} from './workspace_svg.js'; +import type {Workspace} from './workspace.js'; +import type {WorkspaceSvg} from './workspace_svg.js'; /** diff --git a/core/bubble.ts b/core/bubble.ts index 29dcb798e56..1cdf60a2840 100644 --- a/core/bubble.ts +++ b/core/bubble.ts @@ -21,14 +21,11 @@ import './metrics_manager.js'; // Unused import preserved for side-effects. Remove if unneeded. import './workspace.js'; -/* eslint-disable-next-line no-unused-vars */ -import {BlockDragSurfaceSvg} from './block_drag_surface.js'; -/* eslint-disable-next-line no-unused-vars */ -import {BlockSvg} from './block_svg.js'; +import type {BlockDragSurfaceSvg} from './block_drag_surface.js'; +import type {BlockSvg} from './block_svg.js'; import * as browserEvents from './browser_events.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IBubble} from './interfaces/i_bubble.js'; -import {ContainerRegion} from './metrics_manager.js'; +import type {IBubble} from './interfaces/i_bubble.js'; +import type {ContainerRegion} from './metrics_manager.js'; import {Scrollbar} from './scrollbar.js'; import * as Touch from './touch.js'; import {Coordinate} from './utils/coordinate.js'; @@ -37,8 +34,7 @@ import * as math from './utils/math.js'; import {Size} from './utils/size.js'; import {Svg} from './utils/svg.js'; import * as userAgent from './utils/useragent.js'; -/* eslint-disable-next-line no-unused-vars */ -import {WorkspaceSvg} from './workspace_svg.js'; +import type {WorkspaceSvg} from './workspace_svg.js'; /** diff --git a/core/bubble_dragger.ts b/core/bubble_dragger.ts index 297bc4fa400..719c80dee5f 100644 --- a/core/bubble_dragger.ts +++ b/core/bubble_dragger.ts @@ -20,23 +20,17 @@ import './bubble.js'; // Unused import preserved for side-effects. Remove if unneeded. import './constants.js'; -/* eslint-disable-next-line no-unused-vars */ -import {BlockDragSurfaceSvg} from './block_drag_surface.js'; +import type {BlockDragSurfaceSvg} from './block_drag_surface.js'; import {ComponentManager} from './component_manager.js'; -/* eslint-disable-next-line no-unused-vars */ -import {CommentMove} from './events/events_comment_move.js'; +import type {CommentMove} from './events/events_comment_move.js'; import * as eventUtils from './events/utils.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IBubble} from './interfaces/i_bubble.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IDeleteArea} from './interfaces/i_delete_area.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IDragTarget} from './interfaces/i_drag_target.js'; +import type {IBubble} from './interfaces/i_bubble.js'; +import type {IDeleteArea} from './interfaces/i_delete_area.js'; +import type {IDragTarget} from './interfaces/i_drag_target.js'; import {Coordinate} from './utils/coordinate.js'; import * as svgMath from './utils/svg_math.js'; import {WorkspaceCommentSvg} from './workspace_comment_svg.js'; -/* eslint-disable-next-line no-unused-vars */ -import {WorkspaceSvg} from './workspace_svg.js'; +import type {WorkspaceSvg} from './workspace_svg.js'; /** diff --git a/core/bump_objects.ts b/core/bump_objects.ts index 29a08b4ccb6..55c55dc0da1 100644 --- a/core/bump_objects.ts +++ b/core/bump_objects.ts @@ -15,25 +15,19 @@ import * as goog from '../closure/goog/goog.js'; goog.declareModuleId('Blockly.bumpObjects'); -/* eslint-disable-next-line no-unused-vars */ -import {BlockSvg} from './block_svg.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Abstract} from './events/events_abstract.js'; -import {BlockCreate} from './events/events_block_create.js'; -import {BlockMove} from './events/events_block_move.js'; -import {CommentCreate} from './events/events_comment_create.js'; -import {CommentMove} from './events/events_comment_move.js'; -/* eslint-disable-next-line no-unused-vars */ -import {ViewportChange} from './events/events_viewport.js'; +import type {BlockSvg} from './block_svg.js'; +import type {Abstract} from './events/events_abstract.js'; +import type {BlockCreate} from './events/events_block_create.js'; +import type {BlockMove} from './events/events_block_move.js'; +import type {CommentCreate} from './events/events_comment_create.js'; +import type {CommentMove} from './events/events_comment_move.js'; +import type {ViewportChange} from './events/events_viewport.js'; import * as eventUtils from './events/utils.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IBoundedElement} from './interfaces/i_bounded_element.js'; -import {ContainerRegion, MetricsManager} from './metrics_manager.js'; +import type {IBoundedElement} from './interfaces/i_bounded_element.js'; +import type {ContainerRegion, MetricsManager} from './metrics_manager.js'; import * as mathUtils from './utils/math.js'; -/* eslint-disable-next-line no-unused-vars */ -import {WorkspaceCommentSvg} from './workspace_comment_svg.js'; -/* eslint-disable-next-line no-unused-vars */ -import {WorkspaceSvg} from './workspace_svg.js'; +import type {WorkspaceCommentSvg} from './workspace_comment_svg.js'; +import type {WorkspaceSvg} from './workspace_svg.js'; /** diff --git a/core/clipboard.ts b/core/clipboard.ts index 2788f90ed0e..2a41053cc30 100644 --- a/core/clipboard.ts +++ b/core/clipboard.ts @@ -15,7 +15,7 @@ import * as goog from '../closure/goog/goog.js'; goog.declareModuleId('Blockly.clipboard'); -import {CopyData, ICopyable} from './interfaces/i_copyable.js'; +import type {CopyData, ICopyable} from './interfaces/i_copyable.js'; /** Metadata about the object that is currently on the clipboard. */ diff --git a/core/comment.ts b/core/comment.ts index 3941f75310c..01e47513432 100644 --- a/core/comment.ts +++ b/core/comment.ts @@ -28,19 +28,16 @@ import './events/events_bubble_open.js'; // Unused import preserved for side-effects. Remove if unneeded. import './warning.js'; -import {CommentModel} from './block.js'; -/* eslint-disable-next-line no-unused-vars */ -import {BlockSvg} from './block_svg.js'; +import type {CommentModel} from './block.js'; +import type {BlockSvg} from './block_svg.js'; import * as browserEvents from './browser_events.js'; import {Bubble} from './bubble.js'; import * as Css from './css.js'; import * as eventUtils from './events/utils.js'; import {Icon} from './icon.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Coordinate} from './utils/coordinate.js'; +import type {Coordinate} from './utils/coordinate.js'; import * as dom from './utils/dom.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Size} from './utils/size.js'; +import type {Size} from './utils/size.js'; import {Svg} from './utils/svg.js'; import * as userAgent from './utils/useragent.js'; diff --git a/core/common.ts b/core/common.ts index edbf2a6fbe7..051c9e83c59 100644 --- a/core/common.ts +++ b/core/common.ts @@ -18,17 +18,12 @@ import * as goog from '../closure/goog/goog.js'; goog.declareModuleId('Blockly.common'); /* eslint-disable-next-line no-unused-vars */ -/* eslint-disable-next-line no-unused-vars */ -import {Block} from './block.js'; +import type {Block} from './block.js'; import {BlockDefinition, Blocks} from './blocks.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Connection} from './connection.js'; -/* eslint-disable-next-line no-unused-vars */ -import {ICopyable} from './interfaces/i_copyable.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Workspace} from './workspace.js'; -/* eslint-disable-next-line no-unused-vars */ -import {WorkspaceSvg} from './workspace_svg.js'; +import type {Connection} from './connection.js'; +import type {ICopyable} from './interfaces/i_copyable.js'; +import type {Workspace} from './workspace.js'; +import type {WorkspaceSvg} from './workspace_svg.js'; /** diff --git a/core/component_manager.ts b/core/component_manager.ts index a39130a4790..a7648ba7fc7 100644 --- a/core/component_manager.ts +++ b/core/component_manager.ts @@ -15,16 +15,11 @@ import * as goog from '../closure/goog/goog.js'; goog.declareModuleId('Blockly.ComponentManager'); -/* eslint-disable-next-line no-unused-vars */ -import {IAutoHideable} from './interfaces/i_autohideable.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IComponent} from './interfaces/i_component.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IDeleteArea} from './interfaces/i_delete_area.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IDragTarget} from './interfaces/i_drag_target.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IPositionable} from './interfaces/i_positionable.js'; +import type {IAutoHideable} from './interfaces/i_autohideable.js'; +import type {IComponent} from './interfaces/i_component.js'; +import type {IDeleteArea} from './interfaces/i_delete_area.js'; +import type {IDragTarget} from './interfaces/i_drag_target.js'; +import type {IPositionable} from './interfaces/i_positionable.js'; import * as arrayUtils from './utils/array.js'; diff --git a/core/connection.ts b/core/connection.ts index 3899f441f56..5196ed29b07 100644 --- a/core/connection.ts +++ b/core/connection.ts @@ -18,18 +18,13 @@ goog.declareModuleId('Blockly.Connection'); // Unused import preserved for side-effects. Remove if unneeded. import './constants.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Block} from './block.js'; +import type {Block} from './block.js'; import {ConnectionType} from './connection_type.js'; -/* eslint-disable-next-line no-unused-vars */ -import {BlockMove} from './events/events_block_move.js'; +import type {BlockMove} from './events/events_block_move.js'; import * as eventUtils from './events/utils.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Input} from './input.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IASTNodeLocationWithBlock} from './interfaces/i_ast_node_location_with_block.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IConnectionChecker} from './interfaces/i_connection_checker.js'; +import type {Input} from './input.js'; +import type {IASTNodeLocationWithBlock} from './interfaces/i_ast_node_location_with_block.js'; +import type {IConnectionChecker} from './interfaces/i_connection_checker.js'; import * as blocks from './serialization/blocks.js'; import * as Xml from './xml.js'; diff --git a/core/connection_checker.ts b/core/connection_checker.ts index 9b07b30d5cc..c03ec5a946e 100644 --- a/core/connection_checker.ts +++ b/core/connection_checker.ts @@ -20,12 +20,10 @@ goog.declareModuleId('Blockly.ConnectionChecker'); import * as common from './common.js'; import {Connection} from './connection.js'; import {ConnectionType} from './connection_type.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IConnectionChecker} from './interfaces/i_connection_checker.js'; +import type {IConnectionChecker} from './interfaces/i_connection_checker.js'; import * as internalConstants from './internal_constants.js'; import * as registry from './registry.js'; -/* eslint-disable-next-line no-unused-vars */ -import {RenderedConnection} from './rendered_connection.js'; +import type {RenderedConnection} from './rendered_connection.js'; /** diff --git a/core/connection_db.ts b/core/connection_db.ts index eb8c489e811..fd9cfc6f6a4 100644 --- a/core/connection_db.ts +++ b/core/connection_db.ts @@ -23,12 +23,9 @@ goog.declareModuleId('Blockly.ConnectionDB'); import './constants.js'; import {ConnectionType} from './connection_type.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IConnectionChecker} from './interfaces/i_connection_checker.js'; -/* eslint-disable-next-line no-unused-vars */ -import {RenderedConnection} from './rendered_connection.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Coordinate} from './utils/coordinate.js'; +import type {IConnectionChecker} from './interfaces/i_connection_checker.js'; +import type {RenderedConnection} from './rendered_connection.js'; +import type {Coordinate} from './utils/coordinate.js'; /** diff --git a/core/contextmenu.ts b/core/contextmenu.ts index f05aa0c2a99..50e2555803c 100644 --- a/core/contextmenu.ts +++ b/core/contextmenu.ts @@ -15,14 +15,12 @@ import * as goog from '../closure/goog/goog.js'; goog.declareModuleId('Blockly.ContextMenu'); -/* eslint-disable-next-line no-unused-vars */ -import {Block} from './block.js'; -/* eslint-disable-next-line no-unused-vars */ -import {BlockSvg} from './block_svg.js'; +import type {Block} from './block.js'; +import type {BlockSvg} from './block_svg.js'; import * as browserEvents from './browser_events.js'; import * as clipboard from './clipboard.js'; import {config} from './config.js'; -import {ContextMenuOption, ContextMenuRegistry, LegacyContextMenuOption} from './contextmenu_registry.js'; +import type {ContextMenuOption, ContextMenuRegistry, LegacyContextMenuOption} from './contextmenu_registry.js'; import * as BlockCreate from './events/events_block_create.js'; import * as eventUtils from './events/utils.js'; import {Menu} from './menu.js'; @@ -37,8 +35,7 @@ import * as svgMath from './utils/svg_math.js'; import * as userAgent from './utils/useragent.js'; import * as WidgetDiv from './widgetdiv.js'; import {WorkspaceCommentSvg} from './workspace_comment_svg.js'; -/* eslint-disable-next-line no-unused-vars */ -import {WorkspaceSvg} from './workspace_svg.js'; +import type {WorkspaceSvg} from './workspace_svg.js'; import * as Xml from './xml.js'; diff --git a/core/contextmenu_items.ts b/core/contextmenu_items.ts index 6d840ab4158..6d55bbef6b2 100644 --- a/core/contextmenu_items.ts +++ b/core/contextmenu_items.ts @@ -15,8 +15,7 @@ import * as goog from '../closure/goog/goog.js'; goog.declareModuleId('Blockly.ContextMenuItems'); -/* eslint-disable-next-line no-unused-vars */ -import {BlockSvg} from './block_svg.js'; +import type {BlockSvg} from './block_svg.js'; import * as clipboard from './clipboard.js'; import {ContextMenuRegistry, RegistryItem, Scope} from './contextmenu_registry.js'; import * as dialog from './dialog.js'; @@ -26,8 +25,7 @@ import {inputTypes} from './input_types.js'; import {Msg} from './msg.js'; import * as idGenerator from './utils/idgenerator.js'; import * as userAgent from './utils/useragent.js'; -/* eslint-disable-next-line no-unused-vars */ -import {WorkspaceSvg} from './workspace_svg.js'; +import type {WorkspaceSvg} from './workspace_svg.js'; /** diff --git a/core/contextmenu_registry.ts b/core/contextmenu_registry.ts index a3fa6aba011..a963eda8035 100644 --- a/core/contextmenu_registry.ts +++ b/core/contextmenu_registry.ts @@ -15,10 +15,8 @@ import * as goog from '../closure/goog/goog.js'; goog.declareModuleId('Blockly.ContextMenuRegistry'); -/* eslint-disable-next-line no-unused-vars */ -import {BlockSvg} from './block_svg.js'; -/* eslint-disable-next-line no-unused-vars */ -import {WorkspaceSvg} from './workspace_svg.js'; +import type {BlockSvg} from './block_svg.js'; +import type {WorkspaceSvg} from './workspace_svg.js'; /** diff --git a/core/delete_area.ts b/core/delete_area.ts index da787074598..c0e6fe6d3e0 100644 --- a/core/delete_area.ts +++ b/core/delete_area.ts @@ -19,10 +19,8 @@ goog.declareModuleId('Blockly.DeleteArea'); import {BlockSvg} from './block_svg.js'; import {DragTarget} from './drag_target.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IDeleteArea} from './interfaces/i_delete_area.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IDraggable} from './interfaces/i_draggable.js'; +import type {IDeleteArea} from './interfaces/i_delete_area.js'; +import type {IDraggable} from './interfaces/i_draggable.js'; /** diff --git a/core/drag_target.ts b/core/drag_target.ts index 8f217830210..e35148f0712 100644 --- a/core/drag_target.ts +++ b/core/drag_target.ts @@ -17,12 +17,9 @@ import * as goog from '../closure/goog/goog.js'; goog.declareModuleId('Blockly.DragTarget'); -/* eslint-disable-next-line no-unused-vars */ -import {IDragTarget} from './interfaces/i_drag_target.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IDraggable} from './interfaces/i_draggable.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Rect} from './utils/rect.js'; +import type {IDragTarget} from './interfaces/i_drag_target.js'; +import type {IDraggable} from './interfaces/i_draggable.js'; +import type {Rect} from './utils/rect.js'; /** diff --git a/core/dropdowndiv.ts b/core/dropdowndiv.ts index 13dd961a78a..b6a6def74a3 100644 --- a/core/dropdowndiv.ts +++ b/core/dropdowndiv.ts @@ -17,19 +17,15 @@ import * as goog from '../closure/goog/goog.js'; goog.declareModuleId('Blockly.dropDownDiv'); -/* eslint-disable-next-line no-unused-vars */ -import {BlockSvg} from './block_svg.js'; +import type {BlockSvg} from './block_svg.js'; import * as common from './common.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Field} from './field.js'; +import type {Field} from './field.js'; import * as dom from './utils/dom.js'; import * as math from './utils/math.js'; import {Rect} from './utils/rect.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Size} from './utils/size.js'; +import type {Size} from './utils/size.js'; import * as style from './utils/style.js'; -/* eslint-disable-next-line no-unused-vars */ -import {WorkspaceSvg} from './workspace_svg.js'; +import type {WorkspaceSvg} from './workspace_svg.js'; /** diff --git a/core/events/events_abstract.ts b/core/events/events_abstract.ts index 36faea9620d..031e96fcf0e 100644 --- a/core/events/events_abstract.ts +++ b/core/events/events_abstract.ts @@ -17,7 +17,6 @@ import * as goog from '../../closure/goog/goog.js'; goog.declareModuleId('Blockly.Events.Abstract'); -/* eslint-disable-next-line no-unused-vars */ import {Workspace} from '../workspace.js'; import * as eventUtils from './utils.js'; diff --git a/core/events/events_block_base.ts b/core/events/events_block_base.ts index af0484d5bf0..86f6e04c2db 100644 --- a/core/events/events_block_base.ts +++ b/core/events/events_block_base.ts @@ -15,8 +15,7 @@ import * as goog from '../../closure/goog/goog.js'; goog.declareModuleId('Blockly.Events.BlockBase'); -/* eslint-disable-next-line no-unused-vars */ -import {Block} from '../block.js'; +import type {Block} from '../block.js'; import {Abstract as AbstractEvent} from './events_abstract.js'; diff --git a/core/events/events_block_change.ts b/core/events/events_block_change.ts index 95e197fd7be..bc3228ef8cd 100644 --- a/core/events/events_block_change.ts +++ b/core/events/events_block_change.ts @@ -15,10 +15,8 @@ import * as goog from '../../closure/goog/goog.js'; goog.declareModuleId('Blockly.Events.BlockChange'); -/* eslint-disable-next-line no-unused-vars */ -import {Block} from '../block.js'; -/* eslint-disable-next-line no-unused-vars */ -import {BlockSvg} from '../block_svg.js'; +import type {Block} from '../block.js'; +import type {BlockSvg} from '../block_svg.js'; import * as registry from '../registry.js'; import * as Xml from '../xml.js'; diff --git a/core/events/events_block_create.ts b/core/events/events_block_create.ts index 02f27ab0203..cb0f72ac006 100644 --- a/core/events/events_block_create.ts +++ b/core/events/events_block_create.ts @@ -15,8 +15,7 @@ import * as goog from '../../closure/goog/goog.js'; goog.declareModuleId('Blockly.Events.BlockCreate'); -/* eslint-disable-next-line no-unused-vars */ -import {Block} from '../block.js'; +import type {Block} from '../block.js'; import * as registry from '../registry.js'; import * as blocks from '../serialization/blocks.js'; import * as Xml from '../xml.js'; diff --git a/core/events/events_block_delete.ts b/core/events/events_block_delete.ts index 5823a9ec2f5..bdb1a18ee56 100644 --- a/core/events/events_block_delete.ts +++ b/core/events/events_block_delete.ts @@ -15,8 +15,7 @@ import * as goog from '../../closure/goog/goog.js'; goog.declareModuleId('Blockly.Events.BlockDelete'); -/* eslint-disable-next-line no-unused-vars */ -import {Block} from '../block.js'; +import type {Block} from '../block.js'; import * as registry from '../registry.js'; import * as blocks from '../serialization/blocks.js'; import * as Xml from '../xml.js'; diff --git a/core/events/events_block_drag.ts b/core/events/events_block_drag.ts index 2ddf87cbf80..266a3d102f0 100644 --- a/core/events/events_block_drag.ts +++ b/core/events/events_block_drag.ts @@ -15,8 +15,7 @@ import * as goog from '../../closure/goog/goog.js'; goog.declareModuleId('Blockly.Events.BlockDrag'); -/* eslint-disable-next-line no-unused-vars */ -import {Block} from '../block.js'; +import type {Block} from '../block.js'; import * as registry from '../registry.js'; import {UiBase} from './events_ui_base.js'; diff --git a/core/events/events_block_move.ts b/core/events/events_block_move.ts index c9621d29ca7..85cdb66e2d7 100644 --- a/core/events/events_block_move.ts +++ b/core/events/events_block_move.ts @@ -15,8 +15,7 @@ import * as goog from '../../closure/goog/goog.js'; goog.declareModuleId('Blockly.Events.BlockMove'); -/* eslint-disable-next-line no-unused-vars */ -import {Block} from '../block.js'; +import type {Block} from '../block.js'; import {ConnectionType} from '../connection_type.js'; import * as registry from '../registry.js'; import {Coordinate} from '../utils/coordinate.js'; diff --git a/core/events/events_bubble_open.ts b/core/events/events_bubble_open.ts index 4f7bcda1112..aad69b1331b 100644 --- a/core/events/events_bubble_open.ts +++ b/core/events/events_bubble_open.ts @@ -15,8 +15,7 @@ import * as goog from '../../closure/goog/goog.js'; goog.declareModuleId('Blockly.Events.BubbleOpen'); -/* eslint-disable-next-line no-unused-vars */ -import {BlockSvg} from '../block_svg.js'; +import type {BlockSvg} from '../block_svg.js'; import * as registry from '../registry.js'; import {UiBase} from './events_ui_base.js'; diff --git a/core/events/events_click.ts b/core/events/events_click.ts index e9290032466..a58a7b8acb4 100644 --- a/core/events/events_click.ts +++ b/core/events/events_click.ts @@ -15,8 +15,7 @@ import * as goog from '../../closure/goog/goog.js'; goog.declareModuleId('Blockly.Events.Click'); -/* eslint-disable-next-line no-unused-vars */ -import {Block} from '../block.js'; +import type {Block} from '../block.js'; import * as registry from '../registry.js'; import {UiBase} from './events_ui_base.js'; diff --git a/core/events/events_comment_base.ts b/core/events/events_comment_base.ts index 54f4d93c89e..20ff9cb97a4 100644 --- a/core/events/events_comment_base.ts +++ b/core/events/events_comment_base.ts @@ -16,15 +16,12 @@ import * as goog from '../../closure/goog/goog.js'; goog.declareModuleId('Blockly.Events.CommentBase'); import * as utilsXml from '../utils/xml.js'; -/* eslint-disable-next-line no-unused-vars */ -import {WorkspaceComment} from '../workspace_comment.js'; +import type {WorkspaceComment} from '../workspace_comment.js'; import * as Xml from '../xml.js'; import {Abstract as AbstractEvent} from './events_abstract.js'; -/* eslint-disable-next-line no-unused-vars */ -import {CommentCreate} from './events_comment_create.js'; -/* eslint-disable-next-line no-unused-vars */ -import {CommentDelete} from './events_comment_delete.js'; +import type {CommentCreate} from './events_comment_create.js'; +import type {CommentDelete} from './events_comment_delete.js'; import * as eventUtils from './utils.js'; diff --git a/core/events/events_comment_change.ts b/core/events/events_comment_change.ts index 4553fcf448e..e3eda33aa5d 100644 --- a/core/events/events_comment_change.ts +++ b/core/events/events_comment_change.ts @@ -16,8 +16,7 @@ import * as goog from '../../closure/goog/goog.js'; goog.declareModuleId('Blockly.Events.CommentChange'); import * as registry from '../registry.js'; -/* eslint-disable-next-line no-unused-vars */ -import {WorkspaceComment} from '../workspace_comment.js'; +import type {WorkspaceComment} from '../workspace_comment.js'; import {CommentBase} from './events_comment_base.js'; import * as eventUtils from './utils.js'; diff --git a/core/events/events_comment_create.ts b/core/events/events_comment_create.ts index 6afc6cb50e6..8d55e7a5f97 100644 --- a/core/events/events_comment_create.ts +++ b/core/events/events_comment_create.ts @@ -16,8 +16,7 @@ import * as goog from '../../closure/goog/goog.js'; goog.declareModuleId('Blockly.Events.CommentCreate'); import * as registry from '../registry.js'; -/* eslint-disable-next-line no-unused-vars */ -import {WorkspaceComment} from '../workspace_comment.js'; +import type {WorkspaceComment} from '../workspace_comment.js'; import * as Xml from '../xml.js'; import {CommentBase} from './events_comment_base.js'; diff --git a/core/events/events_comment_delete.ts b/core/events/events_comment_delete.ts index 1293ec8d60e..fbb890e3c73 100644 --- a/core/events/events_comment_delete.ts +++ b/core/events/events_comment_delete.ts @@ -16,8 +16,7 @@ import * as goog from '../../closure/goog/goog.js'; goog.declareModuleId('Blockly.Events.CommentDelete'); import * as registry from '../registry.js'; -/* eslint-disable-next-line no-unused-vars */ -import {WorkspaceComment} from '../workspace_comment.js'; +import type {WorkspaceComment} from '../workspace_comment.js'; import {CommentBase} from './events_comment_base.js'; import * as eventUtils from './utils.js'; diff --git a/core/events/events_comment_move.ts b/core/events/events_comment_move.ts index 3a69f8dd5df..49d34f5e7d8 100644 --- a/core/events/events_comment_move.ts +++ b/core/events/events_comment_move.ts @@ -17,8 +17,7 @@ goog.declareModuleId('Blockly.Events.CommentMove'); import * as registry from '../registry.js'; import {Coordinate} from '../utils/coordinate.js'; -/* eslint-disable-next-line no-unused-vars */ -import {WorkspaceComment} from '../workspace_comment.js'; +import type {WorkspaceComment} from '../workspace_comment.js'; import {CommentBase} from './events_comment_base.js'; import * as eventUtils from './utils.js'; diff --git a/core/events/events_marker_move.ts b/core/events/events_marker_move.ts index 1ebc9e6fbe8..f91246a95e7 100644 --- a/core/events/events_marker_move.ts +++ b/core/events/events_marker_move.ts @@ -15,12 +15,10 @@ import * as goog from '../../closure/goog/goog.js'; goog.declareModuleId('Blockly.Events.MarkerMove'); -/* eslint-disable-next-line no-unused-vars */ -import {Block} from '../block.js'; +import type {Block} from '../block.js'; import {ASTNode} from '../keyboard_nav/ast_node.js'; import * as registry from '../registry.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Workspace} from '../workspace.js'; +import type {Workspace} from '../workspace.js'; import {UiBase} from './events_ui_base.js'; import * as eventUtils from './utils.js'; diff --git a/core/events/events_ui.ts b/core/events/events_ui.ts index d667bc11468..de647f2fb40 100644 --- a/core/events/events_ui.ts +++ b/core/events/events_ui.ts @@ -17,8 +17,7 @@ import * as goog from '../../closure/goog/goog.js'; goog.declareModuleId('Blockly.Events.Ui'); -/* eslint-disable-next-line no-unused-vars */ -import {Block} from '../block.js'; +import type {Block} from '../block.js'; import * as registry from '../registry.js'; import {UiBase} from './events_ui_base.js'; diff --git a/core/events/events_var_base.ts b/core/events/events_var_base.ts index 70b4d131c71..3ad0cbc31db 100644 --- a/core/events/events_var_base.ts +++ b/core/events/events_var_base.ts @@ -15,8 +15,7 @@ import * as goog from '../../closure/goog/goog.js'; goog.declareModuleId('Blockly.Events.VarBase'); -/* eslint-disable-next-line no-unused-vars */ -import {VariableModel} from '../variable_model.js'; +import type {VariableModel} from '../variable_model.js'; import {Abstract as AbstractEvent} from './events_abstract.js'; diff --git a/core/events/events_var_create.ts b/core/events/events_var_create.ts index c8ce8fe8a32..0dd40fcff41 100644 --- a/core/events/events_var_create.ts +++ b/core/events/events_var_create.ts @@ -16,8 +16,7 @@ import * as goog from '../../closure/goog/goog.js'; goog.declareModuleId('Blockly.Events.VarCreate'); import * as registry from '../registry.js'; -/* eslint-disable-next-line no-unused-vars */ -import {VariableModel} from '../variable_model.js'; +import type {VariableModel} from '../variable_model.js'; import {VarBase} from './events_var_base.js'; import * as eventUtils from './utils.js'; diff --git a/core/events/events_var_delete.ts b/core/events/events_var_delete.ts index 5fd30f66f51..eca7959d388 100644 --- a/core/events/events_var_delete.ts +++ b/core/events/events_var_delete.ts @@ -16,8 +16,7 @@ import * as goog from '../../closure/goog/goog.js'; goog.declareModuleId('Blockly.Events.VarDelete'); import * as registry from '../registry.js'; -/* eslint-disable-next-line no-unused-vars */ -import {VariableModel} from '../variable_model.js'; +import type {VariableModel} from '../variable_model.js'; import {VarBase} from './events_var_base.js'; import * as eventUtils from './utils.js'; diff --git a/core/events/events_var_rename.ts b/core/events/events_var_rename.ts index 4fefd49ef0c..4de0ed7e192 100644 --- a/core/events/events_var_rename.ts +++ b/core/events/events_var_rename.ts @@ -16,8 +16,7 @@ import * as goog from '../../closure/goog/goog.js'; goog.declareModuleId('Blockly.Events.VarRename'); import * as registry from '../registry.js'; -/* eslint-disable-next-line no-unused-vars */ -import {VariableModel} from '../variable_model.js'; +import type {VariableModel} from '../variable_model.js'; import {VarBase} from './events_var_base.js'; import * as eventUtils from './utils.js'; diff --git a/core/events/utils.ts b/core/events/utils.ts index 6f41cf67f5d..db1f2cefd65 100644 --- a/core/events/utils.ts +++ b/core/events/utils.ts @@ -17,29 +17,19 @@ import * as goog from '../../closure/goog/goog.js'; goog.declareModuleId('Blockly.Events.utils'); -/* eslint-disable-next-line no-unused-vars */ -import {Block} from '../block.js'; +import type {Block} from '../block.js'; import * as registry from '../registry.js'; import * as idGenerator from '../utils/idgenerator.js'; -/* eslint-disable-next-line no-unused-vars */ import {Workspace} from '../workspace.js'; -/* eslint-disable-next-line no-unused-vars */ -import {WorkspaceSvg} from '../workspace_svg.js'; - -/* eslint-disable-next-line no-unused-vars */ -import {Abstract} from './events_abstract.js'; -/* eslint-disable-next-line no-unused-vars */ -import {BlockChange} from './events_block_change.js'; -/* eslint-disable-next-line no-unused-vars */ -import {BlockCreate} from './events_block_create.js'; -/* eslint-disable-next-line no-unused-vars */ -import {BlockMove} from './events_block_move.js'; -/* eslint-disable-next-line no-unused-vars */ -import {CommentCreate} from './events_comment_create.js'; -/* eslint-disable-next-line no-unused-vars */ -import {CommentMove} from './events_comment_move.js'; -/* eslint-disable-next-line no-unused-vars */ -import {ViewportChange} from './events_viewport.js'; +import type {WorkspaceSvg} from '../workspace_svg.js'; + +import type {Abstract} from './events_abstract.js'; +import type {BlockChange} from './events_block_change.js'; +import type {BlockCreate} from './events_block_create.js'; +import type {BlockMove} from './events_block_move.js'; +import type {CommentCreate} from './events_comment_create.js'; +import type {CommentMove} from './events_comment_move.js'; +import type {ViewportChange} from './events_viewport.js'; /** Group ID for new events. Grouped events are indivisible. */ diff --git a/core/events/workspace_events.ts b/core/events/workspace_events.ts index 643b85f68c6..12acb8a7a5b 100644 --- a/core/events/workspace_events.ts +++ b/core/events/workspace_events.ts @@ -16,8 +16,7 @@ import * as goog from '../../closure/goog/goog.js'; goog.declareModuleId('Blockly.Events.FinishedLoading'); import * as registry from '../registry.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Workspace} from '../workspace.js'; +import type {Workspace} from '../workspace.js'; import {Abstract as AbstractEvent} from './events_abstract.js'; import * as eventUtils from './utils.js'; diff --git a/core/extensions.ts b/core/extensions.ts index 1846bd8d193..9729dca5320 100644 --- a/core/extensions.ts +++ b/core/extensions.ts @@ -24,9 +24,8 @@ goog.declareModuleId('Blockly.Extensions'); // Unused import preserved for side-effects. Remove if unneeded. import './mutator.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Block} from './block.js'; -import {BlockSvg} from './block_svg.js'; +import type {Block} from './block.js'; +import type {BlockSvg} from './block_svg.js'; import {FieldDropdown} from './field_dropdown.js'; import {Mutator} from './mutator.js'; import * as parsing from './utils/parsing.js'; diff --git a/core/field.ts b/core/field.ts index 728c1055839..dd0a694a360 100644 --- a/core/field.ts +++ b/core/field.ts @@ -27,30 +27,21 @@ import './events/events_block_change.js'; // Unused import preserved for side-effects. Remove if unneeded. import './gesture.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Block} from './block.js'; -/* eslint-disable-next-line no-unused-vars */ -import {BlockSvg} from './block_svg.js'; +import type {Block} from './block.js'; +import type {BlockSvg} from './block_svg.js'; import * as browserEvents from './browser_events.js'; import * as dropDownDiv from './dropdowndiv.js'; import * as eventUtils from './events/utils.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Input} from './input.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IASTNodeLocationSvg} from './interfaces/i_ast_node_location_svg.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IASTNodeLocationWithBlock} from './interfaces/i_ast_node_location_with_block.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IKeyboardAccessible} from './interfaces/i_keyboard_accessible.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IRegistrable} from './interfaces/i_registrable.js'; +import type {Input} from './input.js'; +import type {IASTNodeLocationSvg} from './interfaces/i_ast_node_location_svg.js'; +import type {IASTNodeLocationWithBlock} from './interfaces/i_ast_node_location_with_block.js'; +import type {IKeyboardAccessible} from './interfaces/i_keyboard_accessible.js'; +import type {IRegistrable} from './interfaces/i_registrable.js'; import {MarkerManager} from './marker_manager.js'; -/* eslint-disable-next-line no-unused-vars */ -import {ConstantProvider} from './renderers/common/constants.js'; -import {KeyboardShortcut} from './shortcut_registry.js'; +import type {ConstantProvider} from './renderers/common/constants.js'; +import type {KeyboardShortcut} from './shortcut_registry.js'; import * as Tooltip from './tooltip.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Coordinate} from './utils/coordinate.js'; +import type {Coordinate} from './utils/coordinate.js'; import * as dom from './utils/dom.js'; import * as parsing from './utils/parsing.js'; import {Rect} from './utils/rect.js'; @@ -61,8 +52,7 @@ import {Svg} from './utils/svg.js'; import * as userAgent from './utils/useragent.js'; import * as utilsXml from './utils/xml.js'; import * as WidgetDiv from './widgetdiv.js'; -/* eslint-disable-next-line no-unused-vars */ -import {WorkspaceSvg} from './workspace_svg.js'; +import type {WorkspaceSvg} from './workspace_svg.js'; import * as Xml from './xml.js'; diff --git a/core/field_angle.ts b/core/field_angle.ts index bd61b0a0ae9..8391a0e2ab9 100644 --- a/core/field_angle.ts +++ b/core/field_angle.ts @@ -25,8 +25,7 @@ import {FieldTextInput} from './field_textinput.js'; import * as dom from './utils/dom.js'; import {KeyCodes} from './utils/keycodes.js'; import * as math from './utils/math.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Sentinel} from './utils/sentinel.js'; +import type {Sentinel} from './utils/sentinel.js'; import {Svg} from './utils/svg.js'; import * as userAgent from './utils/useragent.js'; import * as WidgetDiv from './widgetdiv.js'; diff --git a/core/field_checkbox.ts b/core/field_checkbox.ts index d254ace14af..9b806f492d9 100644 --- a/core/field_checkbox.ts +++ b/core/field_checkbox.ts @@ -21,8 +21,7 @@ import './events/events_block_change.js'; import {Field} from './field.js'; import * as fieldRegistry from './field_registry.js'; import * as dom from './utils/dom.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Sentinel} from './utils/sentinel.js'; +import type {Sentinel} from './utils/sentinel.js'; /** diff --git a/core/field_colour.ts b/core/field_colour.ts index 40f260200e1..ed44591101e 100644 --- a/core/field_colour.ts +++ b/core/field_colour.ts @@ -29,8 +29,7 @@ import * as colour from './utils/colour.js'; import * as dom from './utils/dom.js'; import * as idGenerator from './utils/idgenerator.js'; import {KeyCodes} from './utils/keycodes.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Sentinel} from './utils/sentinel.js'; +import type {Sentinel} from './utils/sentinel.js'; import {Size} from './utils/size.js'; diff --git a/core/field_dropdown.ts b/core/field_dropdown.ts index c759ee32576..b864385e6d2 100644 --- a/core/field_dropdown.ts +++ b/core/field_dropdown.ts @@ -19,8 +19,7 @@ import * as goog from '../closure/goog/goog.js'; goog.declareModuleId('Blockly.FieldDropdown'); -/* eslint-disable-next-line no-unused-vars */ -import {BlockSvg} from './block_svg.js'; +import type {BlockSvg} from './block_svg.js'; import * as dropDownDiv from './dropdowndiv.js'; import {Field} from './field.js'; import * as fieldRegistry from './field_registry.js'; @@ -30,8 +29,7 @@ import * as aria from './utils/aria.js'; import {Coordinate} from './utils/coordinate.js'; import * as dom from './utils/dom.js'; import * as parsing from './utils/parsing.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Sentinel} from './utils/sentinel.js'; +import type {Sentinel} from './utils/sentinel.js'; import * as utilsString from './utils/string.js'; import {Svg} from './utils/svg.js'; import * as userAgent from './utils/useragent.js'; diff --git a/core/field_image.ts b/core/field_image.ts index 9ff4945505c..99c0aadb749 100644 --- a/core/field_image.ts +++ b/core/field_image.ts @@ -19,8 +19,7 @@ import {Field} from './field.js'; import * as fieldRegistry from './field_registry.js'; import * as dom from './utils/dom.js'; import * as parsing from './utils/parsing.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Sentinel} from './utils/sentinel.js'; +import type {Sentinel} from './utils/sentinel.js'; import {Size} from './utils/size.js'; import {Svg} from './utils/svg.js'; diff --git a/core/field_label.ts b/core/field_label.ts index bc47a1505c3..52d7be8a289 100644 --- a/core/field_label.ts +++ b/core/field_label.ts @@ -21,8 +21,7 @@ import {Field} from './field.js'; import * as fieldRegistry from './field_registry.js'; import * as dom from './utils/dom.js'; import * as parsing from './utils/parsing.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Sentinel} from './utils/sentinel.js'; +import type {Sentinel} from './utils/sentinel.js'; /** diff --git a/core/field_multilineinput.ts b/core/field_multilineinput.ts index 505ad58ca00..55dcc4a85a8 100644 --- a/core/field_multilineinput.ts +++ b/core/field_multilineinput.ts @@ -23,8 +23,7 @@ import * as aria from './utils/aria.js'; import * as dom from './utils/dom.js'; import {KeyCodes} from './utils/keycodes.js'; import * as parsing from './utils/parsing.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Sentinel} from './utils/sentinel.js'; +import type {Sentinel} from './utils/sentinel.js'; import {Svg} from './utils/svg.js'; import * as userAgent from './utils/useragent.js'; import * as WidgetDiv from './widgetdiv.js'; diff --git a/core/field_number.ts b/core/field_number.ts index c4f03744145..c100f2cf7d1 100644 --- a/core/field_number.ts +++ b/core/field_number.ts @@ -19,8 +19,7 @@ import {Field} from './field.js'; import * as fieldRegistry from './field_registry.js'; import {FieldTextInput} from './field_textinput.js'; import * as aria from './utils/aria.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Sentinel} from './utils/sentinel.js'; +import type {Sentinel} from './utils/sentinel.js'; /** diff --git a/core/field_registry.ts b/core/field_registry.ts index 54e0a6d96e7..40c4e20e5d6 100644 --- a/core/field_registry.ts +++ b/core/field_registry.ts @@ -19,10 +19,8 @@ import * as goog from '../closure/goog/goog.js'; goog.declareModuleId('Blockly.fieldRegistry'); -/* eslint-disable-next-line no-unused-vars */ -import {Field} from './field.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IRegistrableField} from './interfaces/i_registrable_field.js'; +import type {Field} from './field.js'; +import type {IRegistrableField} from './interfaces/i_registrable_field.js'; import * as registry from './registry.js'; diff --git a/core/field_textinput.ts b/core/field_textinput.ts index 07571309fd8..76585a61f31 100644 --- a/core/field_textinput.ts +++ b/core/field_textinput.ts @@ -18,8 +18,7 @@ goog.declareModuleId('Blockly.FieldTextInput'); // Unused import preserved for side-effects. Remove if unneeded. import './events/events_block_change.js'; -/* eslint-disable-next-line no-unused-vars */ -import {BlockSvg} from './block_svg.js'; +import type {BlockSvg} from './block_svg.js'; import * as browserEvents from './browser_events.js'; import * as dialog from './dialog.js'; import * as dropDownDiv from './dropdowndiv.js'; @@ -32,12 +31,10 @@ import {Coordinate} from './utils/coordinate.js'; import * as dom from './utils/dom.js'; import {KeyCodes} from './utils/keycodes.js'; import * as parsing from './utils/parsing.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Sentinel} from './utils/sentinel.js'; +import type {Sentinel} from './utils/sentinel.js'; import * as userAgent from './utils/useragent.js'; import * as WidgetDiv from './widgetdiv.js'; -/* eslint-disable-next-line no-unused-vars */ -import {WorkspaceSvg} from './workspace_svg.js'; +import type {WorkspaceSvg} from './workspace_svg.js'; /** diff --git a/core/field_variable.ts b/core/field_variable.ts index 358e4eeac99..a3ddf1229b2 100644 --- a/core/field_variable.ts +++ b/core/field_variable.ts @@ -18,20 +18,16 @@ goog.declareModuleId('Blockly.FieldVariable'); // Unused import preserved for side-effects. Remove if unneeded. import './events/events_block_change.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Block} from './block.js'; +import type {Block} from './block.js'; import {Field} from './field.js'; import {FieldDropdown} from './field_dropdown.js'; import * as fieldRegistry from './field_registry.js'; import * as internalConstants from './internal_constants.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Menu} from './menu.js'; -/* eslint-disable-next-line no-unused-vars */ -import {MenuItem} from './menuitem.js'; +import type {Menu} from './menu.js'; +import type {MenuItem} from './menuitem.js'; import {Msg} from './msg.js'; import * as parsing from './utils/parsing.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Sentinel} from './utils/sentinel.js'; +import type {Sentinel} from './utils/sentinel.js'; import {Size} from './utils/size.js'; import {VariableModel} from './variable_model.js'; import * as Variables from './variables.js'; diff --git a/core/flyout_base.ts b/core/flyout_base.ts index 37a579ded0d..fb21496d586 100644 --- a/core/flyout_base.ts +++ b/core/flyout_base.ts @@ -15,10 +15,8 @@ import * as goog from '../closure/goog/goog.js'; goog.declareModuleId('Blockly.Flyout'); -/* eslint-disable-next-line no-unused-vars */ -import {Block} from './block.js'; -/* eslint-disable-next-line no-unused-vars */ -import {BlockSvg} from './block_svg.js'; +import type {Block} from './block.js'; +import type {BlockSvg} from './block_svg.js'; import * as browserEvents from './browser_events.js'; import * as common from './common.js'; import {ComponentManager} from './component_manager.js'; @@ -26,14 +24,11 @@ import {DeleteArea} from './delete_area.js'; import * as BlockCreate from './events/events_block_create.js'; import * as VarCreate from './events/events_var_create.js'; import * as eventUtils from './events/utils.js'; -/* eslint-disable-next-line no-unused-vars */ import {FlyoutButton} from './flyout_button.js'; import {FlyoutMetricsManager} from './flyout_metrics_manager.js'; import * as Gesture from './gesture.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IFlyout} from './interfaces/i_flyout.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Options} from './options.js'; +import type {IFlyout} from './interfaces/i_flyout.js'; +import type {Options} from './options.js'; import * as blockRendering from './renderers/common/block_rendering.js'; import {ScrollbarPair} from './scrollbar_pair.js'; import * as blocks from './serialization/blocks.js'; @@ -42,8 +37,7 @@ import * as Touch from './touch.js'; import {Coordinate} from './utils/coordinate.js'; import * as dom from './utils/dom.js'; import * as idGenerator from './utils/idgenerator.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Rect} from './utils/rect.js'; +import type {Rect} from './utils/rect.js'; import {Svg} from './utils/svg.js'; import * as toolbox from './utils/toolbox.js'; import * as Variables from './variables.js'; diff --git a/core/flyout_button.ts b/core/flyout_button.ts index bb29ffdc85b..be13c4fb1d4 100644 --- a/core/flyout_button.ts +++ b/core/flyout_button.ts @@ -22,10 +22,8 @@ import * as dom from './utils/dom.js'; import * as parsing from './utils/parsing.js'; import * as style from './utils/style.js'; import {Svg} from './utils/svg.js'; -/* eslint-disable-next-line no-unused-vars */ -import * as toolbox from './utils/toolbox.js'; -/* eslint-disable-next-line no-unused-vars */ -import {WorkspaceSvg} from './workspace_svg.js'; +import type * as toolbox from './utils/toolbox.js'; +import type {WorkspaceSvg} from './workspace_svg.js'; /** diff --git a/core/flyout_horizontal.ts b/core/flyout_horizontal.ts index 7e433a913ad..98f08f009ec 100644 --- a/core/flyout_horizontal.ts +++ b/core/flyout_horizontal.ts @@ -18,14 +18,11 @@ goog.declareModuleId('Blockly.HorizontalFlyout'); import * as browserEvents from './browser_events.js'; import * as dropDownDiv from './dropdowndiv.js'; import {Flyout, FlyoutItem} from './flyout_base.js'; -/* eslint-disable-next-line no-unused-vars */ -import {FlyoutButton} from './flyout_button.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Options} from './options.js'; +import type {FlyoutButton} from './flyout_button.js'; +import type {Options} from './options.js'; import * as registry from './registry.js'; import {Scrollbar} from './scrollbar.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Coordinate} from './utils/coordinate.js'; +import type {Coordinate} from './utils/coordinate.js'; import {Rect} from './utils/rect.js'; import * as toolbox from './utils/toolbox.js'; import * as WidgetDiv from './widgetdiv.js'; diff --git a/core/flyout_metrics_manager.ts b/core/flyout_metrics_manager.ts index 85fadbfcb9d..af042770419 100644 --- a/core/flyout_metrics_manager.ts +++ b/core/flyout_metrics_manager.ts @@ -15,11 +15,9 @@ import * as goog from '../closure/goog/goog.js'; goog.declareModuleId('Blockly.FlyoutMetricsManager'); -/* eslint-disable-next-line no-unused-vars */ -import {IFlyout} from './interfaces/i_flyout.js'; +import type {IFlyout} from './interfaces/i_flyout.js'; import {ContainerRegion, MetricsManager} from './metrics_manager.js'; -/* eslint-disable-next-line no-unused-vars */ -import {WorkspaceSvg} from './workspace_svg.js'; +import type {WorkspaceSvg} from './workspace_svg.js'; /** diff --git a/core/flyout_vertical.ts b/core/flyout_vertical.ts index 7e68b596365..0e0d36e2dae 100644 --- a/core/flyout_vertical.ts +++ b/core/flyout_vertical.ts @@ -23,14 +23,11 @@ import './constants.js'; import * as browserEvents from './browser_events.js'; import * as dropDownDiv from './dropdowndiv.js'; import {Flyout, FlyoutItem} from './flyout_base.js'; -/* eslint-disable-next-line no-unused-vars */ -import {FlyoutButton} from './flyout_button.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Options} from './options.js'; +import type {FlyoutButton} from './flyout_button.js'; +import type {Options} from './options.js'; import * as registry from './registry.js'; import {Scrollbar} from './scrollbar.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Coordinate} from './utils/coordinate.js'; +import type {Coordinate} from './utils/coordinate.js'; import {Rect} from './utils/rect.js'; import * as toolbox from './utils/toolbox.js'; import * as WidgetDiv from './widgetdiv.js'; diff --git a/core/generator.ts b/core/generator.ts index 9703bab3475..d4cce6cf199 100644 --- a/core/generator.ts +++ b/core/generator.ts @@ -17,14 +17,11 @@ import * as goog from '../closure/goog/goog.js'; goog.declareModuleId('Blockly.Generator'); -/* eslint-disable-next-line no-unused-vars */ -import {Block} from './block.js'; +import type {Block} from './block.js'; import * as common from './common.js'; -/* eslint-disable-next-line no-unused-vars */ import {Names, NameType} from './names.js'; import * as deprecation from './utils/deprecation.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Workspace} from './workspace.js'; +import type {Workspace} from './workspace.js'; /** @@ -529,7 +526,8 @@ Object.defineProperties(Generator.prototype, { /** @return Name database. */ get(this: Generator): Names | undefined { - deprecation.warn('variableDB_', 'May 2021', 'September 2022', 'nameDB_'); + deprecation.warn( + 'variableDB_', 'May 2021', 'September 2022', 'nameDB_'); return this.nameDB_; }, /** @param nameDb New name database. */ diff --git a/core/gesture.ts b/core/gesture.ts index 6d664581cf4..5d656d3151f 100644 --- a/core/gesture.ts +++ b/core/gesture.ts @@ -23,32 +23,25 @@ import './block_dragger.js'; import './events/events_click.js'; import * as blockAnimations from './block_animations.js'; -/* eslint-disable-next-line no-unused-vars */ -import {BlockSvg} from './block_svg.js'; +import type {BlockSvg} from './block_svg.js'; import * as browserEvents from './browser_events.js'; import {BubbleDragger} from './bubble_dragger.js'; import * as common from './common.js'; import {config} from './config.js'; import * as eventUtils from './events/utils.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Field} from './field.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IBlockDragger} from './interfaces/i_block_dragger.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IBubble} from './interfaces/i_bubble.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IFlyout} from './interfaces/i_flyout.js'; +import type {Field} from './field.js'; +import type {IBlockDragger} from './interfaces/i_block_dragger.js'; +import type {IBubble} from './interfaces/i_bubble.js'; +import type {IFlyout} from './interfaces/i_flyout.js'; import * as internalConstants from './internal_constants.js'; import * as registry from './registry.js'; import * as Tooltip from './tooltip.js'; import * as Touch from './touch.js'; import {Coordinate} from './utils/coordinate.js'; import {Workspace} from './workspace.js'; -/* eslint-disable-next-line no-unused-vars */ import {WorkspaceCommentSvg} from './workspace_comment_svg.js'; import {WorkspaceDragger} from './workspace_dragger.js'; -/* eslint-disable-next-line no-unused-vars */ -import {WorkspaceSvg} from './workspace_svg.js'; +import type {WorkspaceSvg} from './workspace_svg.js'; /** diff --git a/core/icon.ts b/core/icon.ts index 464851de83c..6cf57f2a9b6 100644 --- a/core/icon.ts +++ b/core/icon.ts @@ -15,11 +15,9 @@ import * as goog from '../closure/goog/goog.js'; goog.declareModuleId('Blockly.Icon'); -/* eslint-disable-next-line no-unused-vars */ -import {BlockSvg} from './block_svg.js'; +import type {BlockSvg} from './block_svg.js'; import * as browserEvents from './browser_events.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Bubble} from './bubble.js'; +import type {Bubble} from './bubble.js'; import {Coordinate} from './utils/coordinate.js'; import * as dom from './utils/dom.js'; import {Size} from './utils/size.js'; diff --git a/core/inject.ts b/core/inject.ts index 6095b1f1038..9d642e64223 100644 --- a/core/inject.ts +++ b/core/inject.ts @@ -16,8 +16,7 @@ import * as goog from '../closure/goog/goog.js'; goog.declareModuleId('Blockly.inject'); import {BlockDragSurfaceSvg} from './block_drag_surface.js'; -/* eslint-disable-next-line no-unused-vars */ -import {BlocklyOptions} from './blockly_options.js'; +import type {BlocklyOptions} from './blockly_options.js'; import * as browserEvents from './browser_events.js'; import * as bumpObjects from './bump_objects.js'; import * as common from './common.js'; diff --git a/core/input.ts b/core/input.ts index 9a297c7b0dd..4d58cc2f064 100644 --- a/core/input.ts +++ b/core/input.ts @@ -18,18 +18,13 @@ goog.declareModuleId('Blockly.Input'); // Unused import preserved for side-effects. Remove if unneeded. import './field_label.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Block} from './block.js'; -/* eslint-disable-next-line no-unused-vars */ -import {BlockSvg} from './block_svg.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Connection} from './connection.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Field} from './field.js'; +import type {Block} from './block.js'; +import type {BlockSvg} from './block_svg.js'; +import type {Connection} from './connection.js'; +import type {Field} from './field.js'; import * as fieldRegistry from './field_registry.js'; import {inputTypes} from './input_types.js'; -/* eslint-disable-next-line no-unused-vars */ -import {RenderedConnection} from './rendered_connection.js'; +import type {RenderedConnection} from './rendered_connection.js'; /** diff --git a/core/insertion_marker_manager.ts b/core/insertion_marker_manager.ts index c509cd08807..abdfca4dea3 100644 --- a/core/insertion_marker_manager.ts +++ b/core/insertion_marker_manager.ts @@ -16,24 +16,18 @@ import * as goog from '../closure/goog/goog.js'; goog.declareModuleId('Blockly.InsertionMarkerManager'); import * as blockAnimations from './block_animations.js'; -/* eslint-disable-next-line no-unused-vars */ -import {BlockSvg} from './block_svg.js'; +import type {BlockSvg} from './block_svg.js'; import * as common from './common.js'; import {ComponentManager} from './component_manager.js'; import {config} from './config.js'; import {ConnectionType} from './connection_type.js'; import * as constants from './constants.js'; import * as eventUtils from './events/utils.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IDeleteArea} from './interfaces/i_delete_area.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IDragTarget} from './interfaces/i_drag_target.js'; -/* eslint-disable-next-line no-unused-vars */ -import {RenderedConnection} from './rendered_connection.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Coordinate} from './utils/coordinate.js'; -/* eslint-disable-next-line no-unused-vars */ -import {WorkspaceSvg} from './workspace_svg.js'; +import type {IDeleteArea} from './interfaces/i_delete_area.js'; +import type {IDragTarget} from './interfaces/i_drag_target.js'; +import type {RenderedConnection} from './rendered_connection.js'; +import type {Coordinate} from './utils/coordinate.js'; +import type {WorkspaceSvg} from './workspace_svg.js'; /** Represents a nearby valid connection. */ diff --git a/core/interfaces/i_ast_node_location_svg.ts b/core/interfaces/i_ast_node_location_svg.ts index fe1f0926e28..758533d1482 100644 --- a/core/interfaces/i_ast_node_location_svg.ts +++ b/core/interfaces/i_ast_node_location_svg.ts @@ -15,8 +15,7 @@ import * as goog from '../../closure/goog/goog.js'; goog.declareModuleId('Blockly.IASTNodeLocationSvg'); -/* eslint-disable-next-line no-unused-vars */ -import {IASTNodeLocation} from './i_ast_node_location.js'; +import type {IASTNodeLocation} from './i_ast_node_location.js'; /** diff --git a/core/interfaces/i_ast_node_location_with_block.ts b/core/interfaces/i_ast_node_location_with_block.ts index 20307977250..89c9970f7c1 100644 --- a/core/interfaces/i_ast_node_location_with_block.ts +++ b/core/interfaces/i_ast_node_location_with_block.ts @@ -21,8 +21,7 @@ goog.declareModuleId('Blockly.IASTNodeLocationWithBlock'); // Unused import preserved for side-effects. Remove if unneeded. import '../block.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IASTNodeLocation} from './i_ast_node_location.js'; +import type {IASTNodeLocation} from './i_ast_node_location.js'; /** diff --git a/core/interfaces/i_autohideable.ts b/core/interfaces/i_autohideable.ts index 2ba5cf2016b..2777c6b36f4 100644 --- a/core/interfaces/i_autohideable.ts +++ b/core/interfaces/i_autohideable.ts @@ -17,8 +17,7 @@ import * as goog from '../../closure/goog/goog.js'; goog.declareModuleId('Blockly.IAutoHideable'); -/* eslint-disable-next-line no-unused-vars */ -import {IComponent} from './i_component.js'; +import type {IComponent} from './i_component.js'; /** diff --git a/core/interfaces/i_bubble.ts b/core/interfaces/i_bubble.ts index 1da315b6b8c..6a2e6e0b99d 100644 --- a/core/interfaces/i_bubble.ts +++ b/core/interfaces/i_bubble.ts @@ -22,10 +22,8 @@ import '../block_drag_surface.js'; // Unused import preserved for side-effects. Remove if unneeded. import '../utils/coordinate.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IContextMenu} from './i_contextmenu.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IDraggable} from './i_draggable.js'; +import type {IContextMenu} from './i_contextmenu.js'; +import type {IDraggable} from './i_draggable.js'; /** diff --git a/core/interfaces/i_collapsible_toolbox_item.ts b/core/interfaces/i_collapsible_toolbox_item.ts index 534bdf81845..8329dc3c924 100644 --- a/core/interfaces/i_collapsible_toolbox_item.ts +++ b/core/interfaces/i_collapsible_toolbox_item.ts @@ -20,7 +20,7 @@ goog.declareModuleId('Blockly.ICollapsibleToolboxItem'); // Unused import preserved for side-effects. Remove if unneeded. import './i_toolbox_item.js'; -import {ISelectableToolboxItem} from './i_selectable_toolbox_item.js'; +import type {ISelectableToolboxItem} from './i_selectable_toolbox_item.js'; /** diff --git a/core/interfaces/i_copyable.ts b/core/interfaces/i_copyable.ts index 20fec55c0bd..21265f111a2 100644 --- a/core/interfaces/i_copyable.ts +++ b/core/interfaces/i_copyable.ts @@ -15,11 +15,8 @@ import * as goog from '../../closure/goog/goog.js'; goog.declareModuleId('Blockly.ICopyable'); -/* eslint-disable-next-line no-unused-vars */ -/* eslint-disable-next-line no-unused-vars */ -import {WorkspaceSvg} from '../workspace_svg.js'; - -import {ISelectable} from './i_selectable.js'; +import type {WorkspaceSvg} from '../workspace_svg.js'; +import type {ISelectable} from './i_selectable.js'; /** @alias Blockly.ICopyable */ diff --git a/core/interfaces/i_delete_area.ts b/core/interfaces/i_delete_area.ts index 5f68ab92cfb..548de239686 100644 --- a/core/interfaces/i_delete_area.ts +++ b/core/interfaces/i_delete_area.ts @@ -22,7 +22,7 @@ goog.declareModuleId('Blockly.IDeleteArea'); // Unused import preserved for side-effects. Remove if unneeded. import './i_draggable.js'; -import {IDragTarget} from './i_drag_target.js'; +import type {IDragTarget} from './i_drag_target.js'; /** diff --git a/core/interfaces/i_drag_target.ts b/core/interfaces/i_drag_target.ts index 7da9209f76c..70795b4f19d 100644 --- a/core/interfaces/i_drag_target.ts +++ b/core/interfaces/i_drag_target.ts @@ -25,7 +25,7 @@ import './i_draggable.js'; // Unused import preserved for side-effects. Remove if unneeded. import '../utils/rect.js'; -import {IComponent} from './i_component.js'; +import type {IComponent} from './i_component.js'; /** diff --git a/core/interfaces/i_draggable.ts b/core/interfaces/i_draggable.ts index 24f12a84004..bf115a5aaae 100644 --- a/core/interfaces/i_draggable.ts +++ b/core/interfaces/i_draggable.ts @@ -15,8 +15,7 @@ import * as goog from '../../closure/goog/goog.js'; goog.declareModuleId('Blockly.IDraggable'); -/* eslint-disable-next-line no-unused-vars */ -import {IDeletable} from './i_deletable.js'; +import type {IDeletable} from './i_deletable.js'; /** diff --git a/core/interfaces/i_flyout.ts b/core/interfaces/i_flyout.ts index 471f6d967f4..3ef49c71923 100644 --- a/core/interfaces/i_flyout.ts +++ b/core/interfaces/i_flyout.ts @@ -28,11 +28,9 @@ import '../utils/coordinate.js'; // Unused import preserved for side-effects. Remove if unneeded. import '../utils/svg.js'; -/* eslint-disable-next-line no-unused-vars */ -import {WorkspaceSvg} from '../workspace_svg.js'; +import type {WorkspaceSvg} from '../workspace_svg.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IRegistrable} from './i_registrable.js'; +import type {IRegistrable} from './i_registrable.js'; /** diff --git a/core/interfaces/i_positionable.ts b/core/interfaces/i_positionable.ts index c8fcdeab198..0cdbde2b959 100644 --- a/core/interfaces/i_positionable.ts +++ b/core/interfaces/i_positionable.ts @@ -23,7 +23,7 @@ import '../metrics_manager.js'; // Unused import preserved for side-effects. Remove if unneeded. import '../utils/rect.js'; -import {IComponent} from './i_component.js'; +import type {IComponent} from './i_component.js'; /** diff --git a/core/interfaces/i_registrable_field.ts b/core/interfaces/i_registrable_field.ts index f6929b9f817..1ae06408e1a 100644 --- a/core/interfaces/i_registrable_field.ts +++ b/core/interfaces/i_registrable_field.ts @@ -15,8 +15,7 @@ import * as goog from '../../closure/goog/goog.js'; goog.declareModuleId('Blockly.IRegistrableField'); -/* eslint-disable-next-line no-unused-vars */ -import {Field} from '../field.js'; +import type {Field} from '../field.js'; type fromJson = (p1: object) => Field; diff --git a/core/interfaces/i_selectable.ts b/core/interfaces/i_selectable.ts index 497f0c1c57c..6fdaa8458ec 100644 --- a/core/interfaces/i_selectable.ts +++ b/core/interfaces/i_selectable.ts @@ -15,10 +15,8 @@ import * as goog from '../../closure/goog/goog.js'; goog.declareModuleId('Blockly.ISelectable'); -// eslint-disable-next-line no-unused-vars -import {IDeletable} from './i_deletable.js'; -// eslint-disable-next-line no-unused-vars -import {IMovable} from './i_movable.js'; +import type {IDeletable} from './i_deletable.js'; +import type {IMovable} from './i_movable.js'; /** diff --git a/core/interfaces/i_selectable_toolbox_item.ts b/core/interfaces/i_selectable_toolbox_item.ts index 411959b0447..b2756ca3ebb 100644 --- a/core/interfaces/i_selectable_toolbox_item.ts +++ b/core/interfaces/i_selectable_toolbox_item.ts @@ -19,8 +19,7 @@ goog.declareModuleId('Blockly.ISelectableToolboxItem'); // Unused import preserved for side-effects. Remove if unneeded. import '../utils/toolbox.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IToolboxItem} from './i_toolbox_item.js'; +import type {IToolboxItem} from './i_toolbox_item.js'; /** diff --git a/core/interfaces/i_serializer.ts b/core/interfaces/i_serializer.ts index 3f1d8ebfddc..5c926b86e6f 100644 --- a/core/interfaces/i_serializer.ts +++ b/core/interfaces/i_serializer.ts @@ -17,8 +17,7 @@ import * as goog from '../../closure/goog/goog.js'; goog.declareModuleId('Blockly.serialization.ISerializer'); -// eslint-disable-next-line no-unused-vars -import {Workspace} from '../workspace.js'; +import type {Workspace} from '../workspace.js'; /** diff --git a/core/interfaces/i_toolbox.ts b/core/interfaces/i_toolbox.ts index 98dd493d046..2ce3e421e6d 100644 --- a/core/interfaces/i_toolbox.ts +++ b/core/interfaces/i_toolbox.ts @@ -28,8 +28,7 @@ import './i_toolbox_item.js'; // Unused import preserved for side-effects. Remove if unneeded. import '../workspace_svg.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IRegistrable} from './i_registrable.js'; +import type {IRegistrable} from './i_registrable.js'; /** diff --git a/core/keyboard_nav/ast_node.ts b/core/keyboard_nav/ast_node.ts index 626290c4f01..4efe194dbb6 100644 --- a/core/keyboard_nav/ast_node.ts +++ b/core/keyboard_nav/ast_node.ts @@ -17,22 +17,15 @@ import * as goog from '../../closure/goog/goog.js'; goog.declareModuleId('Blockly.ASTNode'); -/* eslint-disable-next-line no-unused-vars */ -import {Block} from '../block.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Connection} from '../connection.js'; +import type {Block} from '../block.js'; +import type {Connection} from '../connection.js'; import {ConnectionType} from '../connection_type.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Field} from '../field.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Input} from '../input.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IASTNodeLocation} from '../interfaces/i_ast_node_location.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IASTNodeLocationWithBlock} from '../interfaces/i_ast_node_location_with_block.js'; +import type {Field} from '../field.js'; +import type {Input} from '../input.js'; +import type {IASTNodeLocation} from '../interfaces/i_ast_node_location.js'; +import type {IASTNodeLocationWithBlock} from '../interfaces/i_ast_node_location_with_block.js'; import {Coordinate} from '../utils/coordinate.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Workspace} from '../workspace.js'; +import type {Workspace} from '../workspace.js'; /** diff --git a/core/keyboard_nav/marker.ts b/core/keyboard_nav/marker.ts index 292e3816f10..be79d745dbd 100644 --- a/core/keyboard_nav/marker.ts +++ b/core/keyboard_nav/marker.ts @@ -18,10 +18,9 @@ import * as goog from '../../closure/goog/goog.js'; goog.declareModuleId('Blockly.Marker'); /* eslint-disable-next-line no-unused-vars */ -/* eslint-disable-next-line no-unused-vars */ -import {MarkerSvg} from '../renderers/common/marker_svg.js'; +import type {MarkerSvg} from '../renderers/common/marker_svg.js'; -import {ASTNode} from './ast_node.js'; +import type {ASTNode} from './ast_node.js'; /** diff --git a/core/keyboard_nav/tab_navigate_cursor.ts b/core/keyboard_nav/tab_navigate_cursor.ts index 6f6810e9dd6..16b565b4363 100644 --- a/core/keyboard_nav/tab_navigate_cursor.ts +++ b/core/keyboard_nav/tab_navigate_cursor.ts @@ -17,8 +17,7 @@ import * as goog from '../../closure/goog/goog.js'; goog.declareModuleId('Blockly.TabNavigateCursor'); -/* eslint-disable-next-line no-unused-vars */ -import {Field} from '../field.js'; +import type {Field} from '../field.js'; import {ASTNode} from './ast_node.js'; import {BasicCursor} from './basic_cursor.js'; diff --git a/core/marker_manager.ts b/core/marker_manager.ts index f092fb42400..b3a24b968c3 100644 --- a/core/marker_manager.ts +++ b/core/marker_manager.ts @@ -15,12 +15,9 @@ import * as goog from '../closure/goog/goog.js'; goog.declareModuleId('Blockly.MarkerManager'); -/* eslint-disable-next-line no-unused-vars */ -import {Cursor} from './keyboard_nav/cursor.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Marker} from './keyboard_nav/marker.js'; -/* eslint-disable-next-line no-unused-vars */ -import {WorkspaceSvg} from './workspace_svg.js'; +import type {Cursor} from './keyboard_nav/cursor.js'; +import type {Marker} from './keyboard_nav/marker.js'; +import type {WorkspaceSvg} from './workspace_svg.js'; /** diff --git a/core/menu.ts b/core/menu.ts index 7dc72a8959c..9795b48fe97 100644 --- a/core/menu.ts +++ b/core/menu.ts @@ -16,14 +16,12 @@ import * as goog from '../closure/goog/goog.js'; goog.declareModuleId('Blockly.Menu'); import * as browserEvents from './browser_events.js'; -/* eslint-disable-next-line no-unused-vars */ -import {MenuItem} from './menuitem.js'; +import type {MenuItem} from './menuitem.js'; import * as aria from './utils/aria.js'; import {Coordinate} from './utils/coordinate.js'; import * as dom from './utils/dom.js'; import {KeyCodes} from './utils/keycodes.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Size} from './utils/size.js'; +import type {Size} from './utils/size.js'; import * as style from './utils/style.js'; diff --git a/core/metrics_manager.ts b/core/metrics_manager.ts index 4007a783cf5..21bea420463 100644 --- a/core/metrics_manager.ts +++ b/core/metrics_manager.ts @@ -15,19 +15,14 @@ import * as goog from '../closure/goog/goog.js'; goog.declareModuleId('Blockly.MetricsManager'); -/* eslint-disable-next-line no-unused-vars */ -import {IFlyout} from './interfaces/i_flyout.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IMetricsManager} from './interfaces/i_metrics_manager.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IToolbox} from './interfaces/i_toolbox.js'; +import type {IFlyout} from './interfaces/i_flyout.js'; +import type {IMetricsManager} from './interfaces/i_metrics_manager.js'; +import type {IToolbox} from './interfaces/i_toolbox.js'; import * as registry from './registry.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Metrics} from './utils/metrics.js'; +import type {Metrics} from './utils/metrics.js'; import {Size} from './utils/size.js'; import * as toolboxUtils from './utils/toolbox.js'; -/* eslint-disable-next-line no-unused-vars */ -import {WorkspaceSvg} from './workspace_svg.js'; +import type {WorkspaceSvg} from './workspace_svg.js'; /** diff --git a/core/mutator.ts b/core/mutator.ts index dd147f4657f..0b3d1e29753 100644 --- a/core/mutator.ts +++ b/core/mutator.ts @@ -20,24 +20,18 @@ goog.declareModuleId('Blockly.Mutator'); // Unused import preserved for side-effects. Remove if unneeded. import './events/events_bubble_open.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Block} from './block.js'; -/* eslint-disable-next-line no-unused-vars */ -import {BlockSvg} from './block_svg.js'; -/* eslint-disable-next-line no-unused-vars */ -import {BlocklyOptions} from './blockly_options.js'; +import type {Block} from './block.js'; +import type {BlockSvg} from './block_svg.js'; +import type {BlocklyOptions} from './blockly_options.js'; import {Bubble} from './bubble.js'; import {config} from './config.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Connection} from './connection.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Abstract} from './events/events_abstract.js'; +import type {Connection} from './connection.js'; +import type {Abstract} from './events/events_abstract.js'; import {BlockChange} from './events/events_block_change.js'; import * as eventUtils from './events/utils.js'; import {Icon} from './icon.js'; import {Options} from './options.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Coordinate} from './utils/coordinate.js'; +import type {Coordinate} from './utils/coordinate.js'; import * as dom from './utils/dom.js'; import {Svg} from './utils/svg.js'; import * as toolbox from './utils/toolbox.js'; diff --git a/core/names.ts b/core/names.ts index 046a7ee0036..5d831aa5d9b 100644 --- a/core/names.ts +++ b/core/names.ts @@ -20,11 +20,9 @@ import './procedures.js'; import {Msg} from './msg.js'; import * as Procedures from './procedures.js'; -/* eslint-disable-next-line no-unused-vars */ -import {VariableMap} from './variable_map.js'; +import type {VariableMap} from './variable_map.js'; import * as Variables from './variables.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Workspace} from './workspace.js'; +import type {Workspace} from './workspace.js'; /** diff --git a/core/options.ts b/core/options.ts index dd4c9024a47..aee2fe3880f 100644 --- a/core/options.ts +++ b/core/options.ts @@ -15,17 +15,14 @@ import * as goog from '../closure/goog/goog.js'; goog.declareModuleId('Blockly.Options'); -/* eslint-disable-next-line no-unused-vars */ -import {BlocklyOptions} from './blockly_options.js'; +import type {BlocklyOptions} from './blockly_options.js'; import * as registry from './registry.js'; import {Theme} from './theme.js'; import {Classic} from './theme/classic.js'; import * as idGenerator from './utils/idgenerator.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Metrics} from './utils/metrics.js'; +import type {Metrics} from './utils/metrics.js'; import * as toolbox from './utils/toolbox.js'; -/* eslint-disable-next-line no-unused-vars */ -import {WorkspaceSvg} from './workspace_svg.js'; +import type {WorkspaceSvg} from './workspace_svg.js'; /** diff --git a/core/positionable_helpers.ts b/core/positionable_helpers.ts index 3965996b072..6b93466fe39 100644 --- a/core/positionable_helpers.ts +++ b/core/positionable_helpers.ts @@ -19,14 +19,12 @@ goog.declareModuleId('Blockly.uiPosition'); // Unused import preserved for side-effects. Remove if unneeded. import './metrics_manager.js'; -import {UiMetrics} from './metrics_manager.js'; +import type {UiMetrics} from './metrics_manager.js'; import {Scrollbar} from './scrollbar.js'; import {Rect} from './utils/rect.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Size} from './utils/size.js'; +import type {Size} from './utils/size.js'; import * as toolbox from './utils/toolbox.js'; -/* eslint-disable-next-line no-unused-vars */ -import {WorkspaceSvg} from './workspace_svg.js'; +import type {WorkspaceSvg} from './workspace_svg.js'; /** diff --git a/core/procedures.ts b/core/procedures.ts index f0d87a3a266..5935748e9f9 100644 --- a/core/procedures.ts +++ b/core/procedures.ts @@ -18,25 +18,19 @@ goog.declareModuleId('Blockly.Procedures'); // Unused import preserved for side-effects. Remove if unneeded. import './events/events_block_change.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Block} from './block.js'; -/* eslint-disable-next-line no-unused-vars */ -import {BlockSvg} from './block_svg.js'; +import type {Block} from './block.js'; +import type {BlockSvg} from './block_svg.js'; import {Blocks} from './blocks.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Abstract} from './events/events_abstract.js'; -/* eslint-disable-next-line no-unused-vars */ -import {BubbleOpen} from './events/events_bubble_open.js'; +import type {Abstract} from './events/events_abstract.js'; +import type {BubbleOpen} from './events/events_bubble_open.js'; import * as eventUtils from './events/utils.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Field} from './field.js'; +import type {Field} from './field.js'; import {Msg} from './msg.js'; import {Names} from './names.js'; import * as utilsXml from './utils/xml.js'; import * as Variables from './variables.js'; import {Workspace} from './workspace.js'; -/* eslint-disable-next-line no-unused-vars */ -import {WorkspaceSvg} from './workspace_svg.js'; +import type {WorkspaceSvg} from './workspace_svg.js'; import * as Xml from './xml.js'; diff --git a/core/registry.ts b/core/registry.ts index c4d5c4594f7..0439d1482ba 100644 --- a/core/registry.ts +++ b/core/registry.ts @@ -17,32 +17,19 @@ import * as goog from '../closure/goog/goog.js'; goog.declareModuleId('Blockly.registry'); -/* eslint-disable-next-line no-unused-vars */ -import {Abstract} from './events/events_abstract.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Field} from './field.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IBlockDragger} from './interfaces/i_block_dragger.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IConnectionChecker} from './interfaces/i_connection_checker.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IFlyout} from './interfaces/i_flyout.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IMetricsManager} from './interfaces/i_metrics_manager.js'; -/* eslint-disable-next-line no-unused-vars */ -import {ISerializer} from './interfaces/i_serializer.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IToolbox} from './interfaces/i_toolbox.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Cursor} from './keyboard_nav/cursor.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Options} from './options.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Renderer} from './renderers/common/renderer.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Theme} from './theme.js'; -/* eslint-disable-next-line no-unused-vars */ -import {ToolboxItem} from './toolbox/toolbox_item.js'; +import type {Abstract} from './events/events_abstract.js'; +import type {Field} from './field.js'; +import type {IBlockDragger} from './interfaces/i_block_dragger.js'; +import type {IConnectionChecker} from './interfaces/i_connection_checker.js'; +import type {IFlyout} from './interfaces/i_flyout.js'; +import type {IMetricsManager} from './interfaces/i_metrics_manager.js'; +import type {ISerializer} from './interfaces/i_serializer.js'; +import type {IToolbox} from './interfaces/i_toolbox.js'; +import type {Cursor} from './keyboard_nav/cursor.js'; +import type {Options} from './options.js'; +import type {Renderer} from './renderers/common/renderer.js'; +import type {Theme} from './theme.js'; +import type {ToolboxItem} from './toolbox/toolbox_item.js'; /** diff --git a/core/rendered_connection.ts b/core/rendered_connection.ts index 25155ec73dd..430bc89e02e 100644 --- a/core/rendered_connection.ts +++ b/core/rendered_connection.ts @@ -15,15 +15,12 @@ import * as goog from '../closure/goog/goog.js'; goog.declareModuleId('Blockly.RenderedConnection'); -/* eslint-disable-next-line no-unused-vars */ -import {Block} from './block.js'; -/* eslint-disable-next-line no-unused-vars */ -import {BlockSvg} from './block_svg.js'; +import type {Block} from './block.js'; +import type {BlockSvg} from './block_svg.js'; import * as common from './common.js'; import {config} from './config.js'; import {Connection} from './connection.js'; -/* eslint-disable-next-line no-unused-vars */ -import {ConnectionDB} from './connection_db.js'; +import type {ConnectionDB} from './connection_db.js'; import {ConnectionType} from './connection_type.js'; import * as eventUtils from './events/utils.js'; import * as internalConstants from './internal_constants.js'; diff --git a/core/renderers/common/block_rendering.ts b/core/renderers/common/block_rendering.ts index 21f5c64b1c5..20f968d62b2 100644 --- a/core/renderers/common/block_rendering.ts +++ b/core/renderers/common/block_rendering.ts @@ -16,8 +16,7 @@ import * as goog from '../../../closure/goog/goog.js'; goog.declareModuleId('Blockly.blockRendering'); import * as registry from '../../registry.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Theme} from '../../theme.js'; +import type {Theme} from '../../theme.js'; import * as deprecation from '../../utils/deprecation.js'; import {Measurable} from '../measurables/base.js'; import {BottomRow} from '../measurables/bottom_row.js'; @@ -46,7 +45,7 @@ import {ConstantProvider} from './constants.js'; import * as debug from './debug.js'; import {Debug} from './debugger.js'; import {Drawer} from './drawer.js'; -import {IPathObject} from './i_path_object.js'; +import type {IPathObject} from './i_path_object.js'; import {RenderInfo} from './info.js'; import {MarkerSvg} from './marker_svg.js'; import {PathObject} from './path_object.js'; diff --git a/core/renderers/common/constants.ts b/core/renderers/common/constants.ts index e359a01271d..51158cfae1b 100644 --- a/core/renderers/common/constants.ts +++ b/core/renderers/common/constants.ts @@ -16,9 +16,8 @@ import * as goog from '../../../closure/goog/goog.js'; goog.declareModuleId('Blockly.blockRendering.ConstantProvider'); import {ConnectionType} from '../../connection_type.js'; -/* eslint-disable-next-line no-unused-vars */ -import {RenderedConnection} from '../../rendered_connection.js'; -import {BlockStyle, Theme} from '../../theme.js'; +import type {RenderedConnection} from '../../rendered_connection.js'; +import type {BlockStyle, Theme} from '../../theme.js'; import * as colour from '../../utils/colour.js'; import * as dom from '../../utils/dom.js'; import * as parsing from '../../utils/parsing.js'; diff --git a/core/renderers/common/debugger.ts b/core/renderers/common/debugger.ts index c23d829e8aa..e21342f57d5 100644 --- a/core/renderers/common/debugger.ts +++ b/core/renderers/common/debugger.ts @@ -15,30 +15,22 @@ import * as goog from '../../../closure/goog/goog.js'; goog.declareModuleId('Blockly.blockRendering.Debug'); -/* eslint-disable-next-line no-unused-vars */ -import {BlockSvg} from '../../block_svg.js'; +import type {BlockSvg} from '../../block_svg.js'; import {ConnectionType} from '../../connection_type.js'; import {FieldLabel} from '../../field_label.js'; -/* eslint-disable-next-line no-unused-vars */ -import {RenderedConnection} from '../../rendered_connection.js'; +import type {RenderedConnection} from '../../rendered_connection.js'; import * as dom from '../../utils/dom.js'; import {Svg} from '../../utils/svg.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Measurable} from '../measurables/base.js'; +import type {Measurable} from '../measurables/base.js'; import {Field} from '../measurables/field.js'; -/* eslint-disable-next-line no-unused-vars */ -import {InRowSpacer} from '../measurables/in_row_spacer.js'; +import type {InRowSpacer} from '../measurables/in_row_spacer.js'; import {InputConnection} from '../measurables/input_connection.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Row} from '../measurables/row.js'; +import type {Row} from '../measurables/row.js'; import {Types} from '../measurables/types.js'; -/* eslint-disable-next-line no-unused-vars */ -import {RenderInfo as ZelosInfo} from '../zelos/info.js'; +import type {RenderInfo as ZelosInfo} from '../zelos/info.js'; -/* eslint-disable-next-line no-unused-vars */ -import {ConstantProvider} from './constants.js'; -/* eslint-disable-next-line no-unused-vars */ -import {RenderInfo} from './info.js'; +import type {ConstantProvider} from './constants.js'; +import type {RenderInfo} from './info.js'; /** diff --git a/core/renderers/common/drawer.ts b/core/renderers/common/drawer.ts index bfd83b42fb8..16561fdc8c6 100644 --- a/core/renderers/common/drawer.ts +++ b/core/renderers/common/drawer.ts @@ -15,29 +15,20 @@ import * as goog from '../../../closure/goog/goog.js'; goog.declareModuleId('Blockly.blockRendering.Drawer'); -/* eslint-disable-next-line no-unused-vars */ -import {BlockSvg} from '../../block_svg.js'; +import type {BlockSvg} from '../../block_svg.js'; import * as svgPaths from '../../utils/svg_paths.js'; import {Connection} from '../measurables/connection.js'; -/* eslint-disable-next-line no-unused-vars */ -import {ExternalValueInput} from '../measurables/external_value_input.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Field} from '../measurables/field.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Icon} from '../measurables/icon.js'; -/* eslint-disable-next-line no-unused-vars */ -import {InlineInput} from '../measurables/inline_input.js'; -/* eslint-disable-next-line no-unused-vars */ -import {PreviousConnection} from '../measurables/previous_connection.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Row} from '../measurables/row.js'; +import type {ExternalValueInput} from '../measurables/external_value_input.js'; +import type {Field} from '../measurables/field.js'; +import type {Icon} from '../measurables/icon.js'; +import type {InlineInput} from '../measurables/inline_input.js'; +import type {PreviousConnection} from '../measurables/previous_connection.js'; +import type {Row} from '../measurables/row.js'; import {Types} from '../measurables/types.js'; -/* eslint-disable-next-line no-unused-vars */ -import {ConstantProvider, Notch, PuzzleTab} from './constants.js'; +import type {ConstantProvider, Notch, PuzzleTab} from './constants.js'; import * as debug from './debug.js'; -/* eslint-disable-next-line no-unused-vars */ -import {RenderInfo} from './info.js'; +import type {RenderInfo} from './info.js'; /** diff --git a/core/renderers/common/i_path_object.ts b/core/renderers/common/i_path_object.ts index de57cbff001..86eac963e8e 100644 --- a/core/renderers/common/i_path_object.ts +++ b/core/renderers/common/i_path_object.ts @@ -27,10 +27,9 @@ import '../../connection.js'; // Unused import preserved for side-effects. Remove if unneeded. import '../../theme.js'; -import {BlockStyle} from '../../theme.js'; +import type {BlockStyle} from '../../theme.js'; -/* eslint-disable-next-line no-unused-vars */ -import {ConstantProvider} from './constants.js'; +import type {ConstantProvider} from './constants.js'; /** diff --git a/core/renderers/common/info.ts b/core/renderers/common/info.ts index 24fe1e30fed..b7ca215e4bf 100644 --- a/core/renderers/common/info.ts +++ b/core/renderers/common/info.ts @@ -15,14 +15,11 @@ import * as goog from '../../../closure/goog/goog.js'; goog.declareModuleId('Blockly.blockRendering.RenderInfo'); -/* eslint-disable-next-line no-unused-vars */ -import {BlockSvg} from '../../block_svg.js'; +import type {BlockSvg} from '../../block_svg.js'; import {Align, Input} from '../../input.js'; import {inputTypes} from '../../input_types.js'; -/* eslint-disable-next-line no-unused-vars */ -import {RenderedConnection} from '../../rendered_connection.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Measurable} from '../measurables/base.js'; +import type {RenderedConnection} from '../../rendered_connection.js'; +import type {Measurable} from '../measurables/base.js'; import {BottomRow} from '../measurables/bottom_row.js'; import {ExternalValueInput} from '../measurables/external_value_input.js'; import {Field} from '../measurables/field.js'; @@ -36,18 +33,15 @@ import {NextConnection} from '../measurables/next_connection.js'; import {OutputConnection} from '../measurables/output_connection.js'; import {PreviousConnection} from '../measurables/previous_connection.js'; import {RoundCorner} from '../measurables/round_corner.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Row} from '../measurables/row.js'; +import type {Row} from '../measurables/row.js'; import {SpacerRow} from '../measurables/spacer_row.js'; import {SquareCorner} from '../measurables/square_corner.js'; import {StatementInput} from '../measurables/statement_input.js'; import {TopRow} from '../measurables/top_row.js'; import {Types} from '../measurables/types.js'; -/* eslint-disable-next-line no-unused-vars */ -import {ConstantProvider} from './constants.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Renderer} from './renderer.js'; +import type {ConstantProvider} from './constants.js'; +import type {Renderer} from './renderer.js'; /** diff --git a/core/renderers/common/marker_svg.ts b/core/renderers/common/marker_svg.ts index 1d7ffdf2cf5..4fedc87b525 100644 --- a/core/renderers/common/marker_svg.ts +++ b/core/renderers/common/marker_svg.ts @@ -18,29 +18,21 @@ goog.declareModuleId('Blockly.blockRendering.MarkerSvg'); // Unused import preserved for side-effects. Remove if unneeded. import '../../events/events_marker_move.js'; -/* eslint-disable-next-line no-unused-vars */ -import {BlockSvg} from '../../block_svg.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Connection} from '../../connection.js'; +import type {BlockSvg} from '../../block_svg.js'; +import type {Connection} from '../../connection.js'; import {ConnectionType} from '../../connection_type.js'; import * as eventUtils from '../../events/utils.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Field} from '../../field.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IASTNodeLocationSvg} from '../../interfaces/i_ast_node_location_svg.js'; +import type {Field} from '../../field.js'; +import type {IASTNodeLocationSvg} from '../../interfaces/i_ast_node_location_svg.js'; import {ASTNode} from '../../keyboard_nav/ast_node.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Marker} from '../../keyboard_nav/marker.js'; -/* eslint-disable-next-line no-unused-vars */ -import {RenderedConnection} from '../../rendered_connection.js'; +import type {Marker} from '../../keyboard_nav/marker.js'; +import type {RenderedConnection} from '../../rendered_connection.js'; import * as dom from '../../utils/dom.js'; import {Svg} from '../../utils/svg.js'; import * as svgPaths from '../../utils/svg_paths.js'; -/* eslint-disable-next-line no-unused-vars */ -import {WorkspaceSvg} from '../../workspace_svg.js'; +import type {WorkspaceSvg} from '../../workspace_svg.js'; -/* eslint-disable-next-line no-unused-vars */ -import {ConstantProvider, Notch, PuzzleTab} from './constants.js'; +import type {ConstantProvider, Notch, PuzzleTab} from './constants.js'; /** The name of the CSS class for a cursor. */ diff --git a/core/renderers/common/path_object.ts b/core/renderers/common/path_object.ts index ed002ce25f9..d8e85b995db 100644 --- a/core/renderers/common/path_object.ts +++ b/core/renderers/common/path_object.ts @@ -19,18 +19,14 @@ goog.declareModuleId('Blockly.blockRendering.PathObject'); // Unused import preserved for side-effects. Remove if unneeded. import '../../theme.js'; -/* eslint-disable-next-line no-unused-vars */ -import {BlockSvg} from '../../block_svg.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Connection} from '../../connection.js'; -import {BlockStyle} from '../../theme.js'; +import type {BlockSvg} from '../../block_svg.js'; +import type {Connection} from '../../connection.js'; +import type {BlockStyle} from '../../theme.js'; import * as dom from '../../utils/dom.js'; import {Svg} from '../../utils/svg.js'; -/* eslint-disable-next-line no-unused-vars */ -import {ConstantProvider} from './constants.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IPathObject} from './i_path_object.js'; +import type {ConstantProvider} from './constants.js'; +import type {IPathObject} from './i_path_object.js'; /** diff --git a/core/renderers/common/renderer.ts b/core/renderers/common/renderer.ts index b8839dcbfe5..28c62d9b126 100644 --- a/core/renderers/common/renderer.ts +++ b/core/renderers/common/renderer.ts @@ -15,30 +15,22 @@ import * as goog from '../../../closure/goog/goog.js'; goog.declareModuleId('Blockly.blockRendering.Renderer'); -/* eslint-disable-next-line no-unused-vars */ -import {Block} from '../../block.js'; -/* eslint-disable-next-line no-unused-vars */ -import {BlockSvg} from '../../block_svg.js'; +import type {Block} from '../../block.js'; +import type {BlockSvg} from '../../block_svg.js'; import {Connection} from '../../connection.js'; import {ConnectionType} from '../../connection_type.js'; import {InsertionMarkerManager, PreviewType} from '../../insertion_marker_manager.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IRegistrable} from '../../interfaces/i_registrable.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Marker} from '../../keyboard_nav/marker.js'; -/* eslint-disable-next-line no-unused-vars */ -import {RenderedConnection} from '../../rendered_connection.js'; -import {BlockStyle, Theme} from '../../theme.js'; -/* eslint-disable-next-line no-unused-vars */ -import {WorkspaceSvg} from '../../workspace_svg.js'; +import type {IRegistrable} from '../../interfaces/i_registrable.js'; +import type {Marker} from '../../keyboard_nav/marker.js'; +import type {RenderedConnection} from '../../rendered_connection.js'; +import type {BlockStyle, Theme} from '../../theme.js'; +import type {WorkspaceSvg} from '../../workspace_svg.js'; import {ConstantProvider} from './constants.js'; import * as debug from './debug.js'; -/* eslint-disable-next-line no-unused-vars */ import {Debug} from './debugger.js'; import {Drawer} from './drawer.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IPathObject} from './i_path_object.js'; +import type {IPathObject} from './i_path_object.js'; import {RenderInfo} from './info.js'; import {MarkerSvg} from './marker_svg.js'; import {PathObject} from './path_object.js'; diff --git a/core/renderers/geras/drawer.ts b/core/renderers/geras/drawer.ts index 1867735b6e4..6c8fcdaa1ed 100644 --- a/core/renderers/geras/drawer.ts +++ b/core/renderers/geras/drawer.ts @@ -15,22 +15,17 @@ import * as goog from '../../../closure/goog/goog.js'; goog.declareModuleId('Blockly.geras.Drawer'); -/* eslint-disable-next-line no-unused-vars */ -import {BlockSvg} from '../../block_svg.js'; +import type {BlockSvg} from '../../block_svg.js'; import * as svgPaths from '../../utils/svg_paths.js'; import * as debug from '../common/debug.js'; import {Drawer as BaseDrawer} from '../common/drawer.js'; -import {Row} from '../measurables/row.js'; +import type {Row} from '../measurables/row.js'; -/* eslint-disable-next-line no-unused-vars */ -import {ConstantProvider} from './constants.js'; +import type {ConstantProvider} from './constants.js'; import {Highlighter} from './highlighter.js'; -/* eslint-disable-next-line no-unused-vars */ -import {RenderInfo} from './info.js'; -/* eslint-disable-next-line no-unused-vars */ -import {InlineInput} from './measurables/inline_input.js'; -/* eslint-disable-next-line no-unused-vars */ -import {PathObject} from './path_object.js'; +import type {RenderInfo} from './info.js'; +import type {InlineInput} from './measurables/inline_input.js'; +import type {PathObject} from './path_object.js'; /** diff --git a/core/renderers/geras/highlight_constants.ts b/core/renderers/geras/highlight_constants.ts index 8f7d8fb3283..579af32c485 100644 --- a/core/renderers/geras/highlight_constants.ts +++ b/core/renderers/geras/highlight_constants.ts @@ -16,8 +16,7 @@ import * as goog from '../../../closure/goog/goog.js'; goog.declareModuleId('Blockly.geras.HighlightConstantProvider'); import * as svgPaths from '../../utils/svg_paths.js'; -/* eslint-disable-next-line no-unused-vars */ -import {ConstantProvider} from '../common/constants.js'; +import type {ConstantProvider} from '../common/constants.js'; /** An object containing sizing and path information about an outside corner. */ diff --git a/core/renderers/geras/highlighter.ts b/core/renderers/geras/highlighter.ts index 27a12aa33fd..8bef5459ba5 100644 --- a/core/renderers/geras/highlighter.ts +++ b/core/renderers/geras/highlighter.ts @@ -22,22 +22,16 @@ goog.declareModuleId('Blockly.geras.Highlighter'); import './renderer.js'; import * as svgPaths from '../../utils/svg_paths.js'; -/* eslint-disable-next-line no-unused-vars */ -import {ConstantProvider} from '../common/constants.js'; -/* eslint-disable-next-line no-unused-vars */ -import {BottomRow} from '../measurables/bottom_row.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Row} from '../measurables/row.js'; +import type {ConstantProvider} from '../common/constants.js'; +import type {BottomRow} from '../measurables/bottom_row.js'; +import type {Row} from '../measurables/row.js'; import {SpacerRow} from '../measurables/spacer_row.js'; -/* eslint-disable-next-line no-unused-vars */ -import {TopRow} from '../measurables/top_row.js'; +import type {TopRow} from '../measurables/top_row.js'; import {Types} from '../measurables/types.js'; -import {HighlightConstantProvider, InsideCorner, JaggedTeeth, Notch, OutsideCorner, PuzzleTab, StartHat} from './highlight_constants.js'; -/* eslint-disable-next-line no-unused-vars */ -import {RenderInfo} from './info.js'; -/* eslint-disable-next-line no-unused-vars */ -import {InlineInput} from './measurables/inline_input.js'; +import type {HighlightConstantProvider, InsideCorner, JaggedTeeth, Notch, OutsideCorner, PuzzleTab, StartHat} from './highlight_constants.js'; +import type {RenderInfo} from './info.js'; +import type {InlineInput} from './measurables/inline_input.js'; /** diff --git a/core/renderers/geras/info.ts b/core/renderers/geras/info.ts index 850303fa623..d2df8ee4b37 100644 --- a/core/renderers/geras/info.ts +++ b/core/renderers/geras/info.ts @@ -17,31 +17,24 @@ import * as goog from '../../../closure/goog/goog.js'; goog.declareModuleId('Blockly.geras.RenderInfo'); -/* eslint-disable-next-line no-unused-vars */ -import {BlockSvg} from '../../block_svg.js'; -import {Input} from '../../input.js'; +import type {BlockSvg} from '../../block_svg.js'; +import type {Input} from '../../input.js'; import {inputTypes} from '../../input_types.js'; import {RenderInfo as BaseRenderInfo} from '../common/info.js'; -import {Measurable} from '../measurables/base.js'; -/* eslint-disable-next-line no-unused-vars */ -import {BottomRow} from '../measurables/bottom_row.js'; +import type {Measurable} from '../measurables/base.js'; +import type {BottomRow} from '../measurables/bottom_row.js'; import {ExternalValueInput} from '../measurables/external_value_input.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Field} from '../measurables/field.js'; +import type {Field} from '../measurables/field.js'; import {InRowSpacer} from '../measurables/in_row_spacer.js'; -/* eslint-disable-next-line no-unused-vars */ -import {InputRow} from '../measurables/input_row.js'; -import {Row} from '../measurables/row.js'; -/* eslint-disable-next-line no-unused-vars */ -import {TopRow} from '../measurables/top_row.js'; +import type {InputRow} from '../measurables/input_row.js'; +import type {Row} from '../measurables/row.js'; +import type {TopRow} from '../measurables/top_row.js'; import {Types} from '../measurables/types.js'; -/* eslint-disable-next-line no-unused-vars */ -import {ConstantProvider} from './constants.js'; +import type {ConstantProvider} from './constants.js'; import {InlineInput} from './measurables/inline_input.js'; import {StatementInput} from './measurables/statement_input.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Renderer} from './renderer.js'; +import type {Renderer} from './renderer.js'; /** diff --git a/core/renderers/geras/measurables/inline_input.ts b/core/renderers/geras/measurables/inline_input.ts index 01c5fb21ac3..76dacf56b42 100644 --- a/core/renderers/geras/measurables/inline_input.ts +++ b/core/renderers/geras/measurables/inline_input.ts @@ -18,12 +18,10 @@ import * as goog from '../../../../closure/goog/goog.js'; goog.declareModuleId('Blockly.geras.InlineInput'); /* eslint-disable-next-line no-unused-vars */ -/* eslint-disable-next-line no-unused-vars */ -import {Input} from '../../../input.js'; -import {ConstantProvider as BaseConstantProvider} from '../../../renderers/common/constants.js'; +import type {Input} from '../../../input.js'; +import type {ConstantProvider as BaseConstantProvider} from '../../../renderers/common/constants.js'; import {InlineInput as BaseInlineInput} from '../../../renderers/measurables/inline_input.js'; -/* eslint-disable-next-line no-unused-vars */ -import {ConstantProvider as GerasConstantProvider} from '../constants.js'; +import type {ConstantProvider as GerasConstantProvider} from '../constants.js'; /** diff --git a/core/renderers/geras/measurables/statement_input.ts b/core/renderers/geras/measurables/statement_input.ts index 1b9f5467c04..f002a5bcb2f 100644 --- a/core/renderers/geras/measurables/statement_input.ts +++ b/core/renderers/geras/measurables/statement_input.ts @@ -18,12 +18,10 @@ import * as goog from '../../../../closure/goog/goog.js'; goog.declareModuleId('Blockly.geras.StatementInput'); /* eslint-disable-next-line no-unused-vars */ -/* eslint-disable-next-line no-unused-vars */ -import {Input} from '../../../input.js'; -import {ConstantProvider as BaseConstantProvider} from '../../../renderers/common/constants.js'; +import type {Input} from '../../../input.js'; +import type {ConstantProvider as BaseConstantProvider} from '../../../renderers/common/constants.js'; import {StatementInput as BaseStatementInput} from '../../../renderers/measurables/statement_input.js'; -/* eslint-disable-next-line no-unused-vars */ -import {ConstantProvider as GerasConstantProvider} from '../constants.js'; +import type {ConstantProvider as GerasConstantProvider} from '../constants.js'; /** diff --git a/core/renderers/geras/path_object.ts b/core/renderers/geras/path_object.ts index 857b665e66c..27d35ac7067 100644 --- a/core/renderers/geras/path_object.ts +++ b/core/renderers/geras/path_object.ts @@ -19,15 +19,14 @@ goog.declareModuleId('Blockly.geras.PathObject'); // Unused import preserved for side-effects. Remove if unneeded. import '../../theme.js'; -import {BlockSvg} from '../../block_svg.js'; -import {BlockStyle} from '../../theme.js'; +import type {BlockSvg} from '../../block_svg.js'; +import type {BlockStyle} from '../../theme.js'; import * as colour from '../../utils/colour.js'; import * as dom from '../../utils/dom.js'; import {Svg} from '../../utils/svg.js'; import {PathObject as BasePathObject} from '../common/path_object.js'; -/* eslint-disable-next-line no-unused-vars */ -import {ConstantProvider} from './constants.js'; +import type {ConstantProvider} from './constants.js'; /** diff --git a/core/renderers/geras/renderer.ts b/core/renderers/geras/renderer.ts index 64cc57b13d6..51a7ca29d12 100644 --- a/core/renderers/geras/renderer.ts +++ b/core/renderers/geras/renderer.ts @@ -19,12 +19,10 @@ goog.declareModuleId('Blockly.geras.Renderer'); // Unused import preserved for side-effects. Remove if unneeded. import '../common/constants.js'; -/* eslint-disable-next-line no-unused-vars */ -import {BlockSvg} from '../../block_svg.js'; -import {BlockStyle, Theme} from '../../theme.js'; +import type {BlockSvg} from '../../block_svg.js'; +import type {BlockStyle, Theme} from '../../theme.js'; import * as blockRendering from '../common/block_rendering.js'; -/* eslint-disable-next-line no-unused-vars */ -import {RenderInfo as BaseRenderInfo} from '../common/info.js'; +import type {RenderInfo as BaseRenderInfo} from '../common/info.js'; import {Renderer as BaseRenderer} from '../common/renderer.js'; import {ConstantProvider} from './constants.js'; diff --git a/core/renderers/measurables/base.ts b/core/renderers/measurables/base.ts index ab91053d2f2..f06c66968cf 100644 --- a/core/renderers/measurables/base.ts +++ b/core/renderers/measurables/base.ts @@ -15,8 +15,7 @@ import * as goog from '../../../closure/goog/goog.js'; goog.declareModuleId('Blockly.blockRendering.Measurable'); -/* eslint-disable-next-line no-unused-vars */ -import {ConstantProvider} from '../common/constants.js'; +import type {ConstantProvider} from '../common/constants.js'; import {Types} from './types.js'; diff --git a/core/renderers/measurables/bottom_row.ts b/core/renderers/measurables/bottom_row.ts index 81c71744971..897411edc90 100644 --- a/core/renderers/measurables/bottom_row.ts +++ b/core/renderers/measurables/bottom_row.ts @@ -17,13 +17,10 @@ import * as goog from '../../../closure/goog/goog.js'; goog.declareModuleId('Blockly.blockRendering.BottomRow'); -/* eslint-disable-next-line no-unused-vars */ -import {BlockSvg} from '../../block_svg.js'; -/* eslint-disable-next-line no-unused-vars */ -import {ConstantProvider} from '../common/constants.js'; +import type {BlockSvg} from '../../block_svg.js'; +import type {ConstantProvider} from '../common/constants.js'; -/* eslint-disable-next-line no-unused-vars */ -import {NextConnection} from './next_connection.js'; +import type {NextConnection} from './next_connection.js'; import {Row} from './row.js'; import {Types} from './types.js'; diff --git a/core/renderers/measurables/connection.ts b/core/renderers/measurables/connection.ts index 915a9b89fb9..84a121b2a9c 100644 --- a/core/renderers/measurables/connection.ts +++ b/core/renderers/measurables/connection.ts @@ -18,9 +18,8 @@ import * as goog from '../../../closure/goog/goog.js'; goog.declareModuleId('Blockly.blockRendering.Connection'); /* eslint-disable-next-line no-unused-vars */ -/* eslint-disable-next-line no-unused-vars */ -import {RenderedConnection} from '../../rendered_connection.js'; -import {ConstantProvider, Shape} from '../common/constants.js'; +import type {RenderedConnection} from '../../rendered_connection.js'; +import type {ConstantProvider, Shape} from '../common/constants.js'; import {Measurable} from './base.js'; import {Types} from './types.js'; diff --git a/core/renderers/measurables/external_value_input.ts b/core/renderers/measurables/external_value_input.ts index b1884b07ed7..f7cf459b599 100644 --- a/core/renderers/measurables/external_value_input.ts +++ b/core/renderers/measurables/external_value_input.ts @@ -18,9 +18,8 @@ import * as goog from '../../../closure/goog/goog.js'; goog.declareModuleId('Blockly.blockRendering.ExternalValueInput'); /* eslint-disable-next-line no-unused-vars */ -/* eslint-disable-next-line no-unused-vars */ -import {Input} from '../../input.js'; -import {ConstantProvider} from '../common/constants.js'; +import type {Input} from '../../input.js'; +import type {ConstantProvider} from '../common/constants.js'; import {InputConnection} from './input_connection.js'; import {Types} from './types.js'; diff --git a/core/renderers/measurables/field.ts b/core/renderers/measurables/field.ts index fd3d2586263..39a5b24d804 100644 --- a/core/renderers/measurables/field.ts +++ b/core/renderers/measurables/field.ts @@ -18,11 +18,9 @@ import * as goog from '../../../closure/goog/goog.js'; goog.declareModuleId('Blockly.blockRendering.Field'); /* eslint-disable-next-line no-unused-vars */ -/* eslint-disable-next-line no-unused-vars */ -import {Field as BlocklyField} from '../../field.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Input} from '../../input.js'; -import {ConstantProvider} from '../common/constants.js'; +import type {Field as BlocklyField} from '../../field.js'; +import type {Input} from '../../input.js'; +import type {ConstantProvider} from '../common/constants.js'; import {Measurable} from './base.js'; import {Types} from './types.js'; diff --git a/core/renderers/measurables/hat.ts b/core/renderers/measurables/hat.ts index 43bb799bf60..141a461f1c7 100644 --- a/core/renderers/measurables/hat.ts +++ b/core/renderers/measurables/hat.ts @@ -17,8 +17,7 @@ import * as goog from '../../../closure/goog/goog.js'; goog.declareModuleId('Blockly.blockRendering.Hat'); -/* eslint-disable-next-line no-unused-vars */ -import {ConstantProvider} from '../common/constants.js'; +import type {ConstantProvider} from '../common/constants.js'; import {Measurable} from './base.js'; import {Types} from './types.js'; diff --git a/core/renderers/measurables/icon.ts b/core/renderers/measurables/icon.ts index ad1fea58ff7..80437c4fb31 100644 --- a/core/renderers/measurables/icon.ts +++ b/core/renderers/measurables/icon.ts @@ -18,9 +18,8 @@ import * as goog from '../../../closure/goog/goog.js'; goog.declareModuleId('Blockly.blockRendering.Icon'); /* eslint-disable-next-line no-unused-vars */ -/* eslint-disable-next-line no-unused-vars */ -import {Icon as BlocklyIcon} from '../../icon.js'; -import {ConstantProvider} from '../common/constants.js'; +import type {Icon as BlocklyIcon} from '../../icon.js'; +import type {ConstantProvider} from '../common/constants.js'; import {Measurable} from './base.js'; import {Types} from './types.js'; diff --git a/core/renderers/measurables/in_row_spacer.ts b/core/renderers/measurables/in_row_spacer.ts index 10685b6ca07..97110c24c27 100644 --- a/core/renderers/measurables/in_row_spacer.ts +++ b/core/renderers/measurables/in_row_spacer.ts @@ -17,8 +17,7 @@ import * as goog from '../../../closure/goog/goog.js'; goog.declareModuleId('Blockly.blockRendering.InRowSpacer'); -/* eslint-disable-next-line no-unused-vars */ -import {ConstantProvider} from '../common/constants.js'; +import type {ConstantProvider} from '../common/constants.js'; import {Measurable} from './base.js'; import {Types} from './types.js'; diff --git a/core/renderers/measurables/inline_input.ts b/core/renderers/measurables/inline_input.ts index 9be2a157269..ce24540d38c 100644 --- a/core/renderers/measurables/inline_input.ts +++ b/core/renderers/measurables/inline_input.ts @@ -18,9 +18,8 @@ import * as goog from '../../../closure/goog/goog.js'; goog.declareModuleId('Blockly.blockRendering.InlineInput'); /* eslint-disable-next-line no-unused-vars */ -/* eslint-disable-next-line no-unused-vars */ -import {Input} from '../../input.js'; -import {ConstantProvider} from '../common/constants.js'; +import type {Input} from '../../input.js'; +import type {ConstantProvider} from '../common/constants.js'; import {InputConnection} from './input_connection.js'; import {Types} from './types.js'; diff --git a/core/renderers/measurables/input_connection.ts b/core/renderers/measurables/input_connection.ts index 659df3ab4a7..b5afb574be7 100644 --- a/core/renderers/measurables/input_connection.ts +++ b/core/renderers/measurables/input_connection.ts @@ -15,14 +15,10 @@ import * as goog from '../../../closure/goog/goog.js'; goog.declareModuleId('Blockly.blockRendering.InputConnection'); -/* eslint-disable-next-line no-unused-vars */ -import {BlockSvg} from '../../block_svg.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Input} from '../../input.js'; -/* eslint-disable-next-line no-unused-vars */ -import {RenderedConnection} from '../../rendered_connection.js'; -/* eslint-disable-next-line no-unused-vars */ -import {ConstantProvider} from '../common/constants.js'; +import type {BlockSvg} from '../../block_svg.js'; +import type {Input} from '../../input.js'; +import type {RenderedConnection} from '../../rendered_connection.js'; +import type {ConstantProvider} from '../common/constants.js'; import {Connection} from './connection.js'; import {Types} from './types.js'; diff --git a/core/renderers/measurables/input_row.ts b/core/renderers/measurables/input_row.ts index 3adaa174c2d..3c58e6e6165 100644 --- a/core/renderers/measurables/input_row.ts +++ b/core/renderers/measurables/input_row.ts @@ -17,8 +17,7 @@ import * as goog from '../../../closure/goog/goog.js'; goog.declareModuleId('Blockly.blockRendering.InputRow'); -/* eslint-disable-next-line no-unused-vars */ -import {ConstantProvider} from '../common/constants.js'; +import type {ConstantProvider} from '../common/constants.js'; import {ExternalValueInput} from './external_value_input.js'; import {InputConnection} from './input_connection.js'; diff --git a/core/renderers/measurables/jagged_edge.ts b/core/renderers/measurables/jagged_edge.ts index ec0f1444e83..b6c155c7234 100644 --- a/core/renderers/measurables/jagged_edge.ts +++ b/core/renderers/measurables/jagged_edge.ts @@ -17,8 +17,7 @@ import * as goog from '../../../closure/goog/goog.js'; goog.declareModuleId('Blockly.blockRendering.JaggedEdge'); -/* eslint-disable-next-line no-unused-vars */ -import {ConstantProvider} from '../common/constants.js'; +import type {ConstantProvider} from '../common/constants.js'; import {Measurable} from './base.js'; import {Types} from './types.js'; diff --git a/core/renderers/measurables/next_connection.ts b/core/renderers/measurables/next_connection.ts index 05238eb656b..03aa76bb9ed 100644 --- a/core/renderers/measurables/next_connection.ts +++ b/core/renderers/measurables/next_connection.ts @@ -17,10 +17,8 @@ import * as goog from '../../../closure/goog/goog.js'; goog.declareModuleId('Blockly.blockRendering.NextConnection'); -/* eslint-disable-next-line no-unused-vars */ -import {RenderedConnection} from '../../rendered_connection.js'; -/* eslint-disable-next-line no-unused-vars */ -import {ConstantProvider} from '../common/constants.js'; +import type {RenderedConnection} from '../../rendered_connection.js'; +import type {ConstantProvider} from '../common/constants.js'; import {Connection} from './connection.js'; import {Types} from './types.js'; diff --git a/core/renderers/measurables/output_connection.ts b/core/renderers/measurables/output_connection.ts index ac9e4212df8..119a50cee51 100644 --- a/core/renderers/measurables/output_connection.ts +++ b/core/renderers/measurables/output_connection.ts @@ -17,10 +17,8 @@ import * as goog from '../../../closure/goog/goog.js'; goog.declareModuleId('Blockly.blockRendering.OutputConnection'); -/* eslint-disable-next-line no-unused-vars */ -import {RenderedConnection} from '../../rendered_connection.js'; -/* eslint-disable-next-line no-unused-vars */ -import {ConstantProvider} from '../common/constants.js'; +import type {RenderedConnection} from '../../rendered_connection.js'; +import type {ConstantProvider} from '../common/constants.js'; import {Connection} from './connection.js'; import {Types} from './types.js'; diff --git a/core/renderers/measurables/previous_connection.ts b/core/renderers/measurables/previous_connection.ts index 5fe9d5a88f1..cdd4e4cdaea 100644 --- a/core/renderers/measurables/previous_connection.ts +++ b/core/renderers/measurables/previous_connection.ts @@ -17,10 +17,8 @@ import * as goog from '../../../closure/goog/goog.js'; goog.declareModuleId('Blockly.blockRendering.PreviousConnection'); -/* eslint-disable-next-line no-unused-vars */ -import {RenderedConnection} from '../../rendered_connection.js'; -/* eslint-disable-next-line no-unused-vars */ -import {ConstantProvider} from '../common/constants.js'; +import type {RenderedConnection} from '../../rendered_connection.js'; +import type {ConstantProvider} from '../common/constants.js'; import {Connection} from './connection.js'; import {Types} from './types.js'; diff --git a/core/renderers/measurables/round_corner.ts b/core/renderers/measurables/round_corner.ts index 1c1ff31513b..ad6b81a95e4 100644 --- a/core/renderers/measurables/round_corner.ts +++ b/core/renderers/measurables/round_corner.ts @@ -17,8 +17,7 @@ import * as goog from '../../../closure/goog/goog.js'; goog.declareModuleId('Blockly.blockRendering.RoundCorner'); -/* eslint-disable-next-line no-unused-vars */ -import {ConstantProvider} from '../common/constants.js'; +import type {ConstantProvider} from '../common/constants.js'; import {Measurable} from './base.js'; import {Types} from './types.js'; diff --git a/core/renderers/measurables/row.ts b/core/renderers/measurables/row.ts index 74a72389817..e3f69231a01 100644 --- a/core/renderers/measurables/row.ts +++ b/core/renderers/measurables/row.ts @@ -15,15 +15,11 @@ import * as goog from '../../../closure/goog/goog.js'; goog.declareModuleId('Blockly.blockRendering.Row'); -/* eslint-disable-next-line no-unused-vars */ -import {ConstantProvider} from '../common/constants.js'; - -/* eslint-disable-next-line no-unused-vars */ -import {Measurable} from './base.js'; -/* eslint-disable-next-line no-unused-vars */ -import {InRowSpacer} from './in_row_spacer.js'; -/* eslint-disable-next-line no-unused-vars */ -import {InputConnection} from './input_connection.js'; +import type {ConstantProvider} from '../common/constants.js'; + +import type {Measurable} from './base.js'; +import type {InRowSpacer} from './in_row_spacer.js'; +import type {InputConnection} from './input_connection.js'; import {Types} from './types.js'; diff --git a/core/renderers/measurables/spacer_row.ts b/core/renderers/measurables/spacer_row.ts index a84d905a623..bdf1baa4ebd 100644 --- a/core/renderers/measurables/spacer_row.ts +++ b/core/renderers/measurables/spacer_row.ts @@ -15,8 +15,7 @@ import * as goog from '../../../closure/goog/goog.js'; goog.declareModuleId('Blockly.blockRendering.SpacerRow'); -/* eslint-disable-next-line no-unused-vars */ -import {ConstantProvider} from '../common/constants.js'; +import type {ConstantProvider} from '../common/constants.js'; import {InRowSpacer} from './in_row_spacer.js'; import {Row} from './row.js'; diff --git a/core/renderers/measurables/square_corner.ts b/core/renderers/measurables/square_corner.ts index 2e2b86985d8..8f3f1cb9014 100644 --- a/core/renderers/measurables/square_corner.ts +++ b/core/renderers/measurables/square_corner.ts @@ -17,8 +17,7 @@ import * as goog from '../../../closure/goog/goog.js'; goog.declareModuleId('Blockly.blockRendering.SquareCorner'); -/* eslint-disable-next-line no-unused-vars */ -import {ConstantProvider} from '../common/constants.js'; +import type {ConstantProvider} from '../common/constants.js'; import {Measurable} from './base.js'; import {Types} from './types.js'; diff --git a/core/renderers/measurables/statement_input.ts b/core/renderers/measurables/statement_input.ts index 99bb345da58..dad53205542 100644 --- a/core/renderers/measurables/statement_input.ts +++ b/core/renderers/measurables/statement_input.ts @@ -18,9 +18,8 @@ import * as goog from '../../../closure/goog/goog.js'; goog.declareModuleId('Blockly.blockRendering.StatementInput'); /* eslint-disable-next-line no-unused-vars */ -/* eslint-disable-next-line no-unused-vars */ -import {Input} from '../../input.js'; -import {ConstantProvider} from '../common/constants.js'; +import type {Input} from '../../input.js'; +import type {ConstantProvider} from '../common/constants.js'; import {InputConnection} from './input_connection.js'; import {Types} from './types.js'; diff --git a/core/renderers/measurables/top_row.ts b/core/renderers/measurables/top_row.ts index 9a404d889e3..6c1e1978c68 100644 --- a/core/renderers/measurables/top_row.ts +++ b/core/renderers/measurables/top_row.ts @@ -15,14 +15,11 @@ import * as goog from '../../../closure/goog/goog.js'; goog.declareModuleId('Blockly.blockRendering.TopRow'); -/* eslint-disable-next-line no-unused-vars */ -import {BlockSvg} from '../../block_svg.js'; -/* eslint-disable-next-line no-unused-vars */ -import {ConstantProvider} from '../common/constants.js'; +import type {BlockSvg} from '../../block_svg.js'; +import type {ConstantProvider} from '../common/constants.js'; import {Hat} from './hat.js'; -/* eslint-disable-next-line no-unused-vars */ -import {PreviousConnection} from './previous_connection.js'; +import type {PreviousConnection} from './previous_connection.js'; import {Row} from './row.js'; import {Types} from './types.js'; diff --git a/core/renderers/measurables/types.ts b/core/renderers/measurables/types.ts index 67dfd049f8d..ca6b36422d9 100644 --- a/core/renderers/measurables/types.ts +++ b/core/renderers/measurables/types.ts @@ -15,10 +15,8 @@ import * as goog from '../../../closure/goog/goog.js'; goog.declareModuleId('Blockly.blockRendering.Types'); -/* eslint-disable-next-line no-unused-vars */ -import {Measurable} from './base.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Row} from './row.js'; +import type {Measurable} from './base.js'; +import type {Row} from './row.js'; /** diff --git a/core/renderers/minimalist/drawer.ts b/core/renderers/minimalist/drawer.ts index 230d60aa2fc..d43e1ae1dcf 100644 --- a/core/renderers/minimalist/drawer.ts +++ b/core/renderers/minimalist/drawer.ts @@ -15,12 +15,10 @@ import * as goog from '../../../closure/goog/goog.js'; goog.declareModuleId('Blockly.minimalist.Drawer'); -/* eslint-disable-next-line no-unused-vars */ -import {BlockSvg} from '../../block_svg.js'; +import type {BlockSvg} from '../../block_svg.js'; import {Drawer as BaseDrawer} from '../common/drawer.js'; -/* eslint-disable-next-line no-unused-vars */ -import {RenderInfo} from './info.js'; +import type {RenderInfo} from './info.js'; /** diff --git a/core/renderers/minimalist/info.ts b/core/renderers/minimalist/info.ts index 1256230a6f9..832255ff70a 100644 --- a/core/renderers/minimalist/info.ts +++ b/core/renderers/minimalist/info.ts @@ -15,12 +15,10 @@ import * as goog from '../../../closure/goog/goog.js'; goog.declareModuleId('Blockly.minimalist.RenderInfo'); -/* eslint-disable-next-line no-unused-vars */ -import {BlockSvg} from '../../block_svg.js'; +import type {BlockSvg} from '../../block_svg.js'; import {RenderInfo as BaseRenderInfo} from '../common/info.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Renderer} from './renderer.js'; +import type {Renderer} from './renderer.js'; /** diff --git a/core/renderers/minimalist/renderer.ts b/core/renderers/minimalist/renderer.ts index 24c956b337a..adbc20f389c 100644 --- a/core/renderers/minimalist/renderer.ts +++ b/core/renderers/minimalist/renderer.ts @@ -15,11 +15,9 @@ import * as goog from '../../../closure/goog/goog.js'; goog.declareModuleId('Blockly.minimalist.Renderer'); -/* eslint-disable-next-line no-unused-vars */ -import {BlockSvg} from '../../block_svg.js'; +import type {BlockSvg} from '../../block_svg.js'; import * as blockRendering from '../common/block_rendering.js'; -/* eslint-disable-next-line no-unused-vars */ -import {RenderInfo as BaseRenderInfo} from '../common/info.js'; +import type {RenderInfo as BaseRenderInfo} from '../common/info.js'; import {Renderer as BaseRenderer} from '../common/renderer.js'; import {ConstantProvider} from './constants.js'; diff --git a/core/renderers/thrasos/info.ts b/core/renderers/thrasos/info.ts index 7168bf613d0..0d0a0ffd475 100644 --- a/core/renderers/thrasos/info.ts +++ b/core/renderers/thrasos/info.ts @@ -17,22 +17,17 @@ import * as goog from '../../../closure/goog/goog.js'; goog.declareModuleId('Blockly.thrasos.RenderInfo'); -/* eslint-disable-next-line no-unused-vars */ -import {BlockSvg} from '../../block_svg.js'; +import type {BlockSvg} from '../../block_svg.js'; import {RenderInfo as BaseRenderInfo} from '../common/info.js'; -import {Measurable} from '../measurables/base.js'; -/* eslint-disable-next-line no-unused-vars */ -import {BottomRow} from '../measurables/bottom_row.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Field} from '../measurables/field.js'; +import type {Measurable} from '../measurables/base.js'; +import type {BottomRow} from '../measurables/bottom_row.js'; +import type {Field} from '../measurables/field.js'; import {InRowSpacer} from '../measurables/in_row_spacer.js'; -import {Row} from '../measurables/row.js'; -/* eslint-disable-next-line no-unused-vars */ -import {TopRow} from '../measurables/top_row.js'; +import type {Row} from '../measurables/row.js'; +import type {TopRow} from '../measurables/top_row.js'; import {Types} from '../measurables/types.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Renderer} from './renderer.js'; +import type {Renderer} from './renderer.js'; /** diff --git a/core/renderers/thrasos/renderer.ts b/core/renderers/thrasos/renderer.ts index 7bacb9406ae..19cf7879f68 100644 --- a/core/renderers/thrasos/renderer.ts +++ b/core/renderers/thrasos/renderer.ts @@ -15,8 +15,7 @@ import * as goog from '../../../closure/goog/goog.js'; goog.declareModuleId('Blockly.thrasos.Renderer'); -/* eslint-disable-next-line no-unused-vars */ -import {BlockSvg} from '../../block_svg.js'; +import type {BlockSvg} from '../../block_svg.js'; import * as blockRendering from '../common/block_rendering.js'; import {Renderer as BaseRenderer} from '../common/renderer.js'; diff --git a/core/renderers/zelos/constants.ts b/core/renderers/zelos/constants.ts index ffba99ea58c..fbc98ef5a94 100644 --- a/core/renderers/zelos/constants.ts +++ b/core/renderers/zelos/constants.ts @@ -18,14 +18,14 @@ import * as goog from '../../../closure/goog/goog.js'; goog.declareModuleId('Blockly.zelos.ConstantProvider'); import {ConnectionType} from '../../connection_type.js'; -import {RenderedConnection} from '../../rendered_connection.js'; -import {Theme} from '../../theme.js'; +import type {RenderedConnection} from '../../rendered_connection.js'; +import type {Theme} from '../../theme.js'; import * as utilsColour from '../../utils/colour.js'; import * as dom from '../../utils/dom.js'; import {Svg} from '../../utils/svg.js'; import * as svgPaths from '../../utils/svg_paths.js'; -/* eslint-disable-next-line no-unused-vars */ -import {ConstantProvider as BaseConstantProvider, Shape} from '../common/constants.js'; +import {ConstantProvider as BaseConstantProvider} from '../common/constants.js'; +import type {Shape} from '../common/constants.js'; /** An object containing sizing and path information about inside corners. */ diff --git a/core/renderers/zelos/drawer.ts b/core/renderers/zelos/drawer.ts index deb7f0d41ca..652c3bdebbf 100644 --- a/core/renderers/zelos/drawer.ts +++ b/core/renderers/zelos/drawer.ts @@ -15,28 +15,20 @@ import * as goog from '../../../closure/goog/goog.js'; goog.declareModuleId('Blockly.zelos.Drawer'); -/* eslint-disable-next-line no-unused-vars */ -import {BlockSvg} from '../../block_svg.js'; +import type {BlockSvg} from '../../block_svg.js'; import * as svgPaths from '../../utils/svg_paths.js'; -/* eslint-disable-next-line no-unused-vars */ -import {BaseShape, DynamicShape, Notch} from '../common/constants.js'; +import type {BaseShape, DynamicShape, Notch} from '../common/constants.js'; import * as debug from '../common/debug.js'; import {Drawer as BaseDrawer} from '../common/drawer.js'; -import {InlineInput} from '../measurables/inline_input.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Row} from '../measurables/row.js'; -/* eslint-disable-next-line no-unused-vars */ -import {SpacerRow} from '../measurables/spacer_row.js'; +import type {InlineInput} from '../measurables/inline_input.js'; +import type {Row} from '../measurables/row.js'; +import type {SpacerRow} from '../measurables/spacer_row.js'; import {Types} from '../measurables/types.js'; -/* eslint-disable-next-line no-unused-vars */ -import {InsideCorners} from './constants.js'; -/* eslint-disable-next-line no-unused-vars */ -import {RenderInfo} from './info.js'; -/* eslint-disable-next-line no-unused-vars */ -import {StatementInput} from './measurables/inputs.js'; -/* eslint-disable-next-line no-unused-vars */ -import {PathObject} from './path_object.js'; +import type {InsideCorners} from './constants.js'; +import type {RenderInfo} from './info.js'; +import type {StatementInput} from './measurables/inputs.js'; +import type {PathObject} from './path_object.js'; /** diff --git a/core/renderers/zelos/info.ts b/core/renderers/zelos/info.ts index ada9169d448..36d42964e0c 100644 --- a/core/renderers/zelos/info.ts +++ b/core/renderers/zelos/info.ts @@ -16,36 +16,28 @@ import * as goog from '../../../closure/goog/goog.js'; goog.declareModuleId('Blockly.zelos.RenderInfo'); -/* eslint-disable-next-line no-unused-vars */ -import {BlockSvg} from '../../block_svg.js'; +import type {BlockSvg} from '../../block_svg.js'; import {FieldImage} from '../../field_image.js'; import {FieldLabel} from '../../field_label.js'; import {FieldTextInput} from '../../field_textinput.js'; import {Align, Input} from '../../input.js'; import {inputTypes} from '../../input_types.js'; -/* eslint-disable-next-line no-unused-vars */ import {RenderInfo as BaseRenderInfo} from '../common/info.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Measurable} from '../measurables/base.js'; +import type {Measurable} from '../measurables/base.js'; import {Field} from '../measurables/field.js'; import {InRowSpacer} from '../measurables/in_row_spacer.js'; import {InputConnection} from '../measurables/input_connection.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Row} from '../measurables/row.js'; -/* eslint-disable-next-line no-unused-vars */ -import {SpacerRow} from '../measurables/spacer_row.js'; +import type {Row} from '../measurables/row.js'; +import type {SpacerRow} from '../measurables/spacer_row.js'; import {Types} from '../measurables/types.js'; -/* eslint-disable-next-line no-unused-vars */ -import {ConstantProvider, InsideCorners} from './constants.js'; +import type {ConstantProvider, InsideCorners} from './constants.js'; import {BottomRow} from './measurables/bottom_row.js'; import {StatementInput} from './measurables/inputs.js'; import {RightConnectionShape} from './measurables/row_elements.js'; import {TopRow} from './measurables/top_row.js'; -/* eslint-disable-next-line no-unused-vars */ -import {PathObject} from './path_object.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Renderer} from './renderer.js'; +import type {PathObject} from './path_object.js'; +import type {Renderer} from './renderer.js'; /** diff --git a/core/renderers/zelos/marker_svg.ts b/core/renderers/zelos/marker_svg.ts index 767478eb3fd..0d591b8dff1 100644 --- a/core/renderers/zelos/marker_svg.ts +++ b/core/renderers/zelos/marker_svg.ts @@ -15,24 +15,17 @@ import * as goog from '../../../closure/goog/goog.js'; goog.declareModuleId('Blockly.zelos.MarkerSvg'); -/* eslint-disable-next-line no-unused-vars */ -import {BlockSvg} from '../../block_svg.js'; -/* eslint-disable-next-line no-unused-vars */ -import {ASTNode} from '../../keyboard_nav/ast_node.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Marker} from '../../keyboard_nav/marker.js'; -/* eslint-disable-next-line no-unused-vars */ -import {RenderedConnection} from '../../rendered_connection.js'; +import type {BlockSvg} from '../../block_svg.js'; +import type {ASTNode} from '../../keyboard_nav/ast_node.js'; +import type {Marker} from '../../keyboard_nav/marker.js'; +import type {RenderedConnection} from '../../rendered_connection.js'; import * as dom from '../../utils/dom.js'; import {Svg} from '../../utils/svg.js'; -/* eslint-disable-next-line no-unused-vars */ -import {WorkspaceSvg} from '../../workspace_svg.js'; -/* eslint-disable-next-line no-unused-vars */ -import {ConstantProvider as BaseConstantProvider} from '../common/constants.js'; +import type {WorkspaceSvg} from '../../workspace_svg.js'; +import type {ConstantProvider as BaseConstantProvider} from '../common/constants.js'; import {MarkerSvg as BaseMarkerSvg} from '../common/marker_svg.js'; -/* eslint-disable-next-line no-unused-vars */ -import {ConstantProvider as ZelosConstantProvider} from './constants.js'; +import type {ConstantProvider as ZelosConstantProvider} from './constants.js'; /** diff --git a/core/renderers/zelos/measurables/bottom_row.ts b/core/renderers/zelos/measurables/bottom_row.ts index df07412810d..17f3e460fc0 100644 --- a/core/renderers/zelos/measurables/bottom_row.ts +++ b/core/renderers/zelos/measurables/bottom_row.ts @@ -15,9 +15,8 @@ import * as goog from '../../../../closure/goog/goog.js'; goog.declareModuleId('Blockly.zelos.BottomRow'); -/* eslint-disable-next-line no-unused-vars */ -import {BlockSvg} from '../../../block_svg.js'; -import {ConstantProvider} from '../../../renderers/common/constants.js'; +import type {BlockSvg} from '../../../block_svg.js'; +import type {ConstantProvider} from '../../../renderers/common/constants.js'; import {BottomRow as BaseBottomRow} from '../../../renderers/measurables/bottom_row.js'; diff --git a/core/renderers/zelos/measurables/inputs.ts b/core/renderers/zelos/measurables/inputs.ts index e0e7fcea2ae..ffe32bf2d1d 100644 --- a/core/renderers/zelos/measurables/inputs.ts +++ b/core/renderers/zelos/measurables/inputs.ts @@ -18,9 +18,8 @@ import * as goog from '../../../../closure/goog/goog.js'; goog.declareModuleId('Blockly.zelos.StatementInput'); /* eslint-disable-next-line no-unused-vars */ -/* eslint-disable-next-line no-unused-vars */ -import {Input} from '../../../input.js'; -import {ConstantProvider} from '../../../renderers/common/constants.js'; +import type {Input} from '../../../input.js'; +import type {ConstantProvider} from '../../../renderers/common/constants.js'; import {StatementInput as BaseStatementInput} from '../../../renderers/measurables/statement_input.js'; diff --git a/core/renderers/zelos/measurables/row_elements.ts b/core/renderers/zelos/measurables/row_elements.ts index 78cc4f844f9..277bb0287da 100644 --- a/core/renderers/zelos/measurables/row_elements.ts +++ b/core/renderers/zelos/measurables/row_elements.ts @@ -17,8 +17,7 @@ import * as goog from '../../../../closure/goog/goog.js'; goog.declareModuleId('Blockly.zelos.RightConnectionShape'); -/* eslint-disable-next-line no-unused-vars */ -import {ConstantProvider} from '../../../renderers/common/constants.js'; +import type {ConstantProvider} from '../../../renderers/common/constants.js'; import {Measurable} from '../../../renderers/measurables/base.js'; import {Types} from '../../../renderers/measurables/types.js'; diff --git a/core/renderers/zelos/measurables/top_row.ts b/core/renderers/zelos/measurables/top_row.ts index ad9ae9e3706..360ef885f1f 100644 --- a/core/renderers/zelos/measurables/top_row.ts +++ b/core/renderers/zelos/measurables/top_row.ts @@ -15,9 +15,8 @@ import * as goog from '../../../../closure/goog/goog.js'; goog.declareModuleId('Blockly.zelos.TopRow'); -/* eslint-disable-next-line no-unused-vars */ -import {BlockSvg} from '../../../block_svg.js'; -import {ConstantProvider} from '../../../renderers/common/constants.js'; +import type {BlockSvg} from '../../../block_svg.js'; +import type {ConstantProvider} from '../../../renderers/common/constants.js'; import {TopRow as BaseTopRow} from '../../../renderers/measurables/top_row.js'; diff --git a/core/renderers/zelos/path_object.ts b/core/renderers/zelos/path_object.ts index 1f73235beae..80800fea1e1 100644 --- a/core/renderers/zelos/path_object.ts +++ b/core/renderers/zelos/path_object.ts @@ -19,15 +19,14 @@ goog.declareModuleId('Blockly.zelos.PathObject'); // Unused import preserved for side-effects. Remove if unneeded. import '../../theme.js'; -import {BlockSvg} from '../../block_svg.js'; -import {Connection} from '../../connection.js'; -import {BlockStyle} from '../../theme.js'; +import type {BlockSvg} from '../../block_svg.js'; +import type {Connection} from '../../connection.js'; +import type {BlockStyle} from '../../theme.js'; import * as dom from '../../utils/dom.js'; import {Svg} from '../../utils/svg.js'; import {PathObject as BasePathObject} from '../common/path_object.js'; -/* eslint-disable-next-line no-unused-vars */ -import {ConstantProvider} from './constants.js'; +import type {ConstantProvider} from './constants.js'; /** diff --git a/core/renderers/zelos/renderer.ts b/core/renderers/zelos/renderer.ts index 6eff8475751..eb4e606534a 100644 --- a/core/renderers/zelos/renderer.ts +++ b/core/renderers/zelos/renderer.ts @@ -19,20 +19,16 @@ goog.declareModuleId('Blockly.zelos.Renderer'); // Unused import preserved for side-effects. Remove if unneeded. import '../../theme.js'; -/* eslint-disable-next-line no-unused-vars */ -import {BlockSvg} from '../../block_svg.js'; -import {Connection} from '../../connection.js'; +import type {BlockSvg} from '../../block_svg.js'; +import type {Connection} from '../../connection.js'; import {ConnectionType} from '../../connection_type.js'; import {InsertionMarkerManager} from '../../insertion_marker_manager.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Marker} from '../../keyboard_nav/marker.js'; -import {RenderedConnection} from '../../rendered_connection.js'; -import {BlockStyle} from '../../theme.js'; -/* eslint-disable-next-line no-unused-vars */ -import {WorkspaceSvg} from '../../workspace_svg.js'; +import type {Marker} from '../../keyboard_nav/marker.js'; +import type {RenderedConnection} from '../../rendered_connection.js'; +import type {BlockStyle} from '../../theme.js'; +import type {WorkspaceSvg} from '../../workspace_svg.js'; import * as blockRendering from '../common/block_rendering.js'; -/* eslint-disable-next-line no-unused-vars */ -import {RenderInfo as BaseRenderInfo} from '../common/info.js'; +import type {RenderInfo as BaseRenderInfo} from '../common/info.js'; import {Renderer as BaseRenderer} from '../common/renderer.js'; import {ConstantProvider} from './constants.js'; diff --git a/core/scrollbar.ts b/core/scrollbar.ts index c49688cccda..308e001edcb 100644 --- a/core/scrollbar.ts +++ b/core/scrollbar.ts @@ -19,12 +19,10 @@ import * as browserEvents from './browser_events.js'; import * as Touch from './touch.js'; import {Coordinate} from './utils/coordinate.js'; import * as dom from './utils/dom.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Metrics} from './utils/metrics.js'; +import type {Metrics} from './utils/metrics.js'; import {Svg} from './utils/svg.js'; import * as svgMath from './utils/svg_math.js'; -/* eslint-disable-next-line no-unused-vars */ -import {WorkspaceSvg} from './workspace_svg.js'; +import type {WorkspaceSvg} from './workspace_svg.js'; /** diff --git a/core/scrollbar_pair.ts b/core/scrollbar_pair.ts index 883846d3f5a..b19aed8bfea 100644 --- a/core/scrollbar_pair.ts +++ b/core/scrollbar_pair.ts @@ -18,11 +18,9 @@ goog.declareModuleId('Blockly.ScrollbarPair'); import * as eventUtils from './events/utils.js'; import {Scrollbar} from './scrollbar.js'; import * as dom from './utils/dom.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Metrics} from './utils/metrics.js'; +import type {Metrics} from './utils/metrics.js'; import {Svg} from './utils/svg.js'; -/* eslint-disable-next-line no-unused-vars */ -import {WorkspaceSvg} from './workspace_svg.js'; +import type {WorkspaceSvg} from './workspace_svg.js'; /** diff --git a/core/serialization/blocks.ts b/core/serialization/blocks.ts index 28cd57cf4cb..5f2f03f77e8 100644 --- a/core/serialization/blocks.ts +++ b/core/serialization/blocks.ts @@ -16,19 +16,14 @@ import * as goog from '../../closure/goog/goog.js'; goog.declareModuleId('Blockly.serialization.blocks'); -/* eslint-disable-next-line no-unused-vars */ -import {Block} from '../block.js'; -/* eslint-disable-next-line no-unused-vars */ -import {BlockSvg} from '../block_svg.js'; -// eslint-disable-next-line no-unused-vars -import {Connection} from '../connection.js'; +import type {Block} from '../block.js'; +import type {BlockSvg} from '../block_svg.js'; +import type {Connection} from '../connection.js'; import * as eventUtils from '../events/utils.js'; import {inputTypes} from '../input_types.js'; -// eslint-disable-next-line no-unused-vars -import {ISerializer} from '../interfaces/i_serializer.js'; +import type {ISerializer} from '../interfaces/i_serializer.js'; import {Size} from '../utils/size.js'; -// eslint-disable-next-line no-unused-vars -import {Workspace} from '../workspace.js'; +import type {Workspace} from '../workspace.js'; import * as Xml from '../xml.js'; import {BadConnectionCheck, MissingBlockType, MissingConnection, RealChildOfShadow} from './exceptions.js'; diff --git a/core/serialization/exceptions.ts b/core/serialization/exceptions.ts index cadd0372f00..928a27a6699 100644 --- a/core/serialization/exceptions.ts +++ b/core/serialization/exceptions.ts @@ -15,11 +15,8 @@ import * as goog from '../../closure/goog/goog.js'; goog.declareModuleId('Blockly.serialization.exceptions'); -/* eslint-disable-next-line no-unused-vars */ -import {Block} from '../block.js'; - -// eslint-disable-next-line no-unused-vars -import {State} from './blocks.js'; +import type {Block} from '../block.js'; +import type {State} from './blocks.js'; /** @alias Blockly.serialization.exceptions.DeserializationError */ diff --git a/core/serialization/registry.ts b/core/serialization/registry.ts index 3572f854d00..745eefe620d 100644 --- a/core/serialization/registry.ts +++ b/core/serialization/registry.ts @@ -18,7 +18,7 @@ import * as goog from '../../closure/goog/goog.js'; goog.declareModuleId('Blockly.serialization.registry'); // eslint-disable-next-line no-unused-vars -import {ISerializer} from '../interfaces/i_serializer.js'; +import type {ISerializer} from '../interfaces/i_serializer.js'; import * as registry from '../registry.js'; diff --git a/core/serialization/variables.ts b/core/serialization/variables.ts index 6b329bc21c3..d70e0bc9695 100644 --- a/core/serialization/variables.ts +++ b/core/serialization/variables.ts @@ -17,10 +17,8 @@ import * as goog from '../../closure/goog/goog.js'; goog.declareModuleId('Blockly.serialization.variables'); -// eslint-disable-next-line no-unused-vars -import {ISerializer} from '../interfaces/i_serializer.js'; -// eslint-disable-next-line no-unused-vars -import {Workspace} from '../workspace.js'; +import type {ISerializer} from '../interfaces/i_serializer.js'; +import type {Workspace} from '../workspace.js'; import * as priorities from './priorities.js'; import * as serializationRegistry from './registry.js'; diff --git a/core/serialization/workspaces.ts b/core/serialization/workspaces.ts index 9dc6b4b562f..4a34179248e 100644 --- a/core/serialization/workspaces.ts +++ b/core/serialization/workspaces.ts @@ -18,11 +18,11 @@ import * as goog from '../../closure/goog/goog.js'; goog.declareModuleId('Blockly.serialization.workspaces'); import * as eventUtils from '../events/utils.js'; -import {ISerializer} from '../interfaces/i_serializer.js'; +import type {ISerializer} from '../interfaces/i_serializer.js'; import * as registry from '../registry.js'; import * as dom from '../utils/dom.js'; // eslint-disable-next-line no-unused-vars -import {Workspace} from '../workspace.js'; +import type {Workspace} from '../workspace.js'; import {WorkspaceSvg} from '../workspace_svg.js'; diff --git a/core/shortcut_items.ts b/core/shortcut_items.ts index c0187572056..dfdeb0f1c35 100644 --- a/core/shortcut_items.ts +++ b/core/shortcut_items.ts @@ -19,11 +19,10 @@ import {BlockSvg} from './block_svg.js'; import * as clipboard from './clipboard.js'; import * as common from './common.js'; import {Gesture} from './gesture.js'; -/* eslint-disable-next-line no-unused-vars */ -import {ICopyable} from './interfaces/i_copyable.js'; +import type {ICopyable} from './interfaces/i_copyable.js'; import {KeyboardShortcut, ShortcutRegistry} from './shortcut_registry.js'; import {KeyCodes} from './utils/keycodes.js'; -import {WorkspaceSvg} from './workspace_svg.js'; +import type {WorkspaceSvg} from './workspace_svg.js'; /** diff --git a/core/shortcut_registry.ts b/core/shortcut_registry.ts index 5091f6c721c..c1be1962c16 100644 --- a/core/shortcut_registry.ts +++ b/core/shortcut_registry.ts @@ -19,8 +19,7 @@ goog.declareModuleId('Blockly.ShortcutRegistry'); import {KeyCodes} from './utils/keycodes.js'; import * as object from './utils/object.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Workspace} from './workspace.js'; +import type {Workspace} from './workspace.js'; /** diff --git a/core/theme_manager.ts b/core/theme_manager.ts index 2d3aa8caac0..3ef40f5b539 100644 --- a/core/theme_manager.ts +++ b/core/theme_manager.ts @@ -17,14 +17,11 @@ import * as goog from '../closure/goog/goog.js'; goog.declareModuleId('Blockly.ThemeManager'); -/* eslint-disable-next-line no-unused-vars */ -import {Theme} from './theme.js'; +import type {Theme} from './theme.js'; import * as arrayUtils from './utils/array.js'; import * as dom from './utils/dom.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Workspace} from './workspace.js'; -/* eslint-disable-next-line no-unused-vars */ -import {WorkspaceSvg} from './workspace_svg.js'; +import type {Workspace} from './workspace.js'; +import type {WorkspaceSvg} from './workspace_svg.js'; /** diff --git a/core/toolbox/category.ts b/core/toolbox/category.ts index df326d0df09..6c2818ea6ff 100644 --- a/core/toolbox/category.ts +++ b/core/toolbox/category.ts @@ -16,13 +16,10 @@ import * as goog from '../../closure/goog/goog.js'; goog.declareModuleId('Blockly.ToolboxCategory'); import * as Css from '../css.js'; -/* eslint-disable-next-line no-unused-vars */ -import {ICollapsibleToolboxItem} from '../interfaces/i_collapsible_toolbox_item.js'; -/* eslint-disable-next-line no-unused-vars */ -import {ISelectableToolboxItem} from '../interfaces/i_selectable_toolbox_item.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IToolbox} from '../interfaces/i_toolbox.js'; -import {IToolboxItem} from '../interfaces/i_toolbox_item.js'; +import type {ICollapsibleToolboxItem} from '../interfaces/i_collapsible_toolbox_item.js'; +import type {ISelectableToolboxItem} from '../interfaces/i_selectable_toolbox_item.js'; +import type {IToolbox} from '../interfaces/i_toolbox.js'; +import type {IToolboxItem} from '../interfaces/i_toolbox_item.js'; import * as registry from '../registry.js'; import * as aria from '../utils/aria.js'; import * as colourUtils from '../utils/colour.js'; diff --git a/core/toolbox/collapsible_category.ts b/core/toolbox/collapsible_category.ts index 62d46f87a0e..bf5886adbde 100644 --- a/core/toolbox/collapsible_category.ts +++ b/core/toolbox/collapsible_category.ts @@ -15,12 +15,9 @@ import * as goog from '../../closure/goog/goog.js'; goog.declareModuleId('Blockly.CollapsibleToolboxCategory'); -/* eslint-disable-next-line no-unused-vars */ -import {ICollapsibleToolboxItem} from '../interfaces/i_collapsible_toolbox_item.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IToolbox} from '../interfaces/i_toolbox.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IToolboxItem} from '../interfaces/i_toolbox_item.js'; +import type {ICollapsibleToolboxItem} from '../interfaces/i_collapsible_toolbox_item.js'; +import type {IToolbox} from '../interfaces/i_toolbox.js'; +import type {IToolboxItem} from '../interfaces/i_toolbox_item.js'; import * as registry from '../registry.js'; import * as aria from '../utils/aria.js'; import * as dom from '../utils/dom.js'; diff --git a/core/toolbox/separator.ts b/core/toolbox/separator.ts index 43b2a1fb5fc..1083a433c9a 100644 --- a/core/toolbox/separator.ts +++ b/core/toolbox/separator.ts @@ -16,12 +16,10 @@ import * as goog from '../../closure/goog/goog.js'; goog.declareModuleId('Blockly.ToolboxSeparator'); import * as Css from '../css.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IToolbox} from '../interfaces/i_toolbox.js'; +import type {IToolbox} from '../interfaces/i_toolbox.js'; import * as registry from '../registry.js'; import * as dom from '../utils/dom.js'; -/* eslint-disable-next-line no-unused-vars */ -import * as toolbox from '../utils/toolbox.js'; +import type * as toolbox from '../utils/toolbox.js'; import {ToolboxItem} from './toolbox_item.js'; diff --git a/core/toolbox/toolbox.ts b/core/toolbox/toolbox.ts index c6d4d60ae4d..be8d16f41eb 100644 --- a/core/toolbox/toolbox.ts +++ b/core/toolbox/toolbox.ts @@ -22,46 +22,34 @@ import '../shortcut_registry.js'; import '../events/events_toolbox_item_select.js'; import {BlockSvg} from '../block_svg.js'; -/* eslint-disable-next-line no-unused-vars */ -import {BlocklyOptions} from '../blockly_options.js'; +import type {BlocklyOptions} from '../blockly_options.js'; import * as browserEvents from '../browser_events.js'; import * as common from '../common.js'; import {ComponentManager} from '../component_manager.js'; import * as Css from '../css.js'; import {DeleteArea} from '../delete_area.js'; import * as eventUtils from '../events/utils.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IAutoHideable} from '../interfaces/i_autohideable.js'; -/* eslint-disable-next-line no-unused-vars */ -import {ICollapsibleToolboxItem} from '../interfaces/i_collapsible_toolbox_item.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IDraggable} from '../interfaces/i_draggable.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IFlyout} from '../interfaces/i_flyout.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IKeyboardAccessible} from '../interfaces/i_keyboard_accessible.js'; -/* eslint-disable-next-line no-unused-vars */ -import {ISelectableToolboxItem} from '../interfaces/i_selectable_toolbox_item.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IStyleable} from '../interfaces/i_styleable.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IToolbox} from '../interfaces/i_toolbox.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IToolboxItem} from '../interfaces/i_toolbox_item.js'; +import type {IAutoHideable} from '../interfaces/i_autohideable.js'; +import type {ICollapsibleToolboxItem} from '../interfaces/i_collapsible_toolbox_item.js'; +import type {IDraggable} from '../interfaces/i_draggable.js'; +import type {IFlyout} from '../interfaces/i_flyout.js'; +import type {IKeyboardAccessible} from '../interfaces/i_keyboard_accessible.js'; +import type {ISelectableToolboxItem} from '../interfaces/i_selectable_toolbox_item.js'; +import type {IStyleable} from '../interfaces/i_styleable.js'; +import type {IToolbox} from '../interfaces/i_toolbox.js'; +import type {IToolboxItem} from '../interfaces/i_toolbox_item.js'; import {Options} from '../options.js'; import * as registry from '../registry.js'; -import {KeyboardShortcut} from '../shortcut_registry.js'; +import type {KeyboardShortcut} from '../shortcut_registry.js'; import * as Touch from '../touch.js'; import * as aria from '../utils/aria.js'; import * as dom from '../utils/dom.js'; import {KeyCodes} from '../utils/keycodes.js'; import {Rect} from '../utils/rect.js'; import * as toolbox from '../utils/toolbox.js'; -/* eslint-disable-next-line no-unused-vars */ -import {WorkspaceSvg} from '../workspace_svg.js'; +import type {WorkspaceSvg} from '../workspace_svg.js'; -/* eslint-disable-next-line no-unused-vars */ -import {ToolboxCategory} from './category.js'; +import type {ToolboxCategory} from './category.js'; import {CollapsibleToolboxCategory} from './collapsible_category.js'; diff --git a/core/toolbox/toolbox_item.ts b/core/toolbox/toolbox_item.ts index f06cb79ac9b..8601bc6907c 100644 --- a/core/toolbox/toolbox_item.ts +++ b/core/toolbox/toolbox_item.ts @@ -15,17 +15,12 @@ import * as goog from '../../closure/goog/goog.js'; goog.declareModuleId('Blockly.ToolboxItem'); -/* eslint-disable-next-line no-unused-vars */ -import {ICollapsibleToolboxItem} from '../interfaces/i_collapsible_toolbox_item.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IToolbox} from '../interfaces/i_toolbox.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IToolboxItem} from '../interfaces/i_toolbox_item.js'; +import type {ICollapsibleToolboxItem} from '../interfaces/i_collapsible_toolbox_item.js'; +import type {IToolbox} from '../interfaces/i_toolbox.js'; +import type {IToolboxItem} from '../interfaces/i_toolbox_item.js'; import * as idGenerator from '../utils/idgenerator.js'; -/* eslint-disable-next-line no-unused-vars */ -import * as toolbox from '../utils/toolbox.js'; -/* eslint-disable-next-line no-unused-vars */ -import {WorkspaceSvg} from '../workspace_svg.js'; +import type * as toolbox from '../utils/toolbox.js'; +import type {WorkspaceSvg} from '../workspace_svg.js'; /** diff --git a/core/touch.ts b/core/touch.ts index 2211a6903f1..99ae53cde8a 100644 --- a/core/touch.ts +++ b/core/touch.ts @@ -15,8 +15,7 @@ import * as goog from '../closure/goog/goog.js'; goog.declareModuleId('Blockly.Touch'); -/* eslint-disable-next-line no-unused-vars */ -import {Gesture} from './gesture.js'; +import type {Gesture} from './gesture.js'; /** diff --git a/core/touch_gesture.ts b/core/touch_gesture.ts index fa038e11f37..cb7e502b60b 100644 --- a/core/touch_gesture.ts +++ b/core/touch_gesture.ts @@ -21,8 +21,7 @@ import * as browserEvents from './browser_events.js'; import {Gesture} from './gesture.js'; import * as Touch from './touch.js'; import {Coordinate} from './utils/coordinate.js'; -/* eslint-disable-next-line no-unused-vars */ -import {WorkspaceSvg} from './workspace_svg.js'; +import type {WorkspaceSvg} from './workspace_svg.js'; /* diff --git a/core/trashcan.ts b/core/trashcan.ts index 72678214691..f12c727433a 100644 --- a/core/trashcan.ts +++ b/core/trashcan.ts @@ -21,38 +21,29 @@ import './metrics_manager.js'; // Unused import preserved for side-effects. Remove if unneeded. import './events/events_trashcan_open.js'; -/* eslint-disable-next-line no-unused-vars */ -import {BlocklyOptions} from './blockly_options.js'; +import type {BlocklyOptions} from './blockly_options.js'; import * as browserEvents from './browser_events.js'; import {ComponentManager} from './component_manager.js'; import {DeleteArea} from './delete_area.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Abstract} from './events/events_abstract.js'; -/* eslint-disable-next-line no-unused-vars */ -import {BlockDelete} from './events/events_block_delete.js'; +import type {Abstract} from './events/events_abstract.js'; +import type {BlockDelete} from './events/events_block_delete.js'; import * as eventUtils from './events/utils.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IAutoHideable} from './interfaces/i_autohideable.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IDraggable} from './interfaces/i_draggable.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IFlyout} from './interfaces/i_flyout.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IPositionable} from './interfaces/i_positionable.js'; -import {UiMetrics} from './metrics_manager.js'; +import type {IAutoHideable} from './interfaces/i_autohideable.js'; +import type {IDraggable} from './interfaces/i_draggable.js'; +import type {IFlyout} from './interfaces/i_flyout.js'; +import type {IPositionable} from './interfaces/i_positionable.js'; +import type {UiMetrics} from './metrics_manager.js'; import {Options} from './options.js'; import * as uiPosition from './positionable_helpers.js'; import * as registry from './registry.js'; -/* eslint-disable-next-line no-unused-vars */ -import * as blocks from './serialization/blocks.js'; +import type * as blocks from './serialization/blocks.js'; import {SPRITE} from './sprites.js'; import * as dom from './utils/dom.js'; import {Rect} from './utils/rect.js'; import {Size} from './utils/size.js'; import {Svg} from './utils/svg.js'; import * as toolbox from './utils/toolbox.js'; -/* eslint-disable-next-line no-unused-vars */ -import {WorkspaceSvg} from './workspace_svg.js'; +import type {WorkspaceSvg} from './workspace_svg.js'; /** diff --git a/core/utils.ts b/core/utils.ts index ee9c971784d..a7768b78416 100644 --- a/core/utils.ts +++ b/core/utils.ts @@ -15,8 +15,7 @@ import * as goog from '../closure/goog/goog.js'; goog.declareModuleId('Blockly.utils'); -/* eslint-disable-next-line no-unused-vars */ -import {Block} from './block.js'; +import type {Block} from './block.js'; import * as browserEvents from './browser_events.js'; import * as common from './common.js'; import * as extensions from './extensions.js'; @@ -29,7 +28,7 @@ import * as dom from './utils/dom.js'; import * as idGenerator from './utils/idgenerator.js'; import {KeyCodes} from './utils/keycodes.js'; import * as math from './utils/math.js'; -import {Metrics} from './utils/metrics.js'; +import type {Metrics} from './utils/metrics.js'; import * as object from './utils/object.js'; import * as parsing from './utils/parsing.js'; import {Rect} from './utils/rect.js'; @@ -42,8 +41,7 @@ import * as svgPaths from './utils/svg_paths.js'; import * as toolbox from './utils/toolbox.js'; import * as userAgent from './utils/useragent.js'; import * as xml from './utils/xml.js'; -/* eslint-disable-next-line no-unused-vars */ -import {WorkspaceSvg} from './workspace_svg.js'; +import type {WorkspaceSvg} from './workspace_svg.js'; export { diff --git a/core/utils/dom.ts b/core/utils/dom.ts index 4acd6a80046..52dde1e5cc8 100644 --- a/core/utils/dom.ts +++ b/core/utils/dom.ts @@ -19,8 +19,7 @@ import * as goog from '../../closure/goog/goog.js'; goog.declareModuleId('Blockly.utils.dom'); -/* eslint-disable-next-line no-unused-vars */ -import {Svg} from './svg.js'; +import type {Svg} from './svg.js'; import * as userAgent from './useragent.js'; diff --git a/core/utils/svg_math.ts b/core/utils/svg_math.ts index 960d481465d..686766c6c20 100644 --- a/core/utils/svg_math.ts +++ b/core/utils/svg_math.ts @@ -15,8 +15,7 @@ import * as goog from '../../closure/goog/goog.js'; goog.declareModuleId('Blockly.utils.svgMath'); -/* eslint-disable-next-line no-unused-vars */ -import {WorkspaceSvg} from '../workspace_svg.js'; +import type {WorkspaceSvg} from '../workspace_svg.js'; import {Coordinate} from './coordinate.js'; import * as deprecation from './deprecation.js'; diff --git a/core/utils/toolbox.ts b/core/utils/toolbox.ts index 1f74a326538..77c583159ea 100644 --- a/core/utils/toolbox.ts +++ b/core/utils/toolbox.ts @@ -22,10 +22,9 @@ import '../toolbox/category.js'; // Unused import preserved for side-effects. Remove if unneeded. import '../toolbox/separator.js'; -/* eslint-disable-next-line no-unused-vars */ -import {ConnectionState} from '../serialization/blocks.js'; -import {CssConfig as CategoryCssConfig} from '../toolbox/category.js'; -import {CssConfig as SeparatorCssConfig} from '../toolbox/separator.js'; +import type {ConnectionState} from '../serialization/blocks.js'; +import type {CssConfig as CategoryCssConfig} from '../toolbox/category.js'; +import type {CssConfig as SeparatorCssConfig} from '../toolbox/separator.js'; import * as Xml from '../xml.js'; import * as userAgent from './useragent.js'; diff --git a/core/variable_map.ts b/core/variable_map.ts index 14d86bc6ba0..5c7bec694c6 100644 --- a/core/variable_map.ts +++ b/core/variable_map.ts @@ -20,8 +20,7 @@ import './events/events_var_delete.js'; // Unused import preserved for side-effects. Remove if unneeded. import './events/events_var_rename.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Block} from './block.js'; +import type {Block} from './block.js'; import * as dialog from './dialog.js'; import * as eventUtils from './events/utils.js'; import {Msg} from './msg.js'; @@ -29,8 +28,7 @@ import {Names} from './names.js'; import * as arrayUtils from './utils/array.js'; import * as idGenerator from './utils/idgenerator.js'; import {VariableModel} from './variable_model.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Workspace} from './workspace.js'; +import type {Workspace} from './workspace.js'; /** diff --git a/core/variable_model.ts b/core/variable_model.ts index f771cb0d596..ef65603fbf7 100644 --- a/core/variable_model.ts +++ b/core/variable_model.ts @@ -20,8 +20,7 @@ import './events/events_var_create.js'; import * as eventUtils from './events/utils.js'; import * as idGenerator from './utils/idgenerator.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Workspace} from './workspace.js'; +import type {Workspace} from './workspace.js'; /** diff --git a/core/variables.ts b/core/variables.ts index 07a6756cfb0..f3571530562 100644 --- a/core/variables.ts +++ b/core/variables.ts @@ -20,10 +20,8 @@ import * as dialog from './dialog.js'; import {Msg} from './msg.js'; import * as utilsXml from './utils/xml.js'; import {VariableModel} from './variable_model.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Workspace} from './workspace.js'; -/* eslint-disable-next-line no-unused-vars */ -import {WorkspaceSvg} from './workspace_svg.js'; +import type {Workspace} from './workspace.js'; +import type {WorkspaceSvg} from './workspace_svg.js'; import * as Xml from './xml.js'; diff --git a/core/variables_dynamic.ts b/core/variables_dynamic.ts index 86fa7cd4428..3ae038cb937 100644 --- a/core/variables_dynamic.ts +++ b/core/variables_dynamic.ts @@ -21,10 +21,8 @@ import {Msg} from './msg.js'; import * as xml from './utils/xml.js'; import {VariableModel} from './variable_model.js'; import * as Variables from './variables.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Workspace} from './workspace.js'; -/* eslint-disable-next-line no-unused-vars */ -import {WorkspaceSvg} from './workspace_svg.js'; +import type {Workspace} from './workspace.js'; +import type {WorkspaceSvg} from './workspace_svg.js'; /** diff --git a/core/warning.ts b/core/warning.ts index 19be4669269..49b9248cbc1 100644 --- a/core/warning.ts +++ b/core/warning.ts @@ -18,13 +18,11 @@ goog.declareModuleId('Blockly.Warning'); // Unused import preserved for side-effects. Remove if unneeded. import './events/events_bubble_open.js'; -/* eslint-disable-next-line no-unused-vars */ -import {BlockSvg} from './block_svg.js'; +import type {BlockSvg} from './block_svg.js'; import {Bubble} from './bubble.js'; import * as eventUtils from './events/utils.js'; import {Icon} from './icon.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Coordinate} from './utils/coordinate.js'; +import type {Coordinate} from './utils/coordinate.js'; import * as dom from './utils/dom.js'; import {Svg} from './utils/svg.js'; diff --git a/core/widgetdiv.ts b/core/widgetdiv.ts index 56721a31e67..36a3bc485ac 100644 --- a/core/widgetdiv.ts +++ b/core/widgetdiv.ts @@ -21,12 +21,9 @@ goog.declareModuleId('Blockly.WidgetDiv'); import * as common from './common.js'; import * as dom from './utils/dom.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Rect} from './utils/rect.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Size} from './utils/size.js'; -/* eslint-disable-next-line no-unused-vars */ -import {WorkspaceSvg} from './workspace_svg.js'; +import type {Rect} from './utils/rect.js'; +import type {Size} from './utils/size.js'; +import type {WorkspaceSvg} from './workspace_svg.js'; /** The object currently using this container. */ diff --git a/core/workspace.ts b/core/workspace.ts index b557ec1d00c..8ac2af06357 100644 --- a/core/workspace.ts +++ b/core/workspace.ts @@ -18,31 +18,22 @@ goog.declareModuleId('Blockly.Workspace'); // Unused import preserved for side-effects. Remove if unneeded. import './connection_checker.js'; -/* eslint-disable-next-line no-unused-vars */ import {Block} from './block.js'; -/* eslint-disable-next-line no-unused-vars */ -import {BlocklyOptions} from './blockly_options.js'; -/* eslint-disable-next-line no-unused-vars */ -import {ConnectionDB} from './connection_db.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Abstract} from './events/events_abstract.js'; +import type {BlocklyOptions} from './blockly_options.js'; +import type {ConnectionDB} from './connection_db.js'; +import type {Abstract} from './events/events_abstract.js'; import * as eventUtils from './events/utils.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IASTNodeLocation} from './interfaces/i_ast_node_location.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IConnectionChecker} from './interfaces/i_connection_checker.js'; +import type {IASTNodeLocation} from './interfaces/i_ast_node_location.js'; +import type {IConnectionChecker} from './interfaces/i_connection_checker.js'; import {Options} from './options.js'; import * as registry from './registry.js'; import * as arrayUtils from './utils/array.js'; import * as idGenerator from './utils/idgenerator.js'; import * as math from './utils/math.js'; -/* eslint-disable-next-line no-unused-vars */ -import * as toolbox from './utils/toolbox.js'; +import type * as toolbox from './utils/toolbox.js'; import {VariableMap} from './variable_map.js'; -/* eslint-disable-next-line no-unused-vars */ -import {VariableModel} from './variable_model.js'; -/* eslint-disable-next-line no-unused-vars */ -import {WorkspaceComment} from './workspace_comment.js'; +import type {VariableModel} from './variable_model.js'; +import type {WorkspaceComment} from './workspace_comment.js'; /** Database of all workspaces. */ diff --git a/core/workspace_audio.ts b/core/workspace_audio.ts index a2b88a1b68e..8c9147b86b4 100644 --- a/core/workspace_audio.ts +++ b/core/workspace_audio.ts @@ -18,8 +18,7 @@ import * as goog from '../closure/goog/goog.js'; goog.declareModuleId('Blockly.WorkspaceAudio'); import * as userAgent from './utils/useragent.js'; -/* eslint-disable-next-line no-unused-vars */ -import {WorkspaceSvg} from './workspace_svg.js'; +import type {WorkspaceSvg} from './workspace_svg.js'; /** diff --git a/core/workspace_comment.ts b/core/workspace_comment.ts index a14e6d64c4c..ce6d8d76f7c 100644 --- a/core/workspace_comment.ts +++ b/core/workspace_comment.ts @@ -22,14 +22,12 @@ import './events/events_comment_create.js'; // Unused import preserved for side-effects. Remove if unneeded. import './events/events_comment_delete.js'; -/* eslint-disable-next-line no-unused-vars */ -import {CommentMove} from './events/events_comment_move.js'; +import type {CommentMove} from './events/events_comment_move.js'; import * as eventUtils from './events/utils.js'; import {Coordinate} from './utils/coordinate.js'; import * as idGenerator from './utils/idgenerator.js'; import * as xml from './utils/xml.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Workspace} from './workspace.js'; +import type {Workspace} from './workspace.js'; /** diff --git a/core/workspace_comment_svg.ts b/core/workspace_comment_svg.ts index 952e9fe2b31..a0257a5c7a3 100644 --- a/core/workspace_comment_svg.ts +++ b/core/workspace_comment_svg.ts @@ -22,20 +22,16 @@ import './events/events_comment_delete.js'; // Unused import preserved for side-effects. Remove if unneeded. import './events/events_selected.js'; -/* eslint-disable-next-line no-unused-vars */ -import {BlockDragSurfaceSvg} from './block_drag_surface.js'; +import type {BlockDragSurfaceSvg} from './block_drag_surface.js'; import * as browserEvents from './browser_events.js'; import * as common from './common.js'; import * as ContextMenu from './contextmenu.js'; import * as Css from './css.js'; -/* eslint-disable-next-line no-unused-vars */ -import {CommentMove} from './events/events_comment_move.js'; +import type {CommentMove} from './events/events_comment_move.js'; import * as eventUtils from './events/utils.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IBoundedElement} from './interfaces/i_bounded_element.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IBubble} from './interfaces/i_bubble.js'; -import {CopyData, ICopyable} from './interfaces/i_copyable.js'; +import type {IBoundedElement} from './interfaces/i_bounded_element.js'; +import type {IBubble} from './interfaces/i_bubble.js'; +import type {CopyData, ICopyable} from './interfaces/i_copyable.js'; import * as Touch from './touch.js'; import {Coordinate} from './utils/coordinate.js'; import * as dom from './utils/dom.js'; @@ -43,8 +39,7 @@ import {Rect} from './utils/rect.js'; import {Svg} from './utils/svg.js'; import * as svgMath from './utils/svg_math.js'; import {WorkspaceComment} from './workspace_comment.js'; -/* eslint-disable-next-line no-unused-vars */ -import {WorkspaceSvg} from './workspace_svg.js'; +import type {WorkspaceSvg} from './workspace_svg.js'; /** Size of the resize icon. */ diff --git a/core/workspace_drag_surface_svg.ts b/core/workspace_drag_surface_svg.ts index 1087298fc65..3873c4c95bc 100644 --- a/core/workspace_drag_surface_svg.ts +++ b/core/workspace_drag_surface_svg.ts @@ -21,8 +21,7 @@ import * as goog from '../closure/goog/goog.js'; goog.declareModuleId('Blockly.WorkspaceDragSurfaceSvg'); -/* eslint-disable-next-line no-unused-vars */ -import {Coordinate} from './utils/coordinate.js'; +import type {Coordinate} from './utils/coordinate.js'; import * as dom from './utils/dom.js'; import {Svg} from './utils/svg.js'; import * as svgMath from './utils/svg_math.js'; diff --git a/core/workspace_dragger.ts b/core/workspace_dragger.ts index abdfbb6f672..72ea43e37b4 100644 --- a/core/workspace_dragger.ts +++ b/core/workspace_dragger.ts @@ -17,8 +17,7 @@ goog.declareModuleId('Blockly.WorkspaceDragger'); import * as common from './common.js'; import {Coordinate} from './utils/coordinate.js'; -/* eslint-disable-next-line no-unused-vars */ -import {WorkspaceSvg} from './workspace_svg.js'; +import type {WorkspaceSvg} from './workspace_svg.js'; /** diff --git a/core/workspace_svg.ts b/core/workspace_svg.ts index bacb1721020..2ef9185f8a4 100644 --- a/core/workspace_svg.ts +++ b/core/workspace_svg.ts @@ -41,13 +41,10 @@ import './metrics_manager.js'; // Unused import preserved for side-effects. Remove if unneeded. import './msg.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Block} from './block.js'; -/* eslint-disable-next-line no-unused-vars */ -import {BlockDragSurfaceSvg} from './block_drag_surface.js'; +import type {Block} from './block.js'; +import type {BlockDragSurfaceSvg} from './block_drag_surface.js'; import {BlockSvg} from './block_svg.js'; -/* eslint-disable-next-line no-unused-vars */ -import {BlocklyOptions} from './blockly_options.js'; +import type {BlocklyOptions} from './blockly_options.js'; import * as browserEvents from './browser_events.js'; import * as common from './common.js'; import {ComponentManager} from './component_manager.js'; @@ -57,71 +54,52 @@ import * as ContextMenu from './contextmenu.js'; import {ContextMenuRegistry} from './contextmenu_registry.js'; import * as dropDownDiv from './dropdowndiv.js'; import * as eventUtils from './events/utils.js'; -/* eslint-disable-next-line no-unused-vars */ -import {FlyoutButton} from './flyout_button.js'; +import type {FlyoutButton} from './flyout_button.js'; import {Gesture} from './gesture.js'; import {Grid} from './grid.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IASTNodeLocationSvg} from './interfaces/i_ast_node_location_svg.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IBoundedElement} from './interfaces/i_bounded_element.js'; -/* eslint-disable-next-line no-unused-vars */ -import {ICopyable} from './interfaces/i_copyable.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IDragTarget} from './interfaces/i_drag_target.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IFlyout} from './interfaces/i_flyout.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IMetricsManager} from './interfaces/i_metrics_manager.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IToolbox} from './interfaces/i_toolbox.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Cursor} from './keyboard_nav/cursor.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Marker} from './keyboard_nav/marker.js'; +import type {IASTNodeLocationSvg} from './interfaces/i_ast_node_location_svg.js'; +import type {IBoundedElement} from './interfaces/i_bounded_element.js'; +import type {ICopyable} from './interfaces/i_copyable.js'; +import type {IDragTarget} from './interfaces/i_drag_target.js'; +import type {IFlyout} from './interfaces/i_flyout.js'; +import type {IMetricsManager} from './interfaces/i_metrics_manager.js'; +import type {IToolbox} from './interfaces/i_toolbox.js'; +import type {Cursor} from './keyboard_nav/cursor.js'; +import type {Marker} from './keyboard_nav/marker.js'; import {MarkerManager} from './marker_manager.js'; import {Options} from './options.js'; import * as Procedures from './procedures.js'; import * as registry from './registry.js'; import * as blockRendering from './renderers/common/block_rendering.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Renderer} from './renderers/common/renderer.js'; -/* eslint-disable-next-line no-unused-vars */ -import {ScrollbarPair} from './scrollbar_pair.js'; +import type {Renderer} from './renderers/common/renderer.js'; +import type {ScrollbarPair} from './scrollbar_pair.js'; import * as blocks from './serialization/blocks.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Theme} from './theme.js'; +import type {Theme} from './theme.js'; import {Classic} from './theme/classic.js'; import {ThemeManager} from './theme_manager.js'; import * as Tooltip from './tooltip.js'; import {TouchGesture} from './touch_gesture.js'; -/* eslint-disable-next-line no-unused-vars */ import {Trashcan} from './trashcan.js'; import * as utils from './utils.js'; import * as arrayUtils from './utils/array.js'; import {Coordinate} from './utils/coordinate.js'; import * as dom from './utils/dom.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Metrics} from './utils/metrics.js'; +import type {Metrics} from './utils/metrics.js'; import {Rect} from './utils/rect.js'; import {Size} from './utils/size.js'; import {Svg} from './utils/svg.js'; import * as svgMath from './utils/svg_math.js'; import * as toolbox from './utils/toolbox.js'; import * as userAgent from './utils/useragent.js'; -/* eslint-disable-next-line no-unused-vars */ -import {VariableModel} from './variable_model.js'; +import type {VariableModel} from './variable_model.js'; import * as Variables from './variables.js'; import * as VariablesDynamic from './variables_dynamic.js'; import * as WidgetDiv from './widgetdiv.js'; import {Workspace} from './workspace.js'; import {WorkspaceAudio} from './workspace_audio.js'; -/* eslint-disable-next-line no-unused-vars */ import {WorkspaceComment} from './workspace_comment.js'; -/* eslint-disable-next-line no-unused-vars */ import {WorkspaceCommentSvg} from './workspace_comment_svg.js'; -/* eslint-disable-next-line no-unused-vars */ -import {WorkspaceDragSurfaceSvg} from './workspace_drag_surface_svg.js'; +import type {WorkspaceDragSurfaceSvg} from './workspace_drag_surface_svg.js'; import * as Xml from './xml.js'; import {ZoomControls} from './zoom_controls.js'; diff --git a/core/xml.ts b/core/xml.ts index f4ca898695b..f37a87f60ad 100644 --- a/core/xml.ts +++ b/core/xml.ts @@ -24,28 +24,21 @@ import './workspace_comment.js'; // Unused import preserved for side-effects. Remove if unneeded. import './workspace_comment_svg.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Block} from './block.js'; -/* eslint-disable-next-line no-unused-vars */ -import {BlockSvg} from './block_svg.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Connection} from './connection.js'; +import type {Block} from './block.js'; +import type {BlockSvg} from './block_svg.js'; +import type {Connection} from './connection.js'; import * as eventUtils from './events/utils.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Field} from './field.js'; +import type {Field} from './field.js'; import {inputTypes} from './input_types.js'; import * as dom from './utils/dom.js'; import {Size} from './utils/size.js'; import * as utilsXml from './utils/xml.js'; -/* eslint-disable-next-line no-unused-vars */ -import {VariableModel} from './variable_model.js'; +import type {VariableModel} from './variable_model.js'; import * as Variables from './variables.js'; -/* eslint-disable-next-line no-unused-vars */ -import {Workspace} from './workspace.js'; +import type {Workspace} from './workspace.js'; import {WorkspaceComment} from './workspace_comment.js'; import {WorkspaceCommentSvg} from './workspace_comment_svg.js'; -/* eslint-disable-next-line no-unused-vars */ -import {WorkspaceSvg} from './workspace_svg.js'; +import type {WorkspaceSvg} from './workspace_svg.js'; /** diff --git a/core/zoom_controls.ts b/core/zoom_controls.ts index bb5215020b8..a3af6c75651 100644 --- a/core/zoom_controls.ts +++ b/core/zoom_controls.ts @@ -25,9 +25,8 @@ import * as browserEvents from './browser_events.js'; import {ComponentManager} from './component_manager.js'; import * as Css from './css.js'; import * as eventUtils from './events/utils.js'; -/* eslint-disable-next-line no-unused-vars */ -import {IPositionable} from './interfaces/i_positionable.js'; -import {UiMetrics} from './metrics_manager.js'; +import type {IPositionable} from './interfaces/i_positionable.js'; +import type {UiMetrics} from './metrics_manager.js'; import * as uiPosition from './positionable_helpers.js'; import {SPRITE} from './sprites.js'; import * as Touch from './touch.js'; @@ -35,8 +34,7 @@ import * as dom from './utils/dom.js'; import {Rect} from './utils/rect.js'; import {Size} from './utils/size.js'; import {Svg} from './utils/svg.js'; -/* eslint-disable-next-line no-unused-vars */ -import {WorkspaceSvg} from './workspace_svg.js'; +import type {WorkspaceSvg} from './workspace_svg.js'; /** diff --git a/tsconfig.json b/tsconfig.json index f167444b358..f8780939c23 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -20,5 +20,10 @@ "moduleResolution": "node", "target": "ES2020", "strict": true, + + // This does not understand enums only used to define other enums, so we + // cannot leave it enabled. + // See: https://github.com/microsoft/TypeScript/issues/49974 + // "importsNotUsedAsValues": "error" } }