chore: Fix inadvertent block migration inconsistencies (#5780)

* chore: Fix inadvertent block migration inconsistencies

  - Reinstate `goog.require`s-for-side-effects that were inadvertently
    removed.
  - Always use a destructuring import for `defineBlocksWithJsonArray`.
  - Consistently use `CONSTANT_CASE` names for block-common objects.
    (We could alternatively always use `camelCase` names, but since
    all the `MIXIN`s and `EXTENSIONS` remain all-uppercase this seems
    the more consistent.)

* chore: Fix import ordering
This commit is contained in:
Christopher Allen
2021-12-03 02:45:47 +00:00
committed by GitHub
parent b08187cd0a
commit b52c0179cb
6 changed files with 18 additions and 14 deletions

View File

@@ -13,13 +13,13 @@
goog.module('Blockly.blocks.math');
const Extensions = goog.require('Blockly.Extensions');
/* eslint-disable-next-line no-unused-vars */
const xmlUtils = goog.require('Blockly.utils.xml');
/* eslint-disable-next-line no-unused-vars */
const {Block} = goog.requireType('Blockly.Block');
// N.B.: Blockly.FieldDropdown needed for type AND side-effects.
/* eslint-disable-next-line no-unused-vars */
const FieldDropdown = goog.require('Blockly.FieldDropdown');
const xmlUtils = goog.require('Blockly.utils.xml');
/* eslint-disable-next-line no-unused-vars */
const {Block} = goog.requireType('Blockly.Block');
/* eslint-disable-next-line no-unused-vars */
const {defineBlocksWithJsonArray} = goog.require('Blockly.common');
/** @suppress {extraRequire} */
goog.require('Blockly.FieldLabel');