Commit c968672f authored by Wohlgemuth, Jason's avatar Wohlgemuth, Jason
Browse files

fix: Clear lint issues

parent 4e918eb4
Loading
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@ export default [
        files: [
            'astro.config.mjs',
            'eslint.config.js',
            'scripts/run.js',
            'src/**/*.{js,jsx,ts,tsx}',
        ],
        rules: {
@@ -56,5 +57,5 @@ export default [
            'sort-imports': ['error'],
            yoda: ['error', 'never'],
        },
    },
    }
];
+4 −3
Original line number Diff line number Diff line
#!/usr/bin/env node
/* eslint-disable sort-imports */
import { spawn } from 'child_process';
import { platform } from 'os';
import { fileURLToPath } from 'url';
@@ -17,14 +18,14 @@ const binaryPath = join(__dirname, '..', 'bin', binaryName);
const args = process.argv.slice(2);
const acorn = spawn(binaryPath, args, {
    stdio: 'inherit',
    shell: isWindows
    shell: isWindows,
});

acorn.on('exit', (code) => {
acorn.on('exit', code => {
    process.exit(code);
});

acorn.on('error', (err) => {
acorn.on('error', err => {
    console.error(`Failed to start acorn: ${err.message}`);
    console.error(`Looking for binary at: ${binaryPath}`);
    process.exit(1);
+13 −11
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@ const insight = {
    chart: 'treemap',
    columns: {
        x: 'Age',
        z: 'Cost',
        y: 'Cost',
        z: 'Count'
    },
    // See https://vega.github.io/vega/docs/schemes/#reference
@@ -18,18 +18,20 @@ const Viewer = ({ data }) => {
    };
    const [loaded, setLoaded] = useState(false);
    useEffect(() => {
        console.log("Viewer loaded");
        console.log('Viewer loaded');
        const viewer = document.getElementById('viewer');
        viewer.contentWindow.postMessage({ action: 'load', data, insight }, '*');
    }, [loaded]);
    return <main>
    return (
        <main>
            <div>
                <button>Data A</button>
                <button>Data B</button>
                <button>Data C</button>
            </div>
            <iframe id="viewer" src="embed.html" width="100%" height="900px" onLoad={handleLoad} loading="lazy"></iframe>
    </main>;
}
        </main>
    );
};

export default Viewer;