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:
@ -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?`
|
||||
)
|
||||
|
Reference in New Issue
Block a user