From 199ec85af7b4b5a1ed84607eebebdc9d3f2d55a7 Mon Sep 17 00:00:00 2001 From: TomatoCake <60300461+DEVTomatoCake@users.noreply.github.com> Date: Sun, 11 Feb 2024 17:24:20 +0100 Subject: [PATCH] ESLint flat config + update pkgs + sh0rt.zip --- .eslintrc.json | 202 --------------------- .github/workflows/eslint.yml | 4 +- .gitignore | 2 +- assets/script.js | 8 +- assets/style.css | 4 + eslint.config.js | 328 +++++++++++++++++++++++++++++++++++ index.html | 4 +- package-lock.json | 184 +++++++++++++------- package.json | 6 +- 9 files changed, 462 insertions(+), 280 deletions(-) delete mode 100644 .eslintrc.json create mode 100644 eslint.config.js diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index fe45e9a..0000000 --- a/.eslintrc.json +++ /dev/null @@ -1,202 +0,0 @@ -{ - "env": { - "browser": true, - "es2022": true - }, - "plugins": ["html", "@html-eslint", "unicorn", "sonarjs"], - "overrides": [ - { - "files": ["*.html"], - "parser": "@html-eslint/parser", - "extends": ["plugin:@html-eslint/recommended"], - "rules": { - "@html-eslint/no-multiple-h1": 0 - } - } - ], - "settings": { - "html/html-extensions": [".html"] - }, - "ignorePatterns": ["jszip.min.js"], - "rules": { - "array-bracket-spacing": 2, - "array-callback-return": 2, - "arrow-parens": [2, "as-needed"], - "arrow-spacing": 2, - "block-scoped-var": 2, - "brace-style": 2, - "comma-dangle": 2, - "comma-style": 2, - "computed-property-spacing": 2, - "default-case-last": 2, - "dot-notation": 2, - "dot-location": [2, "property"], - "func-call-spacing": 2, - "func-name-matching": 2, - "key-spacing": 2, - "keyword-spacing": 2, - "max-statements-per-line": 2, - "max-len": [2, { "code": 240 }], - "new-cap": 2, - "new-parens": 2, - "no-array-constructor": 2, - "no-compare-neg-zero": 2, - "no-const-assign": 2, - "no-constructor-return": 2, - "no-dupe-args": 2, - "no-dupe-keys": 2, - "no-duplicate-case": 2, - "no-div-regex": 2, - "no-floating-decimal": 2, - "no-eq-null": 2, - "no-extra-bind": 2, - "no-extra-semi": 2, - "no-extend-native": 2, - "no-eval": 2, - "no-empty-pattern": 2, - "no-duplicate-imports": 2, - "no-fallthrough": 2, - "no-func-assign": 2, - "no-import-assign": 2, - "no-invalid-regexp": 2, - "no-invalid-this": 2, - "no-implicit-coercion": [2, { "string": false }], - "no-implied-eval": 2, - "no-loss-of-precision": 2, - "no-multi-spaces": 2, - "no-mixed-spaces-and-tabs": 2, - "no-multiple-empty-lines": 2, - "no-negated-condition": 2, - "no-new-native-nonconstructor": 2, - "no-new-object": 2, - "no-obj-calls": 2, - "no-self-assign": 2, - "no-unreachable": 2, - "no-unreachable-loop": 2, - "no-unsafe-finally": 2, - "no-useless-computed-key": 2, - "no-useless-rename": 2, - "no-useless-escape": 2, - "no-unused-expressions": 2, - "no-useless-return": 2, - "no-useless-call": 2, - "no-use-before-define": [2, { "functions": false }], - "no-useless-concat": 2, - "no-useless-backreference": 2, - "no-useless-catch": 2, - "no-unneeded-ternary": 2, - "no-undef-init": 2, - "no-redeclare": 2, - "no-shadow-restricted-names": 2, - "no-trailing-spaces": 2, - "no-empty-static-block": 2, - "no-throw-literal": 2, - "no-template-curly-in-string": 2, - "no-unsafe-optional-chaining": 2, - "no-unmodified-loop-condition": 2, - "no-promise-executor-return": 2, - "no-warning-comments": 1, - "no-var": 2, - "no-new-func": 2, - "no-new-wrappers": 2, - "no-multi-str": 2, - "no-shadow": [2, { "builtinGlobals": false }], - "no-self-compare": 2, - "no-regex-spaces": 2, - "no-constant-binary-expression": 2, - "no-sequences": 2, - "no-irregular-whitespace": [2, { "skipRegExps": true }], - "no-constant-condition": 2, - "no-undefined": 2, - "no-lone-blocks": 2, - "no-whitespace-before-property": 2, - "object-shorthand": 2, - "prefer-arrow-callback": 2, - "quotes": [2, "double", { "allowTemplateLiterals": false, "avoidEscape": true }], - "use-isnan": 2, - "valid-typeof": 2, - - "@html-eslint/require-meta-charset": 2, - "@html-eslint/require-button-type": 2, - "@html-eslint/no-restricted-attrs": 2, - "@html-eslint/require-meta-description": 2, - "@html-eslint/no-skip-heading-levels": 2, - "@html-eslint/require-frame-title": 2, - "@html-eslint/no-non-scalable-viewport": 2, - "@html-eslint/no-positive-tabindex": 2, - "@html-eslint/require-meta-viewport": 2, - "@html-eslint/no-abstract-roles": 2, - "@html-eslint/no-aria-hidden-body": 2, - "@html-eslint/no-accesskey-attrs": 2, - "@html-eslint/no-multiple-empty-lines": 2, - "@html-eslint/no-trailing-spaces": 2, - "@html-eslint/indent": [2, "tab"], - - "unicorn/empty-brace-spaces": 2, - "unicorn/error-message": 2, - "unicorn/new-for-builtins": 2, - "unicorn/consistent-destructuring": 2, - "unicorn/consistent-function-scoping": 2, - "unicorn/no-array-method-this-argument": 2, - "unicorn/no-lonely-if": 2, - "unicorn/no-instanceof-array": 2, - "unicorn/no-nested-ternary": 2, - "unicorn/no-new-buffer": 2, - "unicorn/no-console-spaces": 2, - "unicorn/no-for-loop": 2, - "unicorn/no-useless-undefined": 2, - "unicorn/no-zero-fractions": 2, - "unicorn/no-unreadable-iife": 2, - "unicorn/no-unnecessary-await": 2, - "unicorn/no-unreadable-array-destructuring": 2, - "unicorn/no-useless-switch-case": 2, - "unicorn/no-typeof-undefined": 2, - "unicorn/no-useless-fallback-in-spread": 2, - "unicorn/no-useless-length-check": 2, - "unicorn/no-useless-spread": 2, - "unicorn/no-useless-promise-resolve-reject": 2, - "unicorn/prefer-array-find": 2, - "unicorn/prefer-array-index-of": 2, - "unicorn/prefer-includes": 2, - "unicorn/prefer-logical-operator-over-ternary": 2, - "unicorn/prefer-date-now": 2, - "unicorn/prefer-default-parameters": 2, - "unicorn/prefer-array-some": 2, - "unicorn/prefer-blob-reading-methods": 2, - "unicorn/prefer-at": 2, - "unicorn/prefer-optional-catch-binding": 2, - "unicorn/prefer-regexp-test": 2, - "unicorn/prefer-set-has": 2, - "unicorn/prefer-set-size": 2, - "unicorn/prefer-negative-index": 2, - "unicorn/prefer-node-protocol": 2, - "unicorn/prefer-prototype-methods": 2, - "unicorn/prefer-string-trim-start-end": 2, - "unicorn/prefer-string-starts-ends-with": 2, - "unicorn/require-array-join-separator": 2, - "unicorn/require-number-to-fixed-digits-argument": 2, - "unicorn/switch-case-braces": [2, "avoid"], - "unicorn/text-encoding-identifier-case": 2, - - "sonarjs/no-extra-arguments": 2, - "sonarjs/no-empty-collection": 2, - "sonarjs/no-element-overwrite": 2, - "sonarjs/no-use-of-empty-return-value": 2, - "sonarjs/no-all-duplicated-branches": 2, - "sonarjs/no-ignored-return": 2, - "sonarjs/no-identical-expressions": 2, - "sonarjs/no-one-iteration-loop": 2, - "sonarjs/non-existent-operator": 2, - "sonarjs/no-redundant-boolean": 2, - "sonarjs/no-unused-collection": 2, - "sonarjs/prefer-immediate-return": 2, - "sonarjs/no-inverted-boolean-check": 2, - "sonarjs/no-redundant-jump": 2, - "sonarjs/no-same-line-conditional": 2, - "sonarjs/prefer-object-literal": 2, - "sonarjs/no-collection-size-mischeck": 2, - "sonarjs/prefer-while": 2, - "sonarjs/no-gratuitous-expressions": 2, - "sonarjs/no-duplicated-branches": 2 - } -} diff --git a/.github/workflows/eslint.yml b/.github/workflows/eslint.yml index 7f2bcce..825ec18 100644 --- a/.github/workflows/eslint.yml +++ b/.github/workflows/eslint.yml @@ -17,7 +17,7 @@ jobs: node-version: 21 - name: "🛸 install eslint html plugins" - run: npm i + run: npm i --omit=optional - name: "🔍 lint code" - run: npx eslint --ext .html,.js . --report-unused-disable-directives + run: npx eslint . diff --git a/.gitignore b/.gitignore index c2658d7..2ccbe46 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -node_modules/ +/node_modules/ diff --git a/assets/script.js b/assets/script.js index ed7ed6a..9b54ecb 100644 --- a/assets/script.js +++ b/assets/script.js @@ -162,7 +162,7 @@ async function share(type) { const name = Math.random().toString(36).slice(7) const date = Date.now() + 1000 * 60 * 60 * 24 * 7 - const res = await fetch("https://shorter.cf", { + const res = await fetch("https://sh0rt.zip", { method: "POST", headers: { "Content-Type": "application/json", @@ -178,9 +178,9 @@ async function share(type) { const json = await res.json() if (res.ok) { - document.getElementById("share-link").href = "https://shorter.cf/" + name - document.getElementById("share-link").innerText = "https://shorter.cf/" + name - document.getElementById("share-img").src = "https://api.qrserver.com/v1/create-qr-code/?data=" + encodeURIComponent("https://shorter.cf/" + name) + "&size=150x150&qzone=2" + document.getElementById("share-link").href = "https://sh0rt.zip/" + name + document.getElementById("share-link").innerText = "https://sh0rt.zip/" + name + document.getElementById("share-img").src = "https://api.qrserver.com/v1/create-qr-code/?data=" + encodeURIComponent("https://sh0rt.zip/" + name) + "&size=150x150&qzone=2" openDialog(document.getElementById("shareDialog")) } else alert("Couldn't create link: " + json.error) return diff --git a/assets/style.css b/assets/style.css index a8fc12d..c523c01 100644 --- a/assets/style.css +++ b/assets/style.css @@ -54,6 +54,10 @@ strong { color: var(--heading-color); } +#shareImage { + display: none; +} + header .packType { display: flex; gap: 15px; diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000..1a64d78 --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,328 @@ +const globals = require("globals") + +const unicorn = require("eslint-plugin-unicorn") +const sonarjs = require("eslint-plugin-sonarjs") +const stylistic = require("@stylistic/eslint-plugin-js") +const htmlESLint = require("@html-eslint/eslint-plugin") +const html = require("eslint-plugin-html") + +const linterOptions = { + reportUnusedDisableDirectives: "error" +} +const global = { + ...globals.browser, + + encode: "writable", + assertInt: "writable", + get: "writable", + getLanguage: "writable", + getCookie: "writable", + setCookie: "writable", + deleteCookie: "writable", + reloadText: "writable", + handleError: "writable", + handleChange: "writable", + pickerData: "writable", + selectData: "writable", + messageData: "writable", + loadFunc: "writable", + openDialog: "writable", + fadeIn: "writable", + fadeOut: "writable", + ToastNotification: "writable", + sockette: "writable", + mentionPicker: "writable", + emojiPicker: "writable", + sidebar: "writable", + updateSelected: "writable", + togglePicker: "writable", + + renderImage: "readonly", + turnstile: "readonly", + Chart: "readonly" +} + +const rules = { + "array-callback-return": 2, + "block-scoped-var": 2, + "default-case-last": 2, + "default-param-last": 2, + "dot-notation": 2, + "func-name-matching": 2, + "no-array-constructor": 2, + "no-compare-neg-zero": 2, + "no-const-assign": 2, + "no-constructor-return": 2, + "no-dupe-args": 2, + "no-dupe-keys": 2, + "no-duplicate-case": 2, + "no-div-regex": 2, + "no-eq-null": 2, + "no-extra-bind": 2, + "no-extend-native": 2, + "no-empty-pattern": 2, + "no-duplicate-imports": 2, + "no-fallthrough": 2, + "no-func-assign": 2, + "no-import-assign": 2, + "no-invalid-regexp": 2, + "no-invalid-this": 2, + "no-implicit-coercion": [2, { + string: false + }], + "no-implied-eval": 2, + "no-loss-of-precision": 2, + "no-multi-assign": 2, + "no-negated-condition": 2, + "no-new-native-nonconstructor": 2, + "no-new-object": 2, + "no-obj-calls": 2, + "no-self-assign": 2, + "no-unreachable": 1, + "no-unreachable-loop": 2, + "no-unsafe-finally": 2, + "no-useless-computed-key": 2, + "no-useless-rename": 2, + "no-useless-escape": 2, + "no-unused-expressions": 2, + "no-useless-return": 2, + "no-useless-call": 2, + "no-use-before-define": [2, { + functions: false + }], + "no-useless-concat": 2, + "no-useless-backreference": 2, + "no-useless-catch": 2, + "no-unneeded-ternary": 2, + "no-undef": [2, { + typeof: true + }], + "no-undef-init": 2, + "no-useless-constructor": 2, + "no-redeclare": 2, + "no-shadow-restricted-names": 2, + "no-empty-static-block": 2, + "no-throw-literal": 2, + "no-template-curly-in-string": 2, + "no-unsafe-optional-chaining": 2, + "no-unmodified-loop-condition": 2, + "no-promise-executor-return": 2, + "no-warning-comments": 2, + "no-var": 2, + "no-new-func": 2, + "no-new-wrappers": 2, + "no-multi-str": 2, + "no-shadow": [2, { + builtinGlobals: false + }], + "no-self-compare": 2, + "no-regex-spaces": 2, + "no-constant-binary-expression": 2, + "no-sequences": 2, + "no-irregular-whitespace": [2, { + skipRegExps: true + }], + "no-constant-condition": 2, + "no-undefined": 2, + "no-lone-blocks": 2, + "object-shorthand": 2, + "prefer-arrow-callback": 2, + "prefer-const": 2, + "use-isnan": 2, + "valid-typeof": 2, + + "@stylistic/js/array-bracket-spacing": 2, + "@stylistic/js/arrow-parens": [2, "as-needed"], + "@stylistic/js/arrow-spacing": 2, + "@stylistic/js/block-spacing": [2, "never"], + "@stylistic/js/brace-style": 2, + "@stylistic/js/comma-dangle": 2, + "@stylistic/js/comma-style": 2, + "@stylistic/js/computed-property-spacing": 2, + "@stylistic/js/dot-location": [2, "property"], + "@stylistic/js/function-call-spacing": 2, + "@stylistic/js/generator-star-spacing": 2, + "@stylistic/js/key-spacing": 2, + "@stylistic/js/keyword-spacing": 2, + "@stylistic/js/new-parens": 2, + "@stylistic/js/no-mixed-operators": [2, { + groups: [["*", "/"], ["+", "-"]] + }], + "@stylistic/js/no-extra-semi": 2, + "@stylistic/js/no-multi-spaces": 2, + "@stylistic/js/no-mixed-spaces-and-tabs": 2, + "@stylistic/js/no-floating-decimal": 2, + "@stylistic/js/no-multiple-empty-lines": 2, + "@stylistic/js/no-whitespace-before-property": 2, + "@stylistic/js/no-trailing-spaces": 2, + "@stylistic/js/max-statements-per-line": 2, + "@stylistic/js/max-len": [2, { + code: 220 + }], + "@stylistic/js/quote-props": [2, "as-needed"], + "@stylistic/js/quotes": [2, "double", { + allowTemplateLiterals: false, + avoidEscape: false + }], + "@stylistic/js/padded-blocks": [2, "never"], + "@stylistic/js/rest-spread-spacing": 2, + "@stylistic/js/semi": [2, "never"], + "@stylistic/js/space-before-blocks": 2, + "@stylistic/js/space-before-function-paren": [2, { + named: "never", + anonymous: "never", + asyncArrow: "always" + }], + "@stylistic/js/space-in-parens": 2, + "@stylistic/js/space-infix-ops": 2, + "@stylistic/js/space-unary-ops": 2, + "@stylistic/js/yield-star-spacing": 2, + + "unicorn/empty-brace-spaces": 2, + "unicorn/error-message": 2, + "unicorn/new-for-builtins": 2, + "unicorn/consistent-destructuring": 2, + "unicorn/consistent-function-scoping": 2, + "unicorn/no-array-method-this-argument": 2, + "unicorn/no-lonely-if": 2, + "unicorn/no-instanceof-array": 2, + "unicorn/no-nested-ternary": 2, + "unicorn/no-new-buffer": 2, + "unicorn/no-console-spaces": 2, + "unicorn/no-for-loop": 2, + "unicorn/no-useless-undefined": 2, + "unicorn/no-zero-fractions": 2, + "unicorn/no-unreadable-iife": 2, + "unicorn/no-unnecessary-await": 2, + "unicorn/no-unreadable-array-destructuring": 2, + "unicorn/no-useless-switch-case": 2, + "unicorn/no-typeof-undefined": 2, + "unicorn/no-useless-fallback-in-spread": 2, + "unicorn/no-useless-length-check": 2, + "unicorn/no-useless-spread": 2, + "unicorn/no-useless-promise-resolve-reject": 2, + "unicorn/prefer-array-find": 2, + "unicorn/prefer-array-index-of": 2, + "unicorn/prefer-includes": 2, + "unicorn/prefer-logical-operator-over-ternary": 2, + "unicorn/prefer-date-now": 2, + "unicorn/prefer-default-parameters": 2, + "unicorn/prefer-array-some": 2, + "unicorn/prefer-blob-reading-methods": 2, + "unicorn/prefer-at": 2, + "unicorn/prefer-optional-catch-binding": 2, + "unicorn/prefer-regexp-test": 2, + "unicorn/prefer-set-has": 2, + "unicorn/prefer-set-size": 2, + "unicorn/prefer-negative-index": 2, + "unicorn/prefer-node-protocol": 2, + "unicorn/prefer-prototype-methods": 2, + "unicorn/prefer-string-trim-start-end": 2, + "unicorn/prefer-string-starts-ends-with": 2, + "unicorn/require-number-to-fixed-digits-argument": 2, + "unicorn/switch-case-braces": [2, "avoid"], + "unicorn/text-encoding-identifier-case": 2, + + "sonarjs/no-extra-arguments": 2, + "sonarjs/no-empty-collection": 2, + "sonarjs/no-element-overwrite": 2, + "sonarjs/no-use-of-empty-return-value": 2, + "sonarjs/no-all-duplicated-branches": 2, + "sonarjs/no-ignored-return": 2, + "sonarjs/no-identical-expressions": 2, + "sonarjs/no-one-iteration-loop": 2, + "sonarjs/non-existent-operator": 2, + "sonarjs/no-redundant-boolean": 2, + "sonarjs/no-unused-collection": 2, + "sonarjs/prefer-immediate-return": 2, + "sonarjs/no-inverted-boolean-check": 2, + "sonarjs/no-redundant-jump": 2, + "sonarjs/no-same-line-conditional": 2, + "sonarjs/prefer-object-literal": 2, + "sonarjs/no-collection-size-mischeck": 2, + "sonarjs/prefer-while": 2, + "sonarjs/no-gratuitous-expressions": 2, + "sonarjs/no-duplicated-branches": 2 +} + +module.exports = [ + { + linterOptions, + languageOptions: { + globals: global + }, + files: ["**/*.js"], + ignores: ["eslint.config.js", "assets/jszip.min.js"], + plugins: { + unicorn, + sonarjs, + "@stylistic/js": stylistic + }, + rules + },{ + linterOptions, + languageOptions: { + globals: { + ...global, + ...globals.node + } + }, + files: ["eslint.config.js"], + plugins: { + unicorn, + sonarjs, + "@stylistic/js": stylistic + }, + rules + },{ + linterOptions, + languageOptions: { + globals: global, + parser: require("@html-eslint/parser") + }, + files: ["**/*.html"], + plugins: { + unicorn, + sonarjs, + "@stylistic/js": stylistic, + "@html-eslint": htmlESLint, + html + }, + settings: { + "html/html-extensions": [".html"] + }, + rules: { + ...rules, + + "@html-eslint/require-meta-charset": 2, + "@html-eslint/require-button-type": 2, + "@html-eslint/no-restricted-attrs": 2, + "@html-eslint/require-meta-description": 2, + "@html-eslint/no-skip-heading-levels": 2, + "@html-eslint/require-frame-title": 2, + "@html-eslint/no-non-scalable-viewport": 2, + "@html-eslint/no-positive-tabindex": 2, + "@html-eslint/require-meta-viewport": 2, + "@html-eslint/no-abstract-roles": 2, + "@html-eslint/no-aria-hidden-body": 2, + "@html-eslint/no-accesskey-attrs": 2, + "@html-eslint/no-multiple-empty-lines": 2, + "@html-eslint/no-trailing-spaces": 2, + "@html-eslint/indent": [2, "tab"], + "@html-eslint/no-duplicate-attrs": 2, + "@html-eslint/no-inline-styles": 1, + "@html-eslint/no-duplicate-id": 2, + "@html-eslint/no-script-style-type": 2, + "@html-eslint/require-li-container": 2, + "@html-eslint/require-closing-tags": 2, + "@html-eslint/require-doctype": 2, + "@html-eslint/require-lang": 2, + "@html-eslint/require-title": 2, + "@html-eslint/no-extra-spacing-attrs": 2, + "@html-eslint/lowercase": 2, + "@html-eslint/element-newline": 2, + "@html-eslint/quotes": 2, + "@html-eslint/require-img-alt": 2 + } + } +] diff --git a/index.html b/index.html index fdbfbef..bc8d30a 100644 --- a/index.html +++ b/index.html @@ -54,7 +54,7 @@

Drop/paste a .zip or .mcfunction file, or select a folder below to analyze i

- +

@@ -94,7 +94,7 @@

About

×

Share as link

- +

QR code link for sharing diff --git a/package-lock.json b/package-lock.json index e4ed60d..0243e50 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,10 +11,12 @@ "devDependencies": { "@html-eslint/eslint-plugin": "^0.23.1", "@html-eslint/parser": "^0.23.0", + "@stylistic/eslint-plugin-js": "^1.6.1", "eslint": "^8.56.0", - "eslint-plugin-html": "^7.1.0", + "eslint-plugin-html": "^8.0.0", "eslint-plugin-sonarjs": "^0.23.0", - "eslint-plugin-unicorn": "^50.0.1" + "eslint-plugin-unicorn": "^51.0.1", + "globals": "^14.0.0" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -251,6 +253,21 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/@eslint/eslintrc/node_modules/globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@eslint/js": { "version": "8.56.0", "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz", @@ -282,13 +299,13 @@ } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.13", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz", - "integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==", + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", "dev": true, "dependencies": { - "@humanwhocodes/object-schema": "^2.0.1", - "debug": "^4.1.1", + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", "minimatch": "^3.0.5" }, "engines": { @@ -309,9 +326,9 @@ } }, "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz", - "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz", + "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==", "dev": true }, "node_modules/@nodelib/fs.scandir": { @@ -349,6 +366,24 @@ "node": ">= 8" } }, + "node_modules/@stylistic/eslint-plugin-js": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin-js/-/eslint-plugin-js-1.6.1.tgz", + "integrity": "sha512-gHRxkbA5p8S1fnChE7Yf5NFltRZCzbCuQOcoTe93PSKBC4GqVjZmlWUSLz9pJKHvDAUTjWkfttWHIOaFYPEhRQ==", + "dev": true, + "dependencies": { + "acorn": "^8.11.3", + "escape-string-regexp": "^4.0.0", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "peerDependencies": { + "eslint": ">=8.40.0" + } + }, "node_modules/@types/normalize-package-data": { "version": "2.4.4", "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz", @@ -362,9 +397,9 @@ "dev": true }, "node_modules/acorn": { - "version": "8.11.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", - "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==", + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -445,9 +480,9 @@ } }, "node_modules/browserslist": { - "version": "4.22.2", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.2.tgz", - "integrity": "sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A==", + "version": "4.22.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.3.tgz", + "integrity": "sha512-UAp55yfwNv0klWNapjs/ktHoguxuQNGnOzxYmfnXIS+8AsRDZkSDxg7R1AX3GKzn078SBI5dzwzj/Yx0Or0e3A==", "dev": true, "funding": [ { @@ -464,8 +499,8 @@ } ], "dependencies": { - "caniuse-lite": "^1.0.30001565", - "electron-to-chromium": "^1.4.601", + "caniuse-lite": "^1.0.30001580", + "electron-to-chromium": "^1.4.648", "node-releases": "^2.0.14", "update-browserslist-db": "^1.0.13" }, @@ -498,9 +533,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001571", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001571.tgz", - "integrity": "sha512-tYq/6MoXhdezDLFZuCO/TKboTzuQ/xR5cFdgXPfDtM7/kchBO3b4VWghE/OAi/DV7tTdhmLjZiZBZi1fA/GheQ==", + "version": "1.0.30001585", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001585.tgz", + "integrity": "sha512-yr2BWR1yLXQ8fMpdS/4ZZXpseBgE7o4g41x3a6AJOqZuOi+iE/WdJYAuZ6Y95i4Ohd2Y+9MzIWRR+uGABH4s3Q==", "dev": true, "funding": [ { @@ -594,9 +629,9 @@ "dev": true }, "node_modules/core-js-compat": { - "version": "3.34.0", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.34.0.tgz", - "integrity": "sha512-4ZIyeNbW/Cn1wkMMDy+mvrRUxrwFNjKwbhCfQpDd+eLgYipDqp8oGFGtLmhh18EDPKA0g3VUBYOxQGGwvWLVpA==", + "version": "3.35.1", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.35.1.tgz", + "integrity": "sha512-sftHa5qUJY3rs9Zht1WEnmkvXputCyDBczPnr7QDgL8n3qrF3CMXY4VPSYtOLLiOUJcah2WNXREd48iOl6mQIw==", "dev": true, "dependencies": { "browserslist": "^4.22.2" @@ -711,9 +746,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.616", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.616.tgz", - "integrity": "sha512-1n7zWYh8eS0L9Uy+GskE0lkBUNK83cXTVJI0pU3mGprFsbfSdAc15VTFbo+A+Bq4pwstmL30AVcEU3Fo463lNg==", + "version": "1.4.665", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.665.tgz", + "integrity": "sha512-UpyCWObBoD+nSZgOC2ToaIdZB0r9GhqT2WahPKiSki6ckkSuKhQNso8V2PrFcHBMleI/eqbKgVQgVC4Wni4ilw==", "dev": true }, "node_modules/entities": { @@ -744,9 +779,9 @@ "dev": true }, "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", "dev": true, "engines": { "node": ">=6" @@ -820,12 +855,15 @@ } }, "node_modules/eslint-plugin-html": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-html/-/eslint-plugin-html-7.1.0.tgz", - "integrity": "sha512-fNLRraV/e6j8e3XYOC9xgND4j+U7b1Rq+OygMlLcMg+wI/IpVbF+ubQa3R78EjKB9njT6TQOlcK5rFKBVVtdfg==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-html/-/eslint-plugin-html-8.0.0.tgz", + "integrity": "sha512-NINLBAXM3mLa3k5Ezr/kNLHAJJwbot6lS7Ro+SUftDw4cA51KMmcDuCf98GP6Q6kTVPY1hIggzskxAdxfUPXSA==", "dev": true, "dependencies": { - "htmlparser2": "^8.0.1" + "htmlparser2": "^9.1.0" + }, + "engines": { + "node": ">=16.0.0" } }, "node_modules/eslint-plugin-sonarjs": { @@ -841,9 +879,9 @@ } }, "node_modules/eslint-plugin-unicorn": { - "version": "50.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-50.0.1.tgz", - "integrity": "sha512-KxenCZxqSYW0GWHH18okDlOQcpezcitm5aOSz6EnobyJ6BIByiPDviQRjJIUAjG/tMN11958MxaQ+qCoU6lfDA==", + "version": "51.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-51.0.1.tgz", + "integrity": "sha512-MuR/+9VuB0fydoI0nIn2RDA5WISRn4AsJyNSaNKLVwie9/ONvQhxOBbkfSICBPnzKrB77Fh6CZZXjgTt/4Latw==", "dev": true, "dependencies": { "@babel/helper-validator-identifier": "^7.22.20", @@ -901,6 +939,21 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/eslint/node_modules/globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/espree": { "version": "9.6.1", "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", @@ -979,9 +1032,9 @@ "dev": true }, "node_modules/fastq": { - "version": "1.16.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.16.0.tgz", - "integrity": "sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==", + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", "dev": true, "dependencies": { "reusify": "^1.0.4" @@ -1083,15 +1136,12 @@ } }, "node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", "dev": true, - "dependencies": { - "type-fest": "^0.20.2" - }, "engines": { - "node": ">=8" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -1113,9 +1163,9 @@ } }, "node_modules/hasown": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", - "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.1.tgz", + "integrity": "sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA==", "dev": true, "dependencies": { "function-bind": "^1.1.2" @@ -1131,9 +1181,9 @@ "dev": true }, "node_modules/htmlparser2": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.2.tgz", - "integrity": "sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-9.1.0.tgz", + "integrity": "sha512-5zfg6mHUoaer/97TxnGpxmbR7zJtPwIYFMZ/H5ucTlPZhKvtum05yiPK3Mgai3a0DyVxv7qYqoweaEd2nrYQzQ==", "dev": true, "funding": [ "https://github.com/fb55/htmlparser2?sponsor=1", @@ -1145,14 +1195,14 @@ "dependencies": { "domelementtype": "^2.3.0", "domhandler": "^5.0.3", - "domutils": "^3.0.1", - "entities": "^4.4.0" + "domutils": "^3.1.0", + "entities": "^4.5.0" } }, "node_modules/ignore": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz", - "integrity": "sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", + "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", "dev": true, "engines": { "node": ">= 4" @@ -1840,9 +1890,9 @@ } }, "node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -1886,9 +1936,9 @@ } }, "node_modules/spdx-exceptions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", - "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.4.0.tgz", + "integrity": "sha512-hcjppoJ68fhxA/cjbN4T8N6uCUejN8yFw69ttpqtBeCbF3u13n7mb31NB9jKwGTTWWnt9IbRA/mf1FprYS8wfw==", "dev": true }, "node_modules/spdx-expression-parse": { @@ -1902,9 +1952,9 @@ } }, "node_modules/spdx-license-ids": { - "version": "3.0.16", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.16.tgz", - "integrity": "sha512-eWN+LnM3GR6gPu35WxNgbGl8rmY1AEmoMDvL/QD6zYmPWgywxWqJWNdLGT+ke8dKNWrcYgYjPpG5gbTfghP8rw==", + "version": "3.0.17", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.17.tgz", + "integrity": "sha512-sh8PWc/ftMqAAdFiBu6Fy6JUOYjqDJBJvIhpfDMyHrr0Rbp5liZqd4TjtQ/RgfLjKFZb+LMx5hpml5qOWy0qvg==", "dev": true }, "node_modules/strip-ansi": { diff --git a/package.json b/package.json index ca618b8..2f1ba82 100644 --- a/package.json +++ b/package.json @@ -13,9 +13,11 @@ "devDependencies": { "@html-eslint/eslint-plugin": "^0.23.1", "@html-eslint/parser": "^0.23.0", + "@stylistic/eslint-plugin-js": "^1.6.1", "eslint": "^8.56.0", - "eslint-plugin-html": "^7.1.0", + "eslint-plugin-html": "^8.0.0", "eslint-plugin-sonarjs": "^0.23.0", - "eslint-plugin-unicorn": "^50.0.1" + "eslint-plugin-unicorn": "^51.0.1", + "globals": "^14.0.0" } }