Skip to content

Commit e892861

Browse files
authored
Merge pull request #3565 from scratchfoundation/renovate/eslint-config-scratch-14.x
style(deps): update dependency eslint-config-scratch to v14.1.14
2 parents a599c00 + 398651c commit e892861

13 files changed

Lines changed: 102 additions & 101 deletions

package-lock.json

Lines changed: 83 additions & 83 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"@vitest/browser": "4.1.5",
4242
"@vitest/browser-playwright": "4.1.5",
4343
"eslint": "9.39.4",
44-
"eslint-config-scratch": "14.1.12",
44+
"eslint-config-scratch": "14.1.14",
4545
"husky": "9.1.7",
4646
"playwright": "1.59.1",
4747
"prettier": "3.8.3",

src/fields/scratch_field_variable.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export class ScratchFieldVariable extends Blockly.FieldVariable {
4747
// dropdownCreate returns MenuOption[] rather than Blockly.MenuGenerator's
4848
// MenuOption[][] variant; the cast is needed to satisfy FieldVariable's
4949
// menuGenerator_ type while the actual runtime shape is compatible.
50-
this.menuGenerator_ = ScratchFieldVariable.dropdownCreate.bind(this) as unknown as Blockly.MenuGenerator
50+
this.menuGenerator_ = ScratchFieldVariable.dropdownCreate.bind(this)
5151
}
5252

5353
initModel() {

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ export function isContentNodeFocused(): boolean {
159159
return Blockly.getFocusManager().getFocusedNode() !== null
160160
}
161161

162-
;(registerContinuousToolbox as () => void)()
162+
registerContinuousToolbox()
163163
Blockly.Scrollbar.scrollbarThickness = Blockly.Touch.TOUCH_ENABLED ? 14 : 11
164164
Blockly.FlyoutButton.TEXT_MARGIN_X = 40
165165
Blockly.FlyoutButton.TEXT_MARGIN_Y = 10

src/renderer/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export class ConstantProvider extends Blockly.zelos.ConstantProvider {
5252
* @returns The shape object for the given connection.
5353
*/
5454
override shapeFor(connection: Blockly.RenderedConnection): ReturnType<Blockly.zelos.ConstantProvider['shapeFor']> {
55-
const connectionType = connection.type as Blockly.ConnectionType
55+
const connectionType: Blockly.ConnectionType = connection.type
5656
let checks = connection.getCheck()
5757
const hexagonal = this.HEXAGONAL
5858
const rounded = this.ROUNDED

src/renderer/drawer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export class Drawer extends Blockly.zelos.Drawer {
6464
*/
6565
override drawConnectionHighlightPath(measurable: Blockly.blockRendering.Connection) {
6666
const conn = measurable.connectionModel
67-
const connectionType = conn.type as Blockly.ConnectionType
67+
const connectionType: Blockly.ConnectionType = conn.type
6868
if (connectionType === Blockly.ConnectionType.INPUT_VALUE && measurable.isDynamicShape) {
6969
const input = measurable as Blockly.blockRendering.InlineInput
7070
const EXPAND_X = 0.5

src/renderer/renderer.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ export class ScratchRenderer extends Blockly.zelos.Renderer {
6565
* @returns True if we should highlight the connection.
6666
*/
6767
override shouldHighlightConnection(connection: Blockly.RenderedConnection): boolean {
68-
return (connection.type as Blockly.ConnectionType) === Blockly.ConnectionType.INPUT_VALUE
68+
const connectionType: Blockly.ConnectionType = connection.type
69+
return connectionType === Blockly.ConnectionType.INPUT_VALUE
6970
}
7071
}
7172

src/scratch_c_block_wrap.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ Blockly.Connection.getConnectionForOrphanedConnection = function (
2828
// Apply the wrapping logic when the orphaned connection is a statement
2929
// connection (PREVIOUS_STATEMENT). Value connections (OUTPUT_VALUE) are
3030
// already handled by the original implementation.
31-
if ((orphanConnection.type as Blockly.ConnectionType) === Blockly.ConnectionType.PREVIOUS_STATEMENT) {
31+
const orphanType: Blockly.ConnectionType = orphanConnection.type
32+
if (orphanType === Blockly.ConnectionType.PREVIOUS_STATEMENT) {
3233
const checker = orphanConnection.getConnectionChecker()
3334
for (const input of startBlock.inputList) {
3435
const conn = input.connection
@@ -87,7 +88,7 @@ Reflect.set(
8788
if (markerPreviousConnection?.isConnected() && !markerNextConnection?.isConnected()) {
8889
for (const input of marker.inputList) {
8990
const conn = input.connection
90-
const connType = conn?.type as Blockly.ConnectionType | undefined
91+
const connType = conn?.type
9192
if (connType !== Blockly.ConnectionType.NEXT_STATEMENT || !conn?.isConnected()) {
9293
continue
9394
}

src/scratch_comment_bubble.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export class ScratchCommentBubble
6969
if (gesture) {
7070
// ScratchCommentBubble implements IBubble structurally but TypeScript
7171
// cannot verify it because IBubble.drag has a different signature here.
72-
gesture.handleBubbleStart(e, this as unknown as Blockly.IBubble)
72+
gesture.handleBubbleStart(e, this)
7373
Blockly.common.setSelected(this)
7474
}
7575
}

src/scratch_connection_checker.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,9 @@ class ScratchConnectionChecker extends Blockly.ConnectionChecker {
5050
// getConnectionForOrphanedConnection patch routes displaced blocks into
5151
// statement inputs, so we allow the connection when a suitable statement
5252
// input exists on the dragging block.
53+
const bType: Blockly.ConnectionType = b.type
5354
if (
54-
(b.type as Blockly.ConnectionType) === Blockly.ConnectionType.NEXT_STATEMENT &&
55+
bType === Blockly.ConnectionType.NEXT_STATEMENT &&
5556
b.isConnected() &&
5657
!(a.getSourceBlock() as Blockly.Block).nextConnection
5758
) {

0 commit comments

Comments
 (0)