chore: Fix whitespace (#6243)

* fix: Remove spurious blank lines

  Remove extraneous blank lines introduced by deletion of
  'use strict'; pragmas.

  Also fix the location of the goog.declareModuleId call in
  core/utils/array.ts.

* fix: Add missing double-blank-line before body of modules

  Our convention is to have two blank lines between the imports (or
  module ID, if there are no imports) and the beginning of the body
  of the module.  Enforce this.

* fix: one addition format error for PR #6243
This commit is contained in:
Christopher Allen
2022-06-24 19:33:39 +01:00
committed by GitHub
parent d63670662b
commit b0475b0c68
258 changed files with 30 additions and 290 deletions
-2
View File
@@ -8,7 +8,6 @@
* @fileoverview The class representing one block.
*/
/**
* The class representing one block.
* @class
@@ -708,7 +707,6 @@ export class Block implements IASTNodeLocation, IDeletable {
' superior block.');
}
// This block hasn't actually moved on-screen, so there's no need to
// update
// its connection locations.
+1 -1
View File
@@ -8,7 +8,6 @@
* @fileoverview Methods animating a block on connection and disconnection.
*/
/**
* Methods animating a block on connection and disconnection.
* @namespace Blockly.blockAnimations
@@ -21,6 +20,7 @@ import {BlockSvg} from './block_svg.js';
import * as dom from './utils/dom.js';
import {Svg} from './utils/svg.js';
/** A bounding box for a cloned block. */
interface CloneRect {
x: number;
-1
View File
@@ -13,7 +13,6 @@
* while dragging blocks.
*/
/**
* A class that manages a surface for dragging blocks. When a
* block drag is started, we move the block (and children) to a separate DOM
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview Methods for dragging a block visually.
*/
/**
* Methods for dragging a block visually.
* @class
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview Methods for graphically rendering a block as SVG.
*/
/**
* Methods for graphically rendering a block as SVG.
* @class
-2
View File
@@ -8,7 +8,6 @@
* @fileoverview The top level namespace used to access the Blockly library.
*/
/**
* The top level namespace used to access the Blockly library.
* @namespace Blockly
@@ -349,7 +348,6 @@ export const defineBlocksWithJsonArray =
export const setParentContainer =
(common as AnyDuringMigration).setParentContainer;
/**
* Returns the dimensions of the specified SVG image.
* @param svg SVG image.
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview Object that defines user-specified options for the workspace.
*/
/**
* Object that defines user-specified options for the workspace.
* @namespace Blockly.BlocklyOptions
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview A mapping of block type names to block prototype objects.
*/
/**
* A mapping of block type names to block prototype objects.
* @namespace Blockly.blocks
-2
View File
@@ -8,7 +8,6 @@
* @fileoverview Browser event handling.
*/
/**
* Browser event handling.
* @namespace Blockly.browserEvents
@@ -116,7 +115,6 @@ export function conditionalBind(
return bindData;
}
/**
* Bind an event handler that should be called regardless of whether it is part
* of the active touch stream.
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview Object representing a UI bubble.
*/
/**
* Object representing a UI bubble.
* @class
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview Methods for dragging a bubble visually.
*/
/**
* Methods for dragging a bubble visually.
* @class
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview Utilities for bumping objects back into worksapce bounds.
*/
/**
* Utilities for bumping objects back into worksapce bounds.
* @namespace Blockly.bumpObjects
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview Blockly's internal clipboard for managing copy-paste.
*/
/**
* Blockly's internal clipboard for managing copy-paste.
* @namespace Blockly.clipboard
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview Object representing a code comment.
*/
/**
* Object representing a code comment.
* @class
-1
View File
@@ -9,7 +9,6 @@
* must not be at the top level to avoid circular dependencies.
*/
/**
* Common functions used both internally and externally, but which
* must not be at the top level to avoid circular dependencies.
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview Manager for all items registered with the workspace.
*/
/**
* Manager for all items registered with the workspace.
* @class
+1 -1
View File
@@ -10,7 +10,6 @@
* generally recommended.
*/
/**
* All the values that we expect developers to be able to change
* before injecting Blockly. Changing these values during run time is not
@@ -20,6 +19,7 @@
import * as goog from '../closure/goog/goog.js';
goog.declareModuleId('Blockly.config');
/**
* All the values that we expect developers to be able to change
* before injecting Blockly.
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview Components for creating connections between blocks.
*/
/**
* Components for creating connections between blocks.
* @class
-1
View File
@@ -9,7 +9,6 @@
* potential connection is safe and valid.
*/
/**
* An object that encapsulates logic for checking whether a
* potential connection is safe and valid.
-1
View File
@@ -10,7 +10,6 @@
* Sorted by y coordinate.
*/
/**
* A database of all the rendered connections that could
* possibly be connected to (i.e. not collapsed, etc).
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview An enum for the possible types of connections.
*/
/**
* An enum for the possible types of connections.
* @namespace Blockly.ConnectionType
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview Blockly constants.
*/
/**
* Blockly constants.
* @namespace Blockly.constants
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview Functionality for the right-click context menus.
*/
/**
* Functionality for the right-click context menus.
* @namespace Blockly.ContextMenu
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview Registers default context menu items.
*/
/**
* Registers default context menu items.
* @namespace Blockly.ContextMenuItems
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview Registry for context menu option items.
*/
/**
* Registry for context menu option items.
* @class
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview Inject Blockly's CSS synchronously.
*/
/**
* Inject Blockly's CSS synchronously.
* @namespace Blockly.Css
-2
View File
@@ -9,8 +9,6 @@
* bubble that is dropped on top of it.
*/
/**
* The abstract class for a component that can delete a block or
* bubble that is dropped on top of it.
+1 -1
View File
@@ -9,7 +9,6 @@
* alert/confirmation dialogs.
*/
/**
* Wrapper functions around JS functions for showing alert/confirmation dialogs.
* @namespace Blockly.dialog
@@ -17,6 +16,7 @@
import * as goog from '../closure/goog/goog.js';
goog.declareModuleId('Blockly.dialog');
let alertImplementation = function(
message: AnyDuringMigration, opt_callback: AnyDuringMigration) {
window.alert(message);
-2
View File
@@ -9,8 +9,6 @@
* block or bubble is dragged over or dropped on top of it.
*/
/**
* The abstract class for a component with custom behaviour when a
* block or bubble is dragged over or dropped on top of it.
-1
View File
@@ -10,7 +10,6 @@
* The drop-down can be kept inside the workspace, animate in/out, etc.
*/
/**
* A div that floats on top of the workspace, for drop-down menus.
* @class
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview Events fired as a result of actions in Blockly's editor.
*/
/**
* Events fired as a result of actions in Blockly's editor.
* @namespace Blockly.Events
-1
View File
@@ -9,7 +9,6 @@
* Blockly's editor.
*/
/**
* Abstract class for events fired as a result of actions in
* Blockly's editor.
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview Base class for all types of block events.
*/
/**
* Base class for all types of block events.
* @class
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview Class for a block change event.
*/
/**
* Class for a block change event.
* @class
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview Class for a block creation event.
*/
/**
* Class for a block creation event.
* @class
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview Class for a block delete event.
*/
/**
* Class for a block delete event.
* @class
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview Events fired as a block drag.
*/
/**
* Events fired as a block drag.
* @class
+1 -1
View File
@@ -8,7 +8,6 @@
* @fileoverview Class for a block move event.
*/
/**
* Class for a block move event.
* @class
@@ -25,6 +24,7 @@ import {Coordinate} from '../utils/coordinate.js';
import {BlockBase} from './events_block_base.js';
import * as eventUtils from './utils.js';
interface BlockLocation {
parentId: string;
inputName: string;
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview Events fired as a result of bubble open.
*/
/**
* Events fired as a result of bubble open.
* @class
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview Events fired as a result of UI click in Blockly's editor.
*/
/**
* Events fired as a result of UI click in Blockly's editor.
* @class
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview Base class for comment events.
*/
/**
* Base class for comment events.
* @class
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview Class for comment change event.
*/
/**
* Class for comment change event.
* @class
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview Class for comment creation event.
*/
/**
* Class for comment creation event.
* @class
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview Class for comment deletion event.
*/
/**
* Class for comment deletion event.
* @class
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview Class for comment move event.
*/
/**
* Class for comment move event.
* @class
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview Events fired as a result of a marker move.
*/
/**
* Events fired as a result of a marker move.
* @class
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview Events fired as a result of element select action.
*/
/**
* Events fired as a result of element select action.
* @class
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview Events fired as a result of a theme update.
*/
/**
* Events fired as a result of a theme update.
* @class
@@ -8,7 +8,6 @@
* @fileoverview Events fired as a result of selecting an item on the toolbox.
*/
/**
* Events fired as a result of selecting an item on the toolbox.
* @class
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview Events fired as a result of trashcan flyout open and close.
*/
/**
* Events fired as a result of trashcan flyout open and close.
* @class
-1
View File
@@ -9,7 +9,6 @@
* Blockly's editor.
*/
/**
* (Deprecated) Events fired as a result of UI actions in
* Blockly's editor.
-1
View File
@@ -9,7 +9,6 @@
* Blockly's editor.
*/
/**
* Base class for events fired as a result of UI actions in
* Blockly's editor.
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview Abstract class for a variable event.
*/
/**
* Abstract class for a variable event.
* @class
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview Class for a variable creation event.
*/
/**
* Class for a variable creation event.
* @class
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview Classes for all types of variable events.
*/
/**
* Classes for all types of variable events.
* @class
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview Class for a variable rename event.
*/
/**
* Class for a variable rename event.
* @class
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview Events fired as a result of a viewport change.
*/
/**
* Events fired as a result of a viewport change.
* @class
-1
View File
@@ -9,7 +9,6 @@
* actions in Blockly's editor.
*/
/**
* Helper methods for events that are fired as a result of
* actions in Blockly's editor.
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview Class for a finished loading workspace event.
*/
/**
* Class for a finished loading workspace event.
* @class
-1
View File
@@ -11,7 +11,6 @@
* array attribute.
*/
/**
* Extensions are functions that help initialize blocks, usually
* adding dynamic behavior such as onchange handlers and mutators. These
-1
View File
@@ -10,7 +10,6 @@
* instances would be FieldTextInput, FieldDropdown, etc.
*/
/**
* Field. Used for editable titles, variables, etc.
* This is an abstract class that defines the UI on the block. Actual
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview Angle input field.
*/
/**
* Angle input field.
* @class
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview Checkbox field. Checked or not checked.
*/
/**
* Checkbox field. Checked or not checked.
* @class
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview Colour input field.
*/
/**
* Colour input field.
* @class
-2
View File
@@ -10,7 +10,6 @@
* properties with the context menu.
*/
/**
* Dropdown input field. Used for editable titles and variables.
* In the interests of a consistent UI, the toolbox shares some functions and
@@ -121,7 +120,6 @@ export class FieldDropdown extends Field {
opt_validator?: Function, opt_config?: AnyDuringMigration) {
super(Field.SKIP_SETUP);
// If we pass SKIP_SETUP, don't do *anything* with the menu generator.
if (menuGenerator === Field.SKIP_SETUP) {
return;
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview Image field. Used for pictures, icons, etc.
*/
/**
* Image field. Used for pictures, icons, etc.
* @class
-1
View File
@@ -9,7 +9,6 @@
* labels, etc.
*/
/**
* Non-editable, non-serializable text field. Used for titles,
* labels, etc.
-1
View File
@@ -10,7 +10,6 @@
* edited programmatically.
*/
/**
* Non-editable, serializable text field. Behaves like a
* normal label but is serialized to XML. It may only be
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview Text Area field.
*/
/**
* Text Area field.
* @class
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview Number input field
*/
/**
* Number input field
* @class
-1
View File
@@ -10,7 +10,6 @@
* fields based on JSON.
*/
/**
* Fields can be created based on a JSON definition. This file
* contains methods for registering those JSON definitions, and building the
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview Text input field.
*/
/**
* Text input field.
* @class
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview Variable input field.
*/
/**
* Variable input field.
* @class
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview Flyout tray containing blocks which may be created.
*/
/**
* Flyout tray containing blocks which may be created.
* @class
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview Class for a button in the flyout.
*/
/**
* Class for a button in the flyout.
* @class
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview Horizontal flyout tray containing blocks which may be created.
*/
/**
* Horizontal flyout tray containing blocks which may be created.
* @class
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview Calculates and reports flyout workspace metrics.
*/
/**
* Calculates and reports flyout workspace metrics.
* @class
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview Layout code for a vertical variant of the flyout.
*/
/**
* Layout code for a vertical variant of the flyout.
* @class
-1
View File
@@ -9,7 +9,6 @@
* Blockly code.
*/
/**
* Utility functions for generating executable code from
* Blockly code.
-2
View File
@@ -9,7 +9,6 @@
* or a tap.
*/
/**
* The class representing an in-progress gesture, usually a drag
* or a tap.
@@ -52,7 +51,6 @@ import {WorkspaceDragger} from './workspace_dragger.js';
import {WorkspaceSvg} from './workspace_svg.js';
/**
* Note: In this file "start" refers to touchstart, mousedown, and pointerstart
* events. "End" refers to touchend, mouseup, and pointerend events.
-1
View File
@@ -9,7 +9,6 @@
* Blockly.
*/
/**
* Object for configuring and updating a workspace grid in
* Blockly.
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview Object representing an icon on a block.
*/
/**
* Object representing an icon on a block.
* @class
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview Functions for injecting Blockly into a web page.
*/
/**
* Functions for injecting Blockly into a web page.
* @namespace Blockly.inject
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview Object representing an input (value, statement, or dummy).
*/
/**
* Object representing an input (value, statement, or dummy).
* @class
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview An enum for the possible types of inputs.
*/
/**
* An enum for the possible types of inputs.
* @namespace Blockly.inputTypes
-2
View File
@@ -8,7 +8,6 @@
* @fileoverview Class that controls updates to connections during drags.
*/
/**
* Class that controls updates to connections during drags.
* @class
@@ -53,7 +52,6 @@ const DUPLICATE_BLOCK_ERROR = 'The insertion marker ' +
'you are using a mutator, make sure your domToMutation method is ' +
'properly defined.';
export enum PreviewType {
INSERTION_MARKER = 0,
INPUT_OUTLINE = 1,
+1 -1
View File
@@ -8,7 +8,6 @@
* @fileoverview The interface for an AST node location.
*/
/**
* The interface for an AST node location.
* @namespace Blockly.IASTNodeLocation
@@ -16,6 +15,7 @@
import * as goog from '../../closure/goog/goog.js';
goog.declareModuleId('Blockly.IASTNodeLocation');
/**
* An AST node location interface.
* @alias Blockly.IASTNodeLocation
@@ -8,7 +8,6 @@
* @fileoverview The interface for an AST node location SVG.
*/
/**
* The interface for an AST node location SVG.
* @namespace Blockly.IASTNodeLocationSvg
@@ -9,8 +9,6 @@
* block.
*/
/**
* The interface for an AST node location that has an associated
* block.
-2
View File
@@ -9,8 +9,6 @@
* when WorkspaceSvg.hideChaff is called.
*/
/**
* The interface for a component that is automatically hidden
* when WorkspaceSvg.hideChaff is called.
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview The interface for a block dragger.
*/
/**
* The interface for a block dragger.
* @namespace Blockly.IBlockDragger
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview The interface for a bounded element.
*/
/**
* The interface for a bounded element.
* @namespace Blockly.IBoundedElement
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview The interface for a bubble.
*/
/**
* The interface for a bubble.
* @namespace Blockly.IBubble
@@ -8,7 +8,6 @@
* @fileoverview The interface for a collapsible toolbox item.
*/
/**
* The interface for a collapsible toolbox item.
* @namespace Blockly.ICollapsibleToolboxItem
-2
View File
@@ -9,8 +9,6 @@
* the ComponentManager.
*/
/**
* Interface for a workspace component that can be registered with
* the ComponentManager.
-1
View File
@@ -9,7 +9,6 @@
* checking whether a potential connection is safe and valid.
*/
/**
* The interface for an object that encapsulates logic for
* checking whether a potential connection is safe and valid.
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview The interface for an object that supports a right-click.
*/
/**
* The interface for an object that supports a right-click.
* @namespace Blockly.IContextMenu
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview The interface for an object that is copyable.
*/
/**
* The interface for an object that is copyable.
* @namespace Blockly.ICopyable
-1
View File
@@ -8,7 +8,6 @@
* @fileoverview The interface for an object that is deletable.
*/
/**
* The interface for an object that is deletable.
* @namespace Blockly.IDeletable
-2
View File
@@ -9,8 +9,6 @@
* that is dropped on top of it.
*/
/**
* The interface for a component that can delete a block or bubble
* that is dropped on top of it.

Some files were not shown because too many files have changed in this diff Show More