Skip to content

Commit

Permalink
Lint files
Browse files Browse the repository at this point in the history
  • Loading branch information
titouanmathis committed Dec 17, 2024
1 parent 5d229ae commit 9253589
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
14 changes: 6 additions & 8 deletions packages/playground/src/front/js/components/Iframe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,8 @@ export default class Iframe extends Base<IframeProps> {
async initIframe() {
this.$refs.iframe.classList.add('opacity-0');
// Enable dev mode in render
/* eslint-disable no-underscore-dangle */
// @ts-ignore
// @ts-expect-error Enable dev mode.
this.window.__DEV__ = true;
/* eslint-enable no-underscore-dangle */

this.doc.documentElement.innerHTML = `
<head>
Expand Down Expand Up @@ -138,7 +136,7 @@ export default class Iframe extends Base<IframeProps> {
}
}

initImportMaps() {
async initImportMaps() {
const importMap = this.doc.createElement('script');
importMap.type = 'importmap';
importMap.textContent = JSON.stringify({
Expand Down Expand Up @@ -183,8 +181,8 @@ export default class Iframe extends Base<IframeProps> {
if (style) {
const clone = this.style.cloneNode() as HTMLStyleElement;
clone.textContent = style;
// @ts-ignore
this.window.style.replaceWith(clone);
this.style.replaceWith(clone);
this.style = clone;
}
await nextTick();
console.log('style updated!');
Expand All @@ -207,8 +205,8 @@ export default class Iframe extends Base<IframeProps> {
target: 'es2020',
});
clone.textContent = results.code;
// @ts-ignore
this.window.script.replaceWith(clone);
this.script.replaceWith(clone);
this.script = clone;
console.log('script updated!');
} catch (err) {
console.log('script not updated due to some errors:');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Base } from '@studiometa/js-toolkit';
import type { BaseConfig, BaseProps } from '@studiometa/js-toolkit';

// eslint-disable-next-line @typescript-eslint/no-empty-object-type
export interface IframeReloaderProps extends BaseProps {}

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/src/lib/presets/playground.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export function playgroundPreset(options?: PartialDeep<PlaygroundPresetOptions>)
webpackConfig.cache = {
...webpackConfig.cache,
buildDependencies: {
// @ts-ignore
// @ts-expect-error config.PATH does not exist on MetaConfig (internal)
config: [import.meta.filename, config.PATH],
},
};
Expand Down

0 comments on commit 9253589

Please sign in to comment.