Skip to content

Commit

Permalink
Fixes lint warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
dgp1130 committed Mar 12, 2023
1 parent 9232dea commit ebcd3f2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion examples/preact/component/script.mts
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
document.getElementById('replace')!.textContent = 'Hello from JavaScript!';
const replace = document.getElementById('replace');
if (!replace) throw new Error('No `#replace` element.');
replace.textContent = 'Hello from JavaScript!';
4 changes: 2 additions & 2 deletions packages/rules_prerender/scripts.mts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ export function includeScript(filePath: string, meta: ImportMeta): string {
* wrapping. This is useful for templating engines which don't have easy "parse
* HTML into safe type" utilities.
*/
export function includeScriptAnnotation(
filePath: string, meta: ImportMeta): string {
export function includeScriptAnnotation(filePath: string, meta: ImportMeta):
string {
if (!filePath.startsWith('.')) {
throw new Error(`Only relative imports are supported and must start with \`./\` or \`../\`: "${filePath}".`);
}
Expand Down

0 comments on commit ebcd3f2

Please sign in to comment.