remove "use strict" (is default in es6 modules)

This commit is contained in:
Fabian
2025-04-07 19:39:08 +07:00
parent 2d69353416
commit 51bd604cc5
88 changed files with 13 additions and 143 deletions

View File

@@ -133,7 +133,8 @@ export default [
"no-with": "error",
"require-yield": "error",
"use-isnan": "error",
"valid-typeof": "error"
"valid-typeof": "error",
"strict": "error"
}
}
];

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env node
"use strict";
import fs from "node:fs";
import url from "node:url";

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env node
"use strict";
import fs from "node:fs";
import url from "node:url";

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env node
"use strict";
import assert from "node:assert/strict";
import fs from "node:fs";

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env node
"use strict";
import assert from "node:assert/strict";
import fs from "node:fs";

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env node
"use strict";
import assert from "node:assert/strict";
import fs from "node:fs";

View File

@@ -1,5 +1,3 @@
"use strict";
import assert from "node:assert/strict";
function indent(lines, how_much)

View File

@@ -1,5 +1,3 @@
"use strict";
import fs from "node:fs";
import path from "node:path";
import process from "node:process";

View File

@@ -1,5 +1,3 @@
"use strict";
// http://ref.x86asm.net/coder32.html
const zf = 1 << 6;

View File

@@ -4,7 +4,6 @@
// Implementation of the 9p filesystem device following the
// 9P2000.L protocol ( https://code.google.com/p/diod/wiki/protocol )
"use strict";
import { LOG_9P } from "./../src/const.js";
import { VirtIO, VIRTIO_F_VERSION_1, VIRTIO_F_RING_EVENT_IDX, VIRTIO_F_RING_INDIRECT_DESC } from "../src/virtio.js";

View File

@@ -3,7 +3,6 @@
// -------------------------------------------------
// Implementation of a unix filesystem in memory.
"use strict";
import { LOG_9P } from "../src/const.js";
import { h } from "../src/lib.js";

View File

@@ -2,7 +2,6 @@
// ------------------ Marshall ---------------------
// -------------------------------------------------
// helper functions for virtio and 9p.
"use strict";
import { dbg_log } from "./../src/log.js";

View File

@@ -1,5 +1,3 @@
"use strict";
// http://www.uefi.org/sites/default/files/resources/ACPI_6_1.pdf
import { v86 } from "./main.js";

View File

@@ -1,5 +1,3 @@
"use strict";
// See Intel's System Programming Guide
import { v86 } from "./main.js";

View File

@@ -1,5 +1,3 @@
"use strict";
import { dbg_assert } from "../log.js";
/**

View File

@@ -1,5 +1,3 @@
"use strict";
import { LOG_FETCH } from "../const.js";
import { h } from "../lib.js";
import { dbg_assert, dbg_log } from "../log.js";

View File

@@ -1,5 +1,3 @@
"use strict";
import { LOG_FETCH } from "../const.js";
import { h } from "../lib.js";
import { dbg_log } from "../log.js";

View File

@@ -1,6 +1,3 @@
"use strict";
import { dbg_assert } from "../log.js";
import { load_file } from "../lib.js";

View File

@@ -1,5 +1,3 @@
"use strict";
// For Types Only
import { BusConnector } from "../bus.js";

View File

@@ -1,5 +1,3 @@
"use strict";
// For Types Only
import { BusConnector } from "../bus.js";

View File

@@ -1,5 +1,3 @@
"use strict";
import { V86 } from "./starter.js";
import { LOG_NAMES } from "../const.js";
import { print_stats } from "./print_stats.js";

View File

@@ -1,6 +1,3 @@
"use strict";
import { dbg_log } from "../log.js";
// For Types Only

View File

@@ -1,5 +1,3 @@
"use strict";
// For Types Only
import { BusConnector } from "../bus.js";

View File

@@ -1,5 +1,3 @@
"use strict";
import { pads } from "../lib.js";
export const print_stats = {

View File

@@ -1,5 +1,3 @@
"use strict";
import { dbg_assert } from "../log.js";
// Draws entire buffer and visualizes the layers that would be drawn

View File

@@ -1,5 +1,3 @@
"use strict";
import { dbg_assert, dbg_log } from "../log.js";
// For Types Only

View File

@@ -1,5 +1,3 @@
"use strict";
import {
MIXER_CHANNEL_BOTH, MIXER_CHANNEL_LEFT, MIXER_CHANNEL_RIGHT,
MIXER_SRC_PCSPEAKER, MIXER_SRC_DAC, MIXER_SRC_MASTER,

View File

@@ -1,5 +1,3 @@
"use strict";
import { v86 } from "../main.js";
import { LOG_CPU, WASM_TABLE_OFFSET, WASM_TABLE_SIZE } from "../const.js";
import { get_rand_int, load_file, read_sized_string_from_mem } from "../lib.js";

View File

@@ -1,5 +1,3 @@
"use strict";
import { LOG_NET } from "../const.js";
import { dbg_log } from "../log.js";

View File

@@ -1,5 +1,3 @@
"use strict";
import { dbg_assert } from "../log.js";
/** @constructor */

View File

@@ -1,5 +1,3 @@
"use strict";
import { CPU } from "./cpu.js";
import { load_file, get_file_size } from "./lib.js";
import { dbg_assert, dbg_log } from "./log.js";

View File

@@ -1,5 +1,3 @@
"use strict";
import { dbg_assert } from "./log.js";
export var Bus = {};

View File

@@ -1,5 +1,3 @@
"use strict";
/**
* @define {boolean}
* Overridden for production by closure compiler

View File

@@ -1,5 +1,3 @@
"use strict";
export const
/** @const */ LOG_ALL = -1,
/** @const */ LOG_NONE = 0,

View File

@@ -1,5 +1,3 @@
"use strict";
import {
LOG_CPU, LOG_BIOS,
FW_CFG_SIGNATURE, FW_CFG_SIGNATURE_QEMU,

View File

@@ -1,5 +1,3 @@
"use strict";
import { LOG_DMA } from "./const.js";
import { h } from "./lib.js";
import { dbg_log } from "./log.js";

View File

@@ -1,5 +1,3 @@
"use strict";
import { dbg_log, LOG_LEVEL } from "./log.js";
// A minimal elf parser for loading 32 bit, x86, little endian, executable elf files

View File

@@ -1,5 +1,3 @@
"use strict";
var global = {};
var process = { hrtime: function() {} };

View File

@@ -1,5 +1,3 @@
"use strict";
// https://www.isdaman.com/alsos/hardware/fdc/floppy.htm
// https://wiki.osdev.org/Floppy_Disk_Controller

View File

@@ -1,5 +1,3 @@
"use strict";
import { LOG_DISK } from "./const.js";
import { h } from "./lib.js";
import { dbg_assert, dbg_log } from "./log.js";

View File

@@ -1,5 +1,3 @@
"use strict";
import { LOG_IO, MMAP_BLOCK_BITS, MMAP_BLOCK_SIZE, MMAP_MAX } from "./const.js";
import { h } from "./lib.js";
import { dbg_assert, dbg_log } from "./log.js";

View File

@@ -1,5 +1,3 @@
"use strict";
// http://download.intel.com/design/chipsets/datashts/29056601.pdf
import { LOG_APIC, MMAP_BLOCK_SIZE } from "./const.js";

View File

@@ -1,5 +1,3 @@
"use strict";
import { h } from "./lib.js";
import { dbg_assert, dbg_log } from "./log.js";

View File

@@ -1,5 +1,3 @@
"use strict";
import { dbg_assert } from "./log.js";
// pad string with spaces on the right

View File

@@ -1,5 +1,3 @@
"use strict";
if(typeof DEBUG === "undefined")
{
globalThis.DEBUG = true;

View File

@@ -1,5 +1,3 @@
"use strict";
import { CPU } from "./cpu.js";
import { save_state, restore_state } from "./state.js";
export { V86 } from "./browser/starter.js";

View File

@@ -1,5 +1,3 @@
"use strict";
import { LOG_NET } from "./const.js";
import { h, hex_dump } from "./lib.js";
import { dbg_assert, dbg_log } from "./log.js";

View File

@@ -1,5 +1,3 @@
"use strict";
import { LOG_PCI } from "./const.js";
import { h } from "./lib.js";
import { dbg_assert, dbg_log } from "./log.js";

View File

@@ -1,5 +1,3 @@
"use strict";
import { v86 } from "./main.js";
import { LOG_PIT } from "./const.js";
import { h } from "./lib.js";

View File

@@ -1,5 +1,3 @@
"use strict";
import { LOG_PS2 } from "./const.js";
import { h } from "./lib.js";
import { dbg_log } from "./log.js";

View File

@@ -1,5 +1,3 @@
"use strict";
import { v86 } from "./main.js";
import { LOG_RTC } from "./const.js";
import { h } from "./lib.js";

View File

@@ -1,5 +1,3 @@
"use strict";
import {
LOG_SB16,
MIXER_CHANNEL_BOTH, MIXER_CHANNEL_LEFT, MIXER_CHANNEL_RIGHT,

View File

@@ -1,5 +1,3 @@
"use strict";
import { h } from "./lib.js";
import { dbg_assert, dbg_log } from "./log.js";
import { CPU } from "./cpu.js";

View File

@@ -1,5 +1,3 @@
"use strict";
import { LOG_SERIAL } from "./const.js";
import { h } from "./lib.js";
import { dbg_log } from "./log.js";

View File

@@ -1,5 +1,3 @@
"use strict";
import { LOG_VGA } from "./const.js";
import { h } from "./lib.js";
import { dbg_assert, dbg_log } from "./log.js";

View File

@@ -1,5 +1,3 @@
"use strict";
import { LOG_VIRTIO } from "./const.js";
import { h, zeros, int_log2 } from "./lib.js";
import { dbg_assert, dbg_log } from "./log.js";

View File

@@ -1,5 +1,3 @@
"use strict";
// https://docs.oasis-open.org/virtio/virtio/v1.2/csd01/virtio-v1.2-csd01.html#x1-2900003
import { LOG_PCI } from "./const.js";

View File

@@ -1,5 +1,3 @@
"use strict";
import { dbg_assert } from "./log.js";
import { VirtIO, VIRTIO_F_VERSION_1 } from "./virtio.js";
import * as marshall from "../lib/marshall.js";

View File

@@ -1,5 +1,3 @@
"use strict";
// https://docs.oasis-open.org/virtio/virtio/v1.2/csd01/virtio-v1.2-csd01.html#x1-2900003
import { dbg_assert } from "./log.js";

View File

@@ -1,5 +1,4 @@
#!/usr/bin/env node
"use strict";
import url from "node:url";
const __dirname = url.fileURLToPath(new URL(".", import.meta.url));

View File

@@ -1,5 +1,4 @@
#!/usr/bin/env node
"use strict";
import { setTimeout as pause } from "timers/promises";
import url from "node:url";

View File

@@ -1,5 +1,4 @@
#!/usr/bin/env node
"use strict";
import url from "node:url";
import fs from "node:fs";

View File

@@ -1,5 +1,4 @@
#!/usr/bin/env node
"use strict";
import url from "node:url";

View File

@@ -1,5 +1,4 @@
#!/usr/bin/env node
"use strict";
import url from "node:url";

View File

@@ -1,5 +1,4 @@
#!/usr/bin/env node
"use strict";
import url from "node:url";
import assert from "node:assert/strict";

View File

@@ -1,5 +1,4 @@
#!/usr/bin/env node
"use strict";
import url from "node:url";

View File

@@ -1,5 +1,4 @@
#!/usr/bin/env node
"use strict";
import url from "node:url";

View File

@@ -1,5 +1,4 @@
#!/usr/bin/env node
"use strict";
import path from "node:path";
import url from "node:url";

View File

@@ -1,5 +1,4 @@
#!/usr/bin/env node
"use strict";
import path from "node:path";
import url from "node:url";

View File

@@ -1,5 +1,4 @@
#!/usr/bin/env node
"use strict";
import fs from "node:fs";
import path from "node:path";

View File

@@ -1,5 +1,4 @@
#!/usr/bin/env node
"use strict";
import path from "node:path";
import url from "node:url";

View File

@@ -1,5 +1,4 @@
#!/usr/bin/env node
"use strict";
import assert from "assert/strict";
import url from "node:url";

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env node
"use strict";
import url from "node:url";
import fs from "node:fs";

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env node
"use strict";
import assert from "assert/strict";
import url from "node:url";

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env node
"use strict";
import assert from "assert/strict";
import fs from "node:fs";
import url from "node:url";

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env -S node --experimental-websocket
"use strict";
import assert from "assert/strict";
import url from "node:url";

View File

@@ -1,5 +1,4 @@
#!/usr/bin/env node
"use strict";
import fs from "node:fs";
import path from "node:path";

View File

@@ -1,5 +1,4 @@
#!/usr/bin/env node
"use strict";
import assert from "node:assert/strict";
import cluster from "node:cluster";

View File

@@ -1,5 +1,4 @@
#!/usr/bin/env node
"use strict";
import fs from "node:fs";
import url from "node:url";

View File

@@ -1,5 +1,4 @@
#!/usr/bin/env node
"use strict";
import fs from "node:fs";
import path from "node:path";

View File

@@ -1,5 +1,4 @@
#!/usr/bin/env node
"use strict";
import fs from "node:fs";
import fse from "node:fs/promises";

View File

@@ -1,5 +1,4 @@
#!/usr/bin/env node
"use strict";
import fs from "node:fs";
import path from "node:path";

View File

@@ -1,5 +1,3 @@
"use strict";
// From http://baagoe.com/en/RandomMusings/javascript/
// Johannes Baagøe <baagoe@baagoe.com>, 2010
function Mash() {

View File

@@ -1,5 +1,4 @@
#!/usr/bin/env node
"use strict";
import fs from "node:fs";
import path from "node:path";

View File

@@ -1,5 +1,4 @@
#!/usr/bin/env node
"use strict";
import fs from "node:fs";
import path from "node:path";

View File

@@ -1,7 +1,4 @@
#!/usr/bin/env node
"use strict";
process.on("unhandledRejection", exn => { throw exn; });
import { fileURLToPath } from "url";
import path from "path";
@@ -11,6 +8,8 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url));
const TEST_RELEASE_BUILD = +process.env.TEST_RELEASE_BUILD;
const { V86 } = await import(TEST_RELEASE_BUILD ? "../../build/libv86.mjs" : "../../src/main.js");
process.on("unhandledRejection", exn => { throw exn; });
var test_executable = new Uint8Array(fs.readFileSync(__dirname + "/test-i386"));
var emulator = new V86({

View File

@@ -1,5 +1,4 @@
#!/usr/bin/env node
"use strict";
import fs from "node:fs";
import path from "node:path";

View File

@@ -1,5 +1,4 @@
#!/usr/bin/env node
"use strict";
import path from "node:path";
import fs from "node:fs";