mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
[BE] Various linter fixes
This commit is contained in:
@@ -698,8 +698,6 @@ function codegenInstructionValue(
|
||||
break;
|
||||
}
|
||||
case "FunctionExpression": {
|
||||
const id =
|
||||
instrValue.name !== null ? t.identifier(instrValue.name) : null;
|
||||
value = instrValue.expr;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -15,7 +15,6 @@ import {
|
||||
makeScopeId,
|
||||
Place,
|
||||
ReactiveScope,
|
||||
ScopeId,
|
||||
} from "../HIR/HIR";
|
||||
import { eachInstructionOperand } from "../HIR/visitors";
|
||||
import DisjointSet from "../Utils/DisjointSet";
|
||||
@@ -77,7 +76,7 @@ import { assertExhaustive } from "../Utils/utils";
|
||||
* mutate(x); // bc y is aliased here, it should still be considered mutable above
|
||||
* ```
|
||||
*/
|
||||
export function inferReactiveScopeVariables(fn: HIRFunction) {
|
||||
export function inferReactiveScopeVariables(fn: HIRFunction): void {
|
||||
// Represents the set of reactive scopes as disjoint sets of identifiers
|
||||
// that mutate together.
|
||||
const scopeIdentifiers = new DisjointSet<Identifier>();
|
||||
|
||||
@@ -20,7 +20,7 @@ type VisitorState = {
|
||||
nextId: number;
|
||||
};
|
||||
class Visitor extends ReactiveFunctionVisitor<VisitorState> {
|
||||
override visitScope(block: ReactiveScopeBlock, state: VisitorState) {
|
||||
override visitScope(block: ReactiveScopeBlock, state: VisitorState): void {
|
||||
this.traverseScope(block, state);
|
||||
for (const dep of block.scope.dependencies) {
|
||||
const { identifier } = dep.place;
|
||||
@@ -63,7 +63,7 @@ class Visitor extends ReactiveFunctionVisitor<VisitorState> {
|
||||
}
|
||||
}
|
||||
}
|
||||
export function promoteUsedTemporaries(fn: ReactiveFunction) {
|
||||
export function promoteUsedTemporaries(fn: ReactiveFunction): void {
|
||||
const state: VisitorState = {
|
||||
nextId: 0,
|
||||
temporaries: new Map(),
|
||||
|
||||
Reference in New Issue
Block a user