[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:
filtered
2025-02-26 22:12:03 +11:00
committed by GitHub
parent 867b9ed316
commit 6224d2dc06
15 changed files with 37 additions and 16 deletions

View File

@@ -1,5 +1,7 @@
import { describe } from "vitest"
import { LGraph } from "@/litegraph"
import { dirtyTest } from "./testExtensions"
describe("LGraph configure()", () => {

View File

@@ -1,5 +1,7 @@
import { describe } from "vitest"
import { LGraph, LiteGraph } from "@/litegraph"
import { test } from "./testExtensions"
describe("LGraph", () => {

View File

@@ -1,5 +1,7 @@
import { describe, expect } from "vitest"
import { LGraphGroup } from "@/litegraph"
import { test } from "./testExtensions"
describe("LGraphGroup", () => {

View File

@@ -1,6 +1,8 @@
import { describe, expect } from "vitest"
import { LGraphNode } from "@/litegraph"
import { NodeInputSlot, NodeOutputSlot } from "@/NodeSlot"
import { test } from "./testExtensions"
describe("LGraphNode", () => {

View File

@@ -1,5 +1,7 @@
import { describe } from "vitest"
import { LGraph } from "@/litegraph"
import { dirtyTest } from "./testExtensions"
describe("LGraph (constructor only)", () => {

View File

@@ -1,5 +1,7 @@
import { describe, expect } from "vitest"
import { LLink } from "@/litegraph"
import { test } from "./testExtensions"
describe("LLink", () => {

View File

@@ -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", () => {

View File

@@ -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", () => {

View File

@@ -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"

View File

@@ -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

View File

@@ -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", () => {