Add more TS lints and fix types (#6037)

* Add as const lint

* Add lint for no implied eval

* Fix incorrect type and add lints

* Add more type lints

* Remove redundant type assertions and add lint

* Fix to turn off incorrect base rules

* Fix yarn lint workflow to wait for build:wasm

* Change so that we don't build:wasm more than once in the workflow
This commit is contained in:
Jonathan Tran
2025-03-28 00:24:24 -04:00
committed by GitHub
parent d1f811f91d
commit cc2efd316c
20 changed files with 163 additions and 65 deletions

View File

@ -12,6 +12,7 @@ import {
defaultSourceRange,
topLevelRange,
ArtifactGraph,
CallExpressionKw,
} from 'lang/wasm'
import { ModelingMachineEvent } from 'machines/modelingMachine'
import { isNonNullable, uuidv4 } from 'lib/utils'
@ -337,7 +338,7 @@ function updateSceneObjectColors(codeBasedSelections: Selection[]) {
Object.values(sceneEntitiesManager.activeSegments).forEach((segmentGroup) => {
if (!SEGMENT_BODIES_PLUS_PROFILE_START.includes(segmentGroup?.name)) return
const nodeMeta = getNodeFromPath<Node<CallExpression | CallExpression>>(
const nodeMeta = getNodeFromPath<Node<CallExpression | CallExpressionKw>>(
updated,
segmentGroup.userData.pathToNode,
['CallExpression', 'CallExpressionKw']
@ -716,7 +717,7 @@ export function updateSelections(
},
}
})
.filter((x?: Selection) => x !== undefined) as Selection[]
.filter((x?: Selection) => x !== undefined)
// for when there is no artifact (sketch mode since mock execute does not update artifactGraph)
const pathToNodeBasedSelections: Selections['graphSelections'] = []