diff --git a/scripts/generateProps.js b/scripts/generateProps.js index 5dcc81c..f21235c 100644 --- a/scripts/generateProps.js +++ b/scripts/generateProps.js @@ -20,7 +20,7 @@ import prettier from "prettier"; const ignoreTypes = ["SourceLocation", "RegExp"]; const specPath = new URL( "../node_modules/estree-formal/formal-data/es2022.json", - import.meta.url + import.meta.url, ); const outputPath = new URL("../src/props.js", import.meta.url); @@ -71,7 +71,7 @@ function getPropsToUse(name) { const spec = JSON.parse( await fs.readFile(specPath, { encoding: "utf-8", - }) + }), ); const names = Object.keys(spec) diff --git a/src/traverse.js b/src/traverse.js index fe19c20..e0024dd 100644 --- a/src/traverse.js +++ b/src/traverse.js @@ -105,7 +105,7 @@ class TraversalState { if (typeof lastSegment === "string") { const newSegment = findNextPathSegment( this.getElementAt(tryPath), - lastSegment + lastSegment, ); if (newSegment) return tryPath.concat(newSegment); } else { @@ -114,7 +114,7 @@ class TraversalState { const newIndex = findNextArrayIndex( this.getElementAt(newPath), arrayName, - lastSegment + lastSegment, ); if (newIndex) return newPath.concat([arrayName, newIndex]); } @@ -227,7 +227,7 @@ class TraversalState { const insertCount = this.#insertAt( this.#path.slice(0, -1), this.key - 1, - node + node, ); this.#path[this.#path.length - 1] += insertCount; @@ -243,14 +243,14 @@ class TraversalState { const insertCount = this.#insertAt( this.#path.slice(0, -1), this.key + 1, - node + node, ); if (!skipBoth) this.#nextPath = this.#findNextPath(this.#path); else this.#nextPath = this.#findNextPath( this.#path.slice(0, -1).concat(this.key + insertCount), - true + true, ); } } diff --git a/src/traverse.spec.js b/src/traverse.spec.js index c4e2aa6..5c36ed3 100644 --- a/src/traverse.spec.js +++ b/src/traverse.spec.js @@ -343,7 +343,7 @@ describe("modification", () => { console.log(b); } const d = 4; -` +`, ); expect(visitedIdentifierC).toBe(true); @@ -372,7 +372,7 @@ const d = 4; }, ], }, - true + true, ); if (node.type === "Identifier" && node.name === "c") @@ -481,7 +481,7 @@ const d = 4; ], }, ], - true + true, ); if (node.type === "Identifier" && node.name === "c")