diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index ff0863e8..00000000 --- a/.eslintignore +++ /dev/null @@ -1,20 +0,0 @@ -dist.js -build/ -anuraos-types/ -bin/ -aboutproxy/ -v86/ -apps/ -.eslintrc.js -public/anura-sw.js -public/lib/ -documentation/templates -public/lib/html-to-image.min.js -public/uv/ -static/ -chimerix/ -dreamlandjs/ -x86_image_wizard/twisp/ -x86_image_wizard/epoxy/ -native-file-system-adapter/ -server/ \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 079b8ba0..00000000 --- a/.eslintrc.js +++ /dev/null @@ -1,30 +0,0 @@ -module.exports = { - env: { - browser: true, - es2021: true, - }, - extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended"], - parser: "@typescript-eslint/parser", - parserOptions: { - ecmaVersion: "latest", - }, - plugins: ["@typescript-eslint"], - - rules: { - // "indent": [ - // "error", - // "tab" - // ], - // - "@typescript-eslint/no-empty-function": "off", - "@typescript-eslint/ban-ts-comment": "off", - "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/no-unused-vars": "off", - "@typescript-eslint/no-non-null-assertion": "off", - "no-async-promise-executor": "off", - "@typescript-eslint/no-namespace": "off", - "linebreak-style": ["error", "unix"], - // quotes: ["error", "double"], - semi: ["error", "always"], - }, -}; diff --git a/.gitignore b/.gitignore index 8d956194..182ead7c 100644 --- a/.gitignore +++ b/.gitignore @@ -30,7 +30,7 @@ result anuraos-types/ public/config.json static/ -x86_image_wizard/apline/anura-run +x86_image_wizard/alpine/anura-run x86_image_wizard/alpine/xfrog.sh x86_image_wizard/alpine/xsetrandr.sh x86_image_wizard/alpine/anuramouse diff --git a/.prettierrc.js b/.prettierrc.js index 6bc7e815..e6c73196 100644 --- a/.prettierrc.js +++ b/.prettierrc.js @@ -1,9 +1,11 @@ /** * @type {import("prettier").Config} */ -module.exports = { +const config = { tabWidth: 4, trailingComma: "all", semi: true, singleQuote: false, }; + +export default config; diff --git a/dreamlandjs b/dreamlandjs index 0942bf19..72392994 160000 --- a/dreamlandjs +++ b/dreamlandjs @@ -1 +1 @@ -Subproject commit 0942bf19eac6602ecf6dc57974963f2182aa6c77 +Subproject commit 7239299486bdc2169686740c3853c3a674c9a4c5 diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 00000000..c8cdd5a5 --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,74 @@ +import typescriptEslint from "@typescript-eslint/eslint-plugin"; +import globals from "globals"; +import tsParser from "@typescript-eslint/parser"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; +import js from "@eslint/js"; +import { FlatCompat } from "@eslint/eslintrc"; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); +const compat = new FlatCompat({ + baseDirectory: __dirname, + recommendedConfig: js.configs.recommended, + allConfig: js.configs.all, +}); + +export default [ + { + ignores: [ + "**/dist.js", + "**/build/", + "**/anuraos-types/", + "**/bin/", + "**/aboutproxy/", + "**/v86/", + "**/apps/", + "**/.eslintrc.js", + "public/anura-sw.js", + "public/lib/", + "documentation/templates", + "public/lib/html-to-image.min.js", + "public/uv/", + "**/static/", + "**/chimerix/", + "**/dreamlandjs/", + "x86_image_wizard/twisp/", + "x86_image_wizard/epoxy/", + "**/native-file-system-adapter/", + "**/server/", + ], + }, + ...compat.extends( + "eslint:recommended", + "plugin:@typescript-eslint/recommended", + ), + { + plugins: { + "@typescript-eslint": typescriptEslint, + }, + + languageOptions: { + globals: { + ...globals.browser, + }, + + parser: tsParser, + ecmaVersion: "latest", + sourceType: "script", + }, + + rules: { + "@typescript-eslint/no-empty-function": "off", + "@typescript-eslint/ban-ts-comment": "off", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-unused-vars": "off", + "@typescript-eslint/no-non-null-assertion": "off", + "no-async-promise-executor": "off", + "@typescript-eslint/no-namespace": "off", + "@typescript-eslint/no-unused-expressions": "off", + "linebreak-style": ["error", "unix"], + semi: ["error", "always"], + }, + }, +]; diff --git a/package.json b/package.json index b093b85f..a3d61164 100644 --- a/package.json +++ b/package.json @@ -15,27 +15,31 @@ "dependencies": { "@mercuryworkshop/bare-mux": "^1.1.4", "@titaniumnetwork-dev/ultraviolet": "3.1.5", - "@typescript-eslint/eslint-plugin": "^5.60.1", "autoprefixer": "^10.4.20", "comlink": "^4.4.1", - "eslint": "=8.13.0", - "eslint-plugin-html": "^7.1.0", - "eslint-plugin-jsdoc": "^46.4.3", "fflate": "^0.8.2", "filer": "^1.4.1", "fs-readdir-recursive": "^1.1.0", "idb-keyval": "^6.2.1", - "libcurl.js": "^0.6.15", + "libcurl.js": "^0.6.17", "mime": "^4.0.4", "onchange": "^7.1.0", "postcss": "^8.4.45", "postcss-cli": "^11.0.0", - "typescript": "^5.6.2" + "typescript": "^5.6.3" }, "devDependencies": { + "eslint": "9.13.0", + "eslint-plugin-html": "^8.1.2", + "eslint-plugin-jsdoc": "^50.4.3", + "@typescript-eslint/eslint-plugin": "^8.11.0", + "@typescript-eslint/parser": "^8.11.0", + "@eslint/eslintrc": "^3.1.0", + "@eslint/js": "^9.13.0", "@types/node": "^22.5.4", "@types/wicg-file-system-access": "^2023.10.5", "dreamland": "^0.0.24", + "globals": "^15.11.0", "prettier": "3.3.3", "rollup": "^4.21.3", "workbox-cli": "7.1.0" diff --git a/src/coreapps/SettingsApp.tsx b/src/coreapps/SettingsApp.tsx index 6d00cc4e..a10a82d7 100644 --- a/src/coreapps/SettingsApp.tsx +++ b/src/coreapps/SettingsApp.tsx @@ -165,17 +165,12 @@ const settingsCSS = css` } `; -const SettingSwitch: Component< - { - title: string; - setting: string; - callback?: any; - on?: boolean; - }, - { - // - } -> = function () { +const SettingSwitch: Component<{ + title: string; + setting: string; + callback?: any; + on?: boolean; +}> = function () { this.mount = () => { this.on = anura.settings.get(this.setting); }; @@ -198,18 +193,13 @@ const SettingSwitch: Component< ); }; -const SettingText: Component< - { - title: string; - setting: string; - callback?: any; - value?: string; - type?: string; - }, - { - // - } -> = function () { +const SettingText: Component<{ + title: string; + setting: string; + callback?: any; + value?: string; + type?: string; +}> = function () { return (
{use(this.title)} diff --git a/x86_image_wizard/epoxy b/x86_image_wizard/epoxy index d6f1a8da..b6ba44ea 160000 --- a/x86_image_wizard/epoxy +++ b/x86_image_wizard/epoxy @@ -1 +1 @@ -Subproject commit d6f1a8da43c11410595a7710613786d4fc37fa38 +Subproject commit b6ba44eaa388ff6d1479d61e4b8310390dedb2b2