Run eslint in CI (#3487)

* Run eslint in CI

* Add linting of e2e

* Fix formatting

* Fix new warnings in e2e

* Fix more new warnings
This commit is contained in:
Jonathan Tran
2024-08-19 15:36:18 -04:00
committed by GitHub
parent c67511f67c
commit 2b711d216f
14 changed files with 26 additions and 17 deletions

View File

@ -38,6 +38,9 @@ const bracket = startSketchOn('XY')
tags: [getPreviousAdjacentEdge(outerEdge)]
}, %)`
/**
* @throws Error if the search text is not found in the example code.
*/
function findLineInExampleCode({
searchText,
example = bracket,
@ -48,6 +51,8 @@ function findLineInExampleCode({
const lines = example.split('\n')
const lineNumber = lines.findIndex((l) => l.includes(searchText)) + 1
if (lineNumber === 0) {
// We are exporting a constant, so we don't want to return an Error.
// eslint-disable-next-line suggest-no-throw/suggest-no-throw
throw new Error(
`Could not find the line with search text "${searchText}" in the example code. Was it removed?`
)