Skip to content

Commit

Permalink
fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
bakkot committed Sep 17, 2024
1 parent 74cac89 commit 24ed1d7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/Spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1887,7 +1887,7 @@ function getBoilerplate(file: string) {
if (fs.lstatSync(file).isFile()) {
boilerplateFile = file;
}
} catch (error) {
} catch {
boilerplateFile = path.join(__dirname, '../boilerplate', `${file}.html`);
}

Expand Down
4 changes: 2 additions & 2 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ const build = debounce(async function build() {
} else {
opts.extraBiblios!.push(bib);
}
} catch (e) {
} catch {
fail(`could not find biblio ${toResolve}`);
}
}
Expand All @@ -149,7 +149,7 @@ const build = debounce(async function build() {
let formatter;
try {
formatter = require(toResolve);
} catch (e) {
} catch {
fail(`could not find formatter ${errorFormatter}`);
}
const warnings: EcmarkupError[] = [];
Expand Down
6 changes: 3 additions & 3 deletions src/formatter/ecmarkup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ export async function printElement(
let parsed;
try {
parsed = parseAlgorithm(contents);
} catch (e) {
} catch {
// TODO error location information, ugh
bad(node, 'failed to parse algorithm');
}
Expand All @@ -202,7 +202,7 @@ export async function printElement(
let parsed;
try {
parsed = parseFragment(contents);
} catch (e) {
} catch {
// TODO error location information, ugh
bad(node, 'failed to parse emu-eqn');
}
Expand Down Expand Up @@ -404,7 +404,7 @@ async function printChildNodes(
let parsed;
try {
parsed = parseFragment(value);
} catch (e) {
} catch {
parsed = null;
}
if (parsed) {
Expand Down
2 changes: 1 addition & 1 deletion src/type-parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ function join(a: Type | null, b: Type | null): Type | null {
function squashUnionTypes(unionTypes: Type[]): Type {
const out = unionTypes.flatMap(t => (t.kind === 'union' ? t.types : [t]));
if (out.every(t => t.kind === 'completion')) {
return (out as Extract<Type, { kind: 'completion' }>[]).reduce((a, b) => {
return out.reduce((a, b) => {
if (a.completionType !== 'abrupt' && b.completionType !== 'abrupt') {
return {
kind: 'completion',
Expand Down

0 comments on commit 24ed1d7

Please sign in to comment.