mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-23 15:59:47 +00:00
[Cleanup] Update ESLint rules with stricter auto-fixes (#614)
Stylistic plugin falls short in a few areas when it comes to consistent lists and chaining. Replaced some key rules with antfu's personal variants. `eslint` can now be run repo-wide without params.
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import { describe } from "vitest"
|
||||
|
||||
import { LGraph } from "@/litegraph"
|
||||
|
||||
import { dirtyTest } from "./testExtensions"
|
||||
|
||||
describe("LGraph configure()", () => {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { describe } from "vitest"
|
||||
|
||||
import { LGraph, LiteGraph } from "@/litegraph"
|
||||
|
||||
import { test } from "./testExtensions"
|
||||
|
||||
describe("LGraph", () => {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { describe, expect } from "vitest"
|
||||
|
||||
import { LGraphGroup } from "@/litegraph"
|
||||
|
||||
import { test } from "./testExtensions"
|
||||
|
||||
describe("LGraphGroup", () => {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { describe, expect } from "vitest"
|
||||
|
||||
import { LGraphNode } from "@/litegraph"
|
||||
import { NodeInputSlot, NodeOutputSlot } from "@/NodeSlot"
|
||||
|
||||
import { test } from "./testExtensions"
|
||||
|
||||
describe("LGraphNode", () => {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { describe } from "vitest"
|
||||
|
||||
import { LGraph } from "@/litegraph"
|
||||
|
||||
import { dirtyTest } from "./testExtensions"
|
||||
|
||||
describe("LGraph (constructor only)", () => {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { describe, expect } from "vitest"
|
||||
|
||||
import { LLink } from "@/litegraph"
|
||||
|
||||
import { test } from "./testExtensions"
|
||||
|
||||
describe("LLink", () => {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { describe, it, expect } from "vitest"
|
||||
import { serializeSlot } from "@/NodeSlot"
|
||||
import { describe, expect, it } from "vitest"
|
||||
|
||||
import { INodeInputSlot, INodeOutputSlot } from "@/interfaces"
|
||||
import { serializeSlot } from "@/NodeSlot"
|
||||
|
||||
describe("NodeSlot", () => {
|
||||
describe("serializeSlot", () => {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { describe, expect } from "vitest"
|
||||
|
||||
import { clamp, LGraphCanvas, LiteGraph } from "@/litegraph"
|
||||
import { LiteGraphGlobal } from "@/LiteGraphGlobal"
|
||||
|
||||
import { test } from "./testExtensions"
|
||||
|
||||
describe.concurrent("Litegraph module", () => {
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
import { describe } from "vitest"
|
||||
import { LGraph, LGraphGroup, LGraphNode } from "@/litegraph"
|
||||
import { test } from "./testExtensions"
|
||||
import type { ISerialisedGraph } from "@/types/serialisation"
|
||||
|
||||
import { describe } from "vitest"
|
||||
|
||||
import { LGraph, LGraphGroup, LGraphNode } from "@/litegraph"
|
||||
|
||||
import { test } from "./testExtensions"
|
||||
|
||||
describe("LGraph Serialisation", () => {
|
||||
test("can (de)serialise node / group titles", ({ expect, minimalGraph }) => {
|
||||
const nodeTitle = "Test Node"
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
import { test as baseTest } from "vitest"
|
||||
import type { ISerialisedGraph, SerialisableGraph } from "../src/types/serialisation"
|
||||
|
||||
import { test as baseTest } from "vitest"
|
||||
|
||||
import { LGraph } from "@/LGraph"
|
||||
import { basicSerialisableGraph, minimalSerialisableGraph, oldSchemaGraph } from "./assets/testGraphs"
|
||||
import { LiteGraph } from "@/litegraph"
|
||||
|
||||
import { basicSerialisableGraph, minimalSerialisableGraph, oldSchemaGraph } from "./assets/testGraphs"
|
||||
|
||||
interface LitegraphFixtures {
|
||||
minimalGraph: LGraph
|
||||
minimalSerialisableGraph: SerialisableGraph
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { describe, expect, it } from "vitest"
|
||||
import { type SpaceRequest, distributeSpace } from "@/utils/spaceDistribution"
|
||||
|
||||
import { distributeSpace, type SpaceRequest } from "@/utils/spaceDistribution"
|
||||
|
||||
describe("distributeSpace", () => {
|
||||
it("should distribute space according to minimum sizes when space is limited", () => {
|
||||
|
||||
Reference in New Issue
Block a user