From 9b6ef8dcfe1a127fc0563a1c691a49498534c292 Mon Sep 17 00:00:00 2001 From: James Garbutt <43081j@users.noreply.github.com> Date: Fri, 27 Dec 2024 11:40:17 +0000 Subject: [PATCH] chore: upgrade to eslint 9.x Upgrades ESLint and moves to the new flat config style. Also fixes up some newly found lint errors/warnings and enables TSESLint's strict config. --- .eslintignore | 7 - .eslintrc.cjs | 407 ------------ assets/js/showdown-extensions.mjs | 8 +- eslint.config.js | 430 ++++++++++++ notebook/color-notebook.js | 7 +- package-lock.json | 1023 ++++++++++++++++------------- package.json | 8 +- src/ColorSpace.js | 1 + src/color.js | 4 +- src/hooks.js | 4 +- src/spaces/luv.js | 2 +- src/types.d.ts | 2 +- 12 files changed, 1002 insertions(+), 901 deletions(-) delete mode 100644 .eslintignore delete mode 100644 .eslintrc.cjs create mode 100644 eslint.config.js diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 973a63c82..000000000 --- a/.eslintignore +++ /dev/null @@ -1,7 +0,0 @@ -!.* -assets/js/prism.js -api/ -/dist/ -docs/ -types/src/ -node_modules/ diff --git a/.eslintrc.cjs b/.eslintrc.cjs deleted file mode 100644 index cd50c6a0e..000000000 --- a/.eslintrc.cjs +++ /dev/null @@ -1,407 +0,0 @@ -module.exports = { - "root": true, - "parser": "@typescript-eslint/parser", - "parserOptions": { - "sourceType": "module", - "ecmaFeatures": { - "impliedStrict": true, - }, - }, - "env": { - "browser": true, - "es2020": true, - }, - "plugins": ["@typescript-eslint", "@stylistic"], - "rules": { - /** - * ESLint rules: https://eslint.org/docs/latest/rules/ - * Based off of: https://github.com/eslint/eslint/blob/v8.54.0/packages/js/src/configs/eslint-recommended.js - */ - // Require `super()` calls in constructors - // https://eslint.org/docs/latest/rules/constructor-super - "constructor-super": 1, - // Enforce curly braces for all control statements - // https://eslint.org/docs/latest/rules/curly - "curly": 1, - // Enforce “for” loop update clause moving the counter in the right direction - // https://eslint.org/docs/latest/rules/for-direction - "for-direction": 1, - // Enforce `return` statements in getters - // https://eslint.org/docs/latest/rules/getter-return - "getter-return": 1, - // Disallow using an async function as a Promise executor - // https://eslint.org/docs/latest/rules/no-async-promise-executor - "no-async-promise-executor": 1, - // Disallow `let`/const`/function`/`class` in `case`/`default` clauses - // https://eslint.org/docs/latest/rules/no-case-declarations - "no-case-declarations": 1, - // Disallow reassigning class members - // https://eslint.org/docs/latest/rules/no-class-assign - "no-class-assign": 1, - // Disallow comparing against -0 - // https://eslint.org/docs/latest/rules/no-compare-neg-zero - "no-compare-neg-zero": 1, - // Disallow reassigning `const` variables - // https://eslint.org/docs/latest/rules/no-const-assign - "no-const-assign": 1, - // Disallow constant expressions in conditions - // https://eslint.org/docs/latest/rules/no-constant-condition - "no-constant-condition": 1, - // Disallow control characters in regular expressions - // https://eslint.org/docs/latest/rules/no-control-regex - "no-control-regex": 1, - // Disallow the use of `debugger` - // https://eslint.org/docs/latest/rules/no-debugger - "no-debugger": 1, - // Disallow deleting variables - // https://eslint.org/docs/latest/rules/no-delete-var - "no-delete-var": 1, - // Disallow duplicate arguments in `function` definitions - // https://eslint.org/docs/latest/rules/no-dupe-args - "no-dupe-args": 1, - // Disallow duplicate class members - // https://eslint.org/docs/latest/rules/no-dupe-class-members - "no-dupe-class-members": 1, - // Disallow duplicate conditions in if-else-if chains - // https://eslint.org/docs/latest/rules/no-dupe-else-if - "no-dupe-else-if": 1, - // Disallow duplicate keys in object literals - // https://eslint.org/docs/latest/rules/no-dupe-keys - "no-dupe-keys": 1, - // Disallow duplicate case labels - // https://eslint.org/docs/latest/rules/no-duplicate-case - "no-duplicate-case": 1, - // Disallow empty character classes in regular expressions - // https://eslint.org/docs/latest/rules/no-empty-character-class - "no-empty-character-class": 1, - // Disallow empty destructuring patterns - // https://eslint.org/docs/latest/rules/no-empty-pattern - "no-empty-pattern": 1, - // Disallow reassigning exceptions in `catch` clauses - // https://eslint.org/docs/latest/rules/no-ex-assign - "no-ex-assign": 1, - // Disallow unnecessary boolean casts - // https://eslint.org/docs/latest/rules/no-extra-boolean-cast - "no-extra-boolean-cast": 1, - // Disallow fallthrough of `case` statements - // unless marked with a comment that matches `/falls?\s?through/i` regex - // https://eslint.org/docs/latest/rules/no-fallthrough - "no-fallthrough": 1, - // Disallow reassigning `function` declarations - // https://eslint.org/docs/latest/rules/no-func-assign - "no-func-assign": 1, - // Disallow assignments to native objects or read-only global variables - // https://eslint.org/docs/latest/rules/no-global-assign - "no-global-assign": 1, - // Disallow assigning to imported bindings - // https://eslint.org/docs/latest/rules/no-import-assign - "no-import-assign": 1, - // Disallow invalid regular expression strings in `RegExp` constructors - // https://eslint.org/docs/latest/rules/no-invalid-regexp - "no-invalid-regexp": 1, - // Disallow whitespace that is not `tab` or `space` except in string literals - // https://eslint.org/docs/latest/rules/no-irregular-whitespace - "no-irregular-whitespace": 1, - // Disallow characters which are made with multiple code points in character class syntax - // https://eslint.org/docs/latest/rules/no-misleading-character-class - "no-misleading-character-class": 1, - // Disallow `new` operators with the `Symbol` object - // https://eslint.org/docs/latest/rules/no-new-symbol - "no-new-symbol": 1, - // Disallow `\8` and `\9` escape sequences in string literals - // https://eslint.org/docs/latest/rules/no-nonoctal-decimal-escape - "no-nonoctal-decimal-escape": 1, - // Disallow calling global object properties as functions - // https://eslint.org/docs/latest/rules/no-obj-calls - "no-obj-calls": 1, - // Disallow octal literals - // https://eslint.org/docs/latest/rules/no-octal - "no-octal": 1, - // Disallow calling some `Object.prototype` methods directly on objects - // https://eslint.org/docs/latest/rules/no-prototype-builtins - "no-prototype-builtins": 1, - // Disallow multiple spaces in regular expressions - // https://eslint.org/docs/latest/rules/no-regex-spaces - "no-regex-spaces": 1, - // Disallow assignments where both sides are exactly the same - // https://eslint.org/docs/latest/rules/no-self-assign - "no-self-assign": 1, - // Disallow identifiers from shadowing restricted names - // https://eslint.org/docs/latest/rules/no-shadow-restricted-names - "no-shadow-restricted-names": 1, - // Disallow `this`/`super` before calling `super()` in constructors - // https://eslint.org/docs/latest/rules/no-this-before-super - "no-this-before-super": 1, - // Disallow the use of undeclared variables unless mentioned in `/*global */` comments - // https://eslint.org/docs/latest/rules/no-undef - // TODO: At-risk; subject to change. - "no-undef": 1, - // Disallow confusing multiline expressions - // https://eslint.org/docs/latest/rules/no-unexpected-multiline - // TODO: At-risk; subject to change. - "no-unexpected-multiline": 1, - // Disallow unreachable code after `return`, `throw`, `continue`, and `break` statements - // https://eslint.org/docs/latest/rules/no-unreachable - "no-unreachable": 1, - // Disallow control flow statements in `finally` blocks - // https://eslint.org/docs/latest/rules/no-unsafe-finally - "no-unsafe-finally": 1, - // Disallow negating the left operand of relational operators - // https://eslint.org/docs/latest/rules/no-unsafe-negation - "no-unsafe-negation": 1, - // Disallow use of optional chaining in contexts where the `undefined` value is not allowed - // https://eslint.org/docs/latest/rules/no-unsafe-optional-chaining - "no-unsafe-optional-chaining": 1, - // Disallow unused labels - // https://eslint.org/docs/latest/rules/no-unused-labels - "no-unused-labels": 1, - // Disallow useless backreferences in regular expressions - // https://eslint.org/docs/latest/rules/no-useless-backreference - "no-useless-backreference": 1, - // Disallow unnecessary calls to `.call()` and `.apply()` - // https://eslint.org/docs/latest/rules/no-useless-call - "no-useless-call": 1, - // Disallow unnecessary `catch` clauses - // https://eslint.org/docs/latest/rules/no-useless-catch - "no-useless-catch": 1, - // Disallow unnecessary escape characters - // https://eslint.org/docs/latest/rules/no-useless-escape - "no-useless-escape": 1, - // Disallow `with` statements - // https://eslint.org/docs/latest/rules/no-with - "no-with": 1, - // Require generator functions to contain `yield` - // https://eslint.org/docs/latest/rules/require-yield - "require-yield": 1, - // Require calls to `isNaN()` when checking for `NaN` - // https://eslint.org/docs/latest/rules/use-isnan - "use-isnan": 1, - // Enforce comparing `typeof` expressions against valid strings - // https://eslint.org/docs/latest/rules/valid-typeof - "valid-typeof": 1, - - /** - * ESLint Stylistic rules: https://eslint.style/packages/default#rules - */ - // Enforce a space before and after `=>` in arrow functions - // https://eslint.style/rules/default/arrow-spacing - "@stylistic/arrow-spacing": 1, - // Enforce consistent brace style for blocks - // https://eslint.style/rules/default/brace-style - "@stylistic/brace-style": [1, "stroustrup"], - // Enforce trailing commas unless closing `]` or `}` is on the same line - // https://eslint.style/rules/default/comma-dangle - "@stylistic/comma-dangle": [1, "always-multiline"], - // Enforce no space before and one or more spaces after a comma - // https://eslint.style/rules/default/comma-spacing - "@stylistic/comma-spacing": 1, - // Require newline at the end of files - // https://eslint.style/rules/default/eol-last - "@stylistic/eol-last": 1, - // Enforce consistent indentation - // https://eslint.style/rules/default/indent - "@stylistic/indent": [1, "tab", { "SwitchCase": 1, "outerIIFEBody": 0 }], - // Enforce consistent spacing before and after keywords - // https://eslint.style/rules/default/keyword-spacing - "@stylistic/keyword-spacing": 1, - // Disallow unnecessary semicolons - // https://eslint.style/rules/default/no-extra-semi - "@stylistic/no-extra-semi": 1, - // Disallow mixed spaces and tabs for indentation - // https://eslint.style/rules/default/no-mixed-spaces-and-tabs - "@stylistic/no-mixed-spaces-and-tabs": [1, "smart-tabs"], - // Disallow trailing whitespace at the end of lines - // https://eslint.style/rules/default/no-trailing-spaces - "@stylistic/no-trailing-spaces": 1, - // Enforce the consistent use of double quotes - // https://eslint.style/rules/default/quotes - "@stylistic/quotes": [ - 1, - "double", - { "avoidEscape": true, "allowTemplateLiterals": true }, - ], - // Require semicolons instead of ASI - // https://eslint.style/rules/default/semi - "@stylistic/semi": 1, - // Enforce at least one space before blocks - // https://eslint.style/rules/default/space-before-blocks - "@stylistic/space-before-blocks": 1, - // Enforce a space before `function` definition opening parenthesis - // https://eslint.style/rules/default/space-before-function-paren - "@stylistic/space-before-function-paren": 1, - // Require spaces around infix operators (e.g. `+`, `=`, `?`, `:`) - // https://eslint.style/rules/default/space-infix-ops - "@stylistic/space-infix-ops": 1, - // Enforce a space after unary word operators (`new`, `delete`, `typeof`, `void`, `yield`) - // https://eslint.style/rules/default/space-unary-ops - "@stylistic/space-unary-ops": 1, - // Enforce whitespace after the `//` or `/*` in a comment - // https://eslint.style/rules/default/spaced-comment - "@stylistic/spaced-comment": [ - 1, - "always", - { "block": { "exceptions": ["*"] } }, - ], - - /** - * typescript-eslint rules: https://typescript-eslint.io/rules/ - * Based off of: https://github.com/typescript-eslint/typescript-eslint/blob/v6.13.1/packages/eslint-plugin/src/configs/recommended.ts - */ - // Disallow `@ts-` comments - // https://typescript-eslint.io/rules/ban-ts-comment - "@typescript-eslint/ban-ts-comment": 1, - // Disallow certain built-in types - // https://typescript-eslint.io/rules/ban-types - "@typescript-eslint/ban-types": [ - 1, - { - extendDefaults: true, - types: { "{}": false }, - }, - ], - // Disallow generic `Array` constructors - // https://typescript-eslint.io/rules/no-array-constructor - "@typescript-eslint/no-array-constructor": 1, - // Disallow duplicate enum member values - // https://typescript-eslint.io/rules/no-duplicate-enum-values - "@typescript-eslint/no-duplicate-enum-values": 1, - // Disallow extra non-null assertions - // https://typescript-eslint.io/rules/no-extra-non-null-assertion - "@typescript-eslint/no-extra-non-null-assertion": 1, - // Enforce valid definition of `new` and `constructor` - // https://typescript-eslint.io/rules/no-misused-new - "@typescript-eslint/no-misused-new": 1, - // Disallow TypeScript namespaces - // https://typescript-eslint.io/rules/no-namespace - "@typescript-eslint/no-namespace": 1, - // Disallow non-null assertions after an optional chain expression - // https://typescript-eslint.io/rules/no-non-null-asserted-optional-chain - "@typescript-eslint/no-non-null-asserted-optional-chain": 1, - // Disallow aliasing `this` - // https://typescript-eslint.io/rules/no-this-alias - "@typescript-eslint/no-this-alias": 1, - // Disallow unnecessary constraints on generic types - // https://typescript-eslint.io/rules/no-unnecessary-type-constraint - "@typescript-eslint/no-unnecessary-type-constraint": 1, - // Disallow unsafe declaration merging - // https://typescript-eslint.io/rules/no-unsafe-declaration-merging - "@typescript-eslint/no-unsafe-declaration-merging": 1, - // Disallow `require` statements except in import statements - // https://typescript-eslint.io/rules/no-var-requires - "@typescript-eslint/no-var-requires": 1, - // Enforce the use of `as const` over literal type - // https://typescript-eslint.io/rules/prefer-as-const - "@typescript-eslint/prefer-as-const": 1, - // Disallow certain triple slash directives in favor of ES6-style import declarations - // https://typescript-eslint.io/rules/triple-slash-reference - "@typescript-eslint/triple-slash-reference": 1, - - /** - * Based off of: https://github.com/typescript-eslint/typescript-eslint/blob/v6.13.1/packages/eslint-plugin/src/configs/stylistic.ts - */ - // Require that function overload signatures be consecutive - // https://typescript-eslint.io/rules/adjacent-overload-signatures - "@typescript-eslint/adjacent-overload-signatures": 1, - // Require consistently using `T[]` for arrays instead of `Array` - // https://typescript-eslint.io/rules/array-type - "@typescript-eslint/array-type": 1, - // Disallow `// tslint:` comments - // https://typescript-eslint.io/rules/ban-tslint-comment - "@typescript-eslint/ban-tslint-comment": 1, - // Enforce that literals on classes are exposed in a consistent style - // https://typescript-eslint.io/rules/class-literal-property-style - "@typescript-eslint/class-literal-property-style": 1, - // Enforce specifying generic type arguments on type annotation or constructor name of a constructor call - // https://typescript-eslint.io/rules/consistent-generic-constructors - "@typescript-eslint/consistent-generic-constructors": 1, - // Require the `Record` type instead of index signatures - // https://typescript-eslint.io/rules/consistent-indexed-object-style - "@typescript-eslint/consistent-indexed-object-style": 1, - // Enforce consistent usage of type assertions - // https://typescript-eslint.io/rules/consistent-type-assertions - "@typescript-eslint/consistent-type-assertions": 1, - // Enforce type definitions to consistently use `interface` instead of `type` - // https://typescript-eslint.io/rules/consistent-type-definitions - "@typescript-eslint/consistent-type-definitions": 1, - // Disallow non-null assertion in locations that may be confusing - // https://typescript-eslint.io/rules/no-confusing-non-null-assertion - "@typescript-eslint/no-confusing-non-null-assertion": 1, - // Disallow the declaration of empty interfaces - // https://typescript-eslint.io/rules/no-empty-interface - "@typescript-eslint/no-empty-interface": 1, - // Disallow explicit type declarations for variables or parameters initialized to a number, string, or boolean - // https://typescript-eslint.io/rules/no-inferrable-types - "@typescript-eslint/no-inferrable-types": 1, - // Enforce the use of `for-of` loop over the standard `for` loop where possible - // https://typescript-eslint.io/rules/prefer-for-of - "@typescript-eslint/prefer-for-of": 1, - // Enforce using function types instead of interfaces with call signatures - // https://typescript-eslint.io/rules/prefer-function-type - "@typescript-eslint/prefer-function-type": 1, - // Require using `namespace` keyword over `module` keyword to declare custom TypeScript modules - // https://typescript-eslint.io/rules/prefer-namespace-keyword - "@typescript-eslint/prefer-namespace-keyword": 1, - }, - "overrides": [ - { - // Based off of: https://github.com/typescript-eslint/typescript-eslint/blob/v6.13.1/packages/eslint-plugin/src/configs/eslint-recommended.ts - files: ["*.ts"], - rules: { - // Disable ESLint rules already handled by TypeScript - "constructor-super": 0, // ts(2335) & ts(2377) - "getter-return": 0, // ts(2378) - "no-const-assign": 0, // ts(2588) - "no-dupe-args": 0, // ts(2300) - "no-dupe-class-members": 0, // ts(2393) & ts(2300) - "no-dupe-keys": 0, // ts(1117) - "no-func-assign": 0, // ts(2630) - "no-import-assign": 0, // ts(2632) & ts(2540) - "no-new-symbol": 0, // ts(7009) - "no-obj-calls": 0, // ts(2349) - "no-redeclare": 0, // ts(2451) - "no-setter-return": 0, // ts(2408) - "no-this-before-super": 0, // ts(2376) & ts(17009) - "no-undef": 0, // ts(2304) & ts(2552) - "no-unreachable": 0, // ts(7027) - "no-unsafe-negation": 0, // ts(2365) & ts(2322) & ts(2358) - - // Enable ESLint rules that make sense in TypeScript files - "no-var": 1, // ts transpiles let/const to var, so no need for vars any more - "prefer-const": 1, // ts provides better types with const - "prefer-rest-params": 1, // ts provides better types with rest args over arguments - "prefer-spread": 1, // ts transpiles spread to apply, so no need for manual apply - }, - }, - { - "files": [ - "assets/**/*", - "get/**/*", - "notebook/**/*", - "scripts/**/*", - "tests/**/*", - ], - "rules": { - // These directories reference implicit global variables - "no-undef": 0, - }, - }, - { - "files": ["*.cjs"], - "env": { - "browser": false, - "node": true, - }, - "rules": { - // Allow `require()` usage in CJS files - "@typescript-eslint/no-var-requires": 0, - }, - }, - { - "files": ["types/test/**/*"], - "rules": { - // Allow `@ts-expect-error` comments in TypeScript test files - "@typescript-eslint/ban-ts-comment": 0, - }, - }, - ], -}; diff --git a/assets/js/showdown-extensions.mjs b/assets/js/showdown-extensions.mjs index 2929458ce..7ab2b3715 100644 --- a/assets/js/showdown-extensions.mjs +++ b/assets/js/showdown-extensions.mjs @@ -3,16 +3,16 @@ const extensions = { type: "lang", regex: /`([Cc]olor).(\w+)\(\)`/g, replace: ($0, className, funcName) => { - return `${$0}`; - } + return `${$0}`; + }, }, "callouts": { type: "lang", regex: /^\s*(Tip|Warning|Note):\s+/gm, replace: ($0, className, funcName) => { return `

`; - } - } + }, + }, }; export default extensions; diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 000000000..a4be5cc67 --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,430 @@ +import eslintConfig from "@eslint/js"; +import { configs as tseslintConfigs } from "typescript-eslint"; +import * as globals from "globals"; +import stylistic from "@stylistic/eslint-plugin"; + +export default [ + { + ignores: [ + "!.*", + "assets/js/prism.js", + "api/", + "/dist/", + "docs/", + "types/src/", + ], + }, + eslintConfig.configs.recommended, + ...tseslintConfigs.strict, + { + plugins: { + "@stylistic": stylistic, + }, + languageOptions: { + globals: { + ...globals.browser, + }, + }, + }, + { + rules: { + /** + * ESLint rules: https://eslint.org/docs/latest/rules/ + * Based off of: https://github.com/eslint/eslint/blob/v8.54.0/packages/js/src/configs/eslint-recommended.js + */ + // Require `super()` calls in constructors + // https://eslint.org/docs/latest/rules/constructor-super + "constructor-super": 1, + // Enforce curly braces for all control statements + // https://eslint.org/docs/latest/rules/curly + "curly": 1, + // Enforce “for” loop update clause moving the counter in the right direction + // https://eslint.org/docs/latest/rules/for-direction + "for-direction": 1, + // Enforce `return` statements in getters + // https://eslint.org/docs/latest/rules/getter-return + "getter-return": 1, + // Disallow using an async function as a Promise executor + // https://eslint.org/docs/latest/rules/no-async-promise-executor + "no-async-promise-executor": 1, + // Disallow `let`/const`/function`/`class` in `case`/`default` clauses + // https://eslint.org/docs/latest/rules/no-case-declarations + "no-case-declarations": 1, + // Disallow reassigning class members + // https://eslint.org/docs/latest/rules/no-class-assign + "no-class-assign": 1, + // Disallow comparing against -0 + // https://eslint.org/docs/latest/rules/no-compare-neg-zero + "no-compare-neg-zero": 1, + // Disallow reassigning `const` variables + // https://eslint.org/docs/latest/rules/no-const-assign + "no-const-assign": 1, + // Disallow constant expressions in conditions + // https://eslint.org/docs/latest/rules/no-constant-condition + "no-constant-condition": 1, + // Disallow control characters in regular expressions + // https://eslint.org/docs/latest/rules/no-control-regex + "no-control-regex": 1, + // Disallow the use of `debugger` + // https://eslint.org/docs/latest/rules/no-debugger + "no-debugger": 1, + // Disallow deleting variables + // https://eslint.org/docs/latest/rules/no-delete-var + "no-delete-var": 1, + // Disallow duplicate arguments in `function` definitions + // https://eslint.org/docs/latest/rules/no-dupe-args + "no-dupe-args": 1, + // Disallow duplicate class members + // https://eslint.org/docs/latest/rules/no-dupe-class-members + "no-dupe-class-members": 1, + // Disallow duplicate conditions in if-else-if chains + // https://eslint.org/docs/latest/rules/no-dupe-else-if + "no-dupe-else-if": 1, + // Disallow duplicate keys in object literals + // https://eslint.org/docs/latest/rules/no-dupe-keys + "no-dupe-keys": 1, + // Disallow duplicate case labels + // https://eslint.org/docs/latest/rules/no-duplicate-case + "no-duplicate-case": 1, + // Allow empty blocks in catches + "no-empty": [1, {allowEmptyCatch: true}], + // Disallow empty character classes in regular expressions + // https://eslint.org/docs/latest/rules/no-empty-character-class + "no-empty-character-class": 1, + // Disallow empty destructuring patterns + // https://eslint.org/docs/latest/rules/no-empty-pattern + "no-empty-pattern": 1, + // Disallow reassigning exceptions in `catch` clauses + // https://eslint.org/docs/latest/rules/no-ex-assign + "no-ex-assign": 1, + // Disallow unnecessary boolean casts + // https://eslint.org/docs/latest/rules/no-extra-boolean-cast + "no-extra-boolean-cast": 1, + // Disallow fallthrough of `case` statements + // unless marked with a comment that matches `/falls?\s?through/i` regex + // https://eslint.org/docs/latest/rules/no-fallthrough + "no-fallthrough": 1, + // Disallow reassigning `function` declarations + // https://eslint.org/docs/latest/rules/no-func-assign + "no-func-assign": 1, + // Disallow assignments to native objects or read-only global variables + // https://eslint.org/docs/latest/rules/no-global-assign + "no-global-assign": 1, + // Disallow assigning to imported bindings + // https://eslint.org/docs/latest/rules/no-import-assign + "no-import-assign": 1, + // Disallow invalid regular expression strings in `RegExp` constructors + // https://eslint.org/docs/latest/rules/no-invalid-regexp + "no-invalid-regexp": 1, + // Disallow whitespace that is not `tab` or `space` except in string literals + // https://eslint.org/docs/latest/rules/no-irregular-whitespace + "no-irregular-whitespace": 1, + // Allow lossy precision in numbers + "no-loss-of-precision": 0, + // Disallow characters which are made with multiple code points in character class syntax + // https://eslint.org/docs/latest/rules/no-misleading-character-class + "no-misleading-character-class": 1, + // Disallow `new` operators with the `Symbol` object + // https://eslint.org/docs/latest/rules/no-new-symbol + "no-new-symbol": 1, + // Disallow `\8` and `\9` escape sequences in string literals + // https://eslint.org/docs/latest/rules/no-nonoctal-decimal-escape + "no-nonoctal-decimal-escape": 1, + // Disallow calling global object properties as functions + // https://eslint.org/docs/latest/rules/no-obj-calls + "no-obj-calls": 1, + // Disallow octal literals + // https://eslint.org/docs/latest/rules/no-octal + "no-octal": 1, + // Disallow calling some `Object.prototype` methods directly on objects + // https://eslint.org/docs/latest/rules/no-prototype-builtins + "no-prototype-builtins": 1, + // Disallow multiple spaces in regular expressions + // https://eslint.org/docs/latest/rules/no-regex-spaces + "no-regex-spaces": 1, + // Disallow assignments where both sides are exactly the same + // https://eslint.org/docs/latest/rules/no-self-assign + "no-self-assign": 1, + // Disallow identifiers from shadowing restricted names + // https://eslint.org/docs/latest/rules/no-shadow-restricted-names + "no-shadow-restricted-names": 1, + // Allow sparse arrays (e.g. `[, 1, 2]`) + "no-sparse-arrays": 0, + // Disallow `this`/`super` before calling `super()` in constructors + // https://eslint.org/docs/latest/rules/no-this-before-super + "no-this-before-super": 1, + // Disallow the use of undeclared variables unless mentioned in `/*global */` comments + // https://eslint.org/docs/latest/rules/no-undef + // TODO: At-risk; subject to change. + "no-undef": 0, + // Disallow confusing multiline expressions + // https://eslint.org/docs/latest/rules/no-unexpected-multiline + // TODO: At-risk; subject to change. + "no-unexpected-multiline": 1, + // Disallow unreachable code after `return`, `throw`, `continue`, and `break` statements + // https://eslint.org/docs/latest/rules/no-unreachable + "no-unreachable": 1, + // Disallow control flow statements in `finally` blocks + // https://eslint.org/docs/latest/rules/no-unsafe-finally + "no-unsafe-finally": 1, + // Disallow negating the left operand of relational operators + // https://eslint.org/docs/latest/rules/no-unsafe-negation + "no-unsafe-negation": 1, + // Disallow use of optional chaining in contexts where the `undefined` value is not allowed + // https://eslint.org/docs/latest/rules/no-unsafe-optional-chaining + "no-unsafe-optional-chaining": 1, + // Disallow unused labels + // https://eslint.org/docs/latest/rules/no-unused-labels + "no-unused-labels": 1, + // Disallow useless backreferences in regular expressions + // https://eslint.org/docs/latest/rules/no-useless-backreference + "no-useless-backreference": 1, + // Disallow unnecessary calls to `.call()` and `.apply()` + // https://eslint.org/docs/latest/rules/no-useless-call + "no-useless-call": 1, + // Disallow unnecessary `catch` clauses + // https://eslint.org/docs/latest/rules/no-useless-catch + "no-useless-catch": 1, + // Disallow unnecessary escape characters + // https://eslint.org/docs/latest/rules/no-useless-escape + "no-useless-escape": 1, + // Disallow `with` statements + // https://eslint.org/docs/latest/rules/no-with + "no-with": 1, + // Require generator functions to contain `yield` + // https://eslint.org/docs/latest/rules/require-yield + "require-yield": 1, + // Require calls to `isNaN()` when checking for `NaN` + // https://eslint.org/docs/latest/rules/use-isnan + "use-isnan": 1, + // Enforce comparing `typeof` expressions against valid strings + // https://eslint.org/docs/latest/rules/valid-typeof + "valid-typeof": 1, + + /** + * ESLint Stylistic rules: https://eslint.style/packages/default#rules + */ + // Enforce a space before and after `=>` in arrow functions + // https://eslint.style/rules/default/arrow-spacing + "@stylistic/arrow-spacing": 1, + // Enforce consistent brace style for blocks + // https://eslint.style/rules/default/brace-style + "@stylistic/brace-style": [1, "stroustrup"], + // Enforce trailing commas unless closing `]` or `}` is on the same line + // https://eslint.style/rules/default/comma-dangle + "@stylistic/comma-dangle": [1, "always-multiline"], + // Enforce no space before and one or more spaces after a comma + // https://eslint.style/rules/default/comma-spacing + "@stylistic/comma-spacing": 1, + // Require newline at the end of files + // https://eslint.style/rules/default/eol-last + "@stylistic/eol-last": 1, + // Enforce consistent indentation + // https://eslint.style/rules/default/indent + "@stylistic/indent": [1, "tab", { "SwitchCase": 1, "outerIIFEBody": 0 }], + // Enforce consistent spacing before and after keywords + // https://eslint.style/rules/default/keyword-spacing + "@stylistic/keyword-spacing": 1, + // Disallow unnecessary semicolons + // https://eslint.style/rules/default/no-extra-semi + "@stylistic/no-extra-semi": 1, + // Disallow mixed spaces and tabs for indentation + // https://eslint.style/rules/default/no-mixed-spaces-and-tabs + "@stylistic/no-mixed-spaces-and-tabs": [1, "smart-tabs"], + // Disallow trailing whitespace at the end of lines + // https://eslint.style/rules/default/no-trailing-spaces + "@stylistic/no-trailing-spaces": 1, + // Enforce the consistent use of double quotes + // https://eslint.style/rules/default/quotes + "@stylistic/quotes": [ + 1, + "double", + { "avoidEscape": true, "allowTemplateLiterals": true }, + ], + // Require semicolons instead of ASI + // https://eslint.style/rules/default/semi + "@stylistic/semi": 1, + // Enforce at least one space before blocks + // https://eslint.style/rules/default/space-before-blocks + "@stylistic/space-before-blocks": 1, + // Enforce a space before `function` definition opening parenthesis + // https://eslint.style/rules/default/space-before-function-paren + "@stylistic/space-before-function-paren": 1, + // Require spaces around infix operators (e.g. `+`, `=`, `?`, `:`) + // https://eslint.style/rules/default/space-infix-ops + "@stylistic/space-infix-ops": 1, + // Enforce a space after unary word operators (`new`, `delete`, `typeof`, `void`, `yield`) + // https://eslint.style/rules/default/space-unary-ops + "@stylistic/space-unary-ops": 1, + // Enforce whitespace after the `//` or `/*` in a comment + // https://eslint.style/rules/default/spaced-comment + "@stylistic/spaced-comment": [ + 1, + "always", + { "block": { "exceptions": ["*"] } }, + ], + + /** + * typescript-eslint rules: https://typescript-eslint.io/rules/ + * Based off of: https://github.com/typescript-eslint/typescript-eslint/blob/v6.13.1/packages/eslint-plugin/src/configs/recommended.ts + */ + // Disallow `@ts-` comments + // https://typescript-eslint.io/rules/ban-ts-comment + "@typescript-eslint/ban-ts-comment": 1, + // Disallow certain built-in types + "@typescript-eslint/no-unsafe-function-type": 1, + "@typescript-eslint/no-wrapper-object-types": 1, + // Disallow generic `Array` constructors + // https://typescript-eslint.io/rules/no-array-constructor + "@typescript-eslint/no-array-constructor": 1, + // Disallow duplicate enum member values + // https://typescript-eslint.io/rules/no-duplicate-enum-values + "@typescript-eslint/no-duplicate-enum-values": 1, + // Allow use of the `any` type + "@typescript-eslint/no-explicit-any": 0, + // Disallow extra non-null assertions + // https://typescript-eslint.io/rules/no-extra-non-null-assertion + "@typescript-eslint/no-extra-non-null-assertion": 1, + // Enforce valid definition of `new` and `constructor` + // https://typescript-eslint.io/rules/no-misused-new + "@typescript-eslint/no-misused-new": 1, + // Disallow TypeScript namespaces + // https://typescript-eslint.io/rules/no-namespace + "@typescript-eslint/no-namespace": 1, + // Disallow non-null assertions after an optional chain expression + // https://typescript-eslint.io/rules/no-non-null-asserted-optional-chain + "@typescript-eslint/no-non-null-asserted-optional-chain": 1, + // Disallow aliasing `this` + // https://typescript-eslint.io/rules/no-this-alias + "@typescript-eslint/no-this-alias": 1, + // Disallow unnecessary constraints on generic types + // https://typescript-eslint.io/rules/no-unnecessary-type-constraint + "@typescript-eslint/no-unnecessary-type-constraint": 1, + // Disallow unsafe declaration merging + // https://typescript-eslint.io/rules/no-unsafe-declaration-merging + "@typescript-eslint/no-unsafe-declaration-merging": 1, + // Disallow `require` statements except in import statements + // https://typescript-eslint.io/rules/no-var-requires + "@typescript-eslint/no-var-requires": 1, + // Enforce the use of `as const` over literal type + // https://typescript-eslint.io/rules/prefer-as-const + "@typescript-eslint/prefer-as-const": 1, + // Disallow certain triple slash directives in favor of ES6-style import declarations + // https://typescript-eslint.io/rules/triple-slash-reference + "@typescript-eslint/triple-slash-reference": 1, + + /** + * Based off of: https://github.com/typescript-eslint/typescript-eslint/blob/v6.13.1/packages/eslint-plugin/src/configs/stylistic.ts + */ + // Require that function overload signatures be consecutive + // https://typescript-eslint.io/rules/adjacent-overload-signatures + "@typescript-eslint/adjacent-overload-signatures": 1, + // Require consistently using `T[]` for arrays instead of `Array` + // https://typescript-eslint.io/rules/array-type + "@typescript-eslint/array-type": 1, + // Disallow `// tslint:` comments + // https://typescript-eslint.io/rules/ban-tslint-comment + "@typescript-eslint/ban-tslint-comment": 1, + // Enforce that literals on classes are exposed in a consistent style + // https://typescript-eslint.io/rules/class-literal-property-style + "@typescript-eslint/class-literal-property-style": 1, + // Enforce specifying generic type arguments on type annotation or constructor name of a constructor call + // https://typescript-eslint.io/rules/consistent-generic-constructors + "@typescript-eslint/consistent-generic-constructors": 1, + // Require the `Record` type instead of index signatures + // https://typescript-eslint.io/rules/consistent-indexed-object-style + "@typescript-eslint/consistent-indexed-object-style": 1, + // Enforce consistent usage of type assertions + // https://typescript-eslint.io/rules/consistent-type-assertions + "@typescript-eslint/consistent-type-assertions": 1, + // Enforce type definitions to consistently use `interface` instead of `type` + // https://typescript-eslint.io/rules/consistent-type-definitions + "@typescript-eslint/consistent-type-definitions": 1, + // Disallow non-null assertion in locations that may be confusing + // https://typescript-eslint.io/rules/no-confusing-non-null-assertion + "@typescript-eslint/no-confusing-non-null-assertion": 1, + // Disallow the declaration of empty interfaces + // https://typescript-eslint.io/rules/no-empty-interface + "@typescript-eslint/no-empty-interface": 1, + // Disallow explicit type declarations for variables or parameters initialized to a number, string, or boolean + // https://typescript-eslint.io/rules/no-inferrable-types + "@typescript-eslint/no-inferrable-types": 1, + // Enforce the use of `for-of` loop over the standard `for` loop where possible + // https://typescript-eslint.io/rules/prefer-for-of + "@typescript-eslint/prefer-for-of": 1, + // Enforce using function types instead of interfaces with call signatures + // https://typescript-eslint.io/rules/prefer-function-type + "@typescript-eslint/prefer-function-type": 1, + // Require using `namespace` keyword over `module` keyword to declare custom TypeScript modules + // https://typescript-eslint.io/rules/prefer-namespace-keyword + "@typescript-eslint/prefer-namespace-keyword": 1, + // Allow unused vars since we have many of them + "@typescript-eslint/no-unused-vars": 0, + // Disable checks for unifiable signatures + "@typescript-eslint/unified-signatures": 0, + }, + }, + { + // Based off of: https://github.com/typescript-eslint/typescript-eslint/blob/v6.13.1/packages/eslint-plugin/src/configs/eslint-recommended.ts + files: ["**/*.ts"], + rules: { + // Disable ESLint rules already handled by TypeScript + "constructor-super": 0, // ts(2335) & ts(2377) + "getter-return": 0, // ts(2378) + "no-const-assign": 0, // ts(2588) + "no-dupe-args": 0, // ts(2300) + "no-dupe-class-members": 0, // ts(2393) & ts(2300) + "no-dupe-keys": 0, // ts(1117) + "no-func-assign": 0, // ts(2630) + "no-import-assign": 0, // ts(2632) & ts(2540) + "no-new-symbol": 0, // ts(7009) + "no-obj-calls": 0, // ts(2349) + "no-redeclare": 0, // ts(2451) + "no-setter-return": 0, // ts(2408) + "no-this-before-super": 0, // ts(2376) & ts(17009) + "no-undef": 0, // ts(2304) & ts(2552) + "no-unreachable": 0, // ts(7027) + "no-unsafe-negation": 0, // ts(2365) & ts(2322) & ts(2358) + + // Enable ESLint rules that make sense in TypeScript files + "no-var": 1, // ts transpiles let/const to var, so no need for vars any more + "prefer-const": 1, // ts provides better types with const + "prefer-rest-params": 1, // ts provides better types with rest args over arguments + "prefer-spread": 1, // ts transpiles spread to apply, so no need for manual apply + }, + }, + { + "files": [ + "assets/**/*", + "get/**/*", + "notebook/**/*", + "scripts/**/*", + "tests/**/*", + ], + "rules": { + // These directories reference implicit global variables + "no-undef": 0, + }, + }, + { + "files": ["**/*.cjs"], + languageOptions: { + globals: { + ...globals.node, + }, + }, + "rules": { + // Allow `require()` usage in CJS files + "@typescript-eslint/no-var-requires": 0, + }, + }, + { + "files": ["types/test/**/*"], + "rules": { + // Allow `@ts-expect-error` comments in TypeScript test files + "@typescript-eslint/ban-ts-comment": 0, + "@typescript-eslint/no-unused-expressions": 0, + "@typescript-eslint/no-extraneous-class": 0, + }, + }, +]; diff --git a/notebook/color-notebook.js b/notebook/color-notebook.js index fd63a48a0..7a6879152 100644 --- a/notebook/color-notebook.js +++ b/notebook/color-notebook.js @@ -189,6 +189,7 @@ export default class Notebook { this.code = this.pre.textContent; let value = this.code.trim().replace(/\s+$/m, ""); + let error; if (codes.get(pre) === value) { // We've already evaluated this @@ -202,7 +203,7 @@ export default class Notebook { } catch (e) { // Syntax error - var error = e; + error = e; } if (!error) { @@ -211,7 +212,7 @@ export default class Notebook { } catch (e) { // Syntax error in the rewritten code - var error = e; + error = e; } } @@ -370,6 +371,7 @@ export function walk (pre, callback, filter) { let walker = document.createTreeWalker(pre, filter); let node; + // eslint-disable-next-line no-cond-assign while (node = walker.nextNode()) { let ret = callback(node); @@ -390,6 +392,7 @@ function getNodeAt (offset, container, {type} = {}) { let node, sum = 0; let walk = document.createTreeWalker(container, NodeFilter.SHOW_TEXT); + // eslint-disable-next-line no-cond-assign while (node = walk.nextNode()) { sum += node.data.length; diff --git a/package-lock.json b/package-lock.json index d9f38cd5c..b917ba573 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,12 +18,11 @@ "@rollup/plugin-node-resolve": "^15.2.3", "@rollup/plugin-terser": "^0.4.4", "@stylistic/eslint-plugin": "latest", - "@typescript-eslint/eslint-plugin": "latest", - "@typescript-eslint/parser": "latest", "acorn": "latest", "brep": "^0.0.9", "core-js": "^3.36.0", "eslint": "latest", + "globals": "latest", "htest.dev": ">=0.0.14", "mathjs": "^12.4.0", "npm-run-all": "^4.1.5", @@ -31,7 +30,8 @@ "rollup": "^4.12.0", "typedoc": "^0.25.12", "typedoc-plugin-rename-defaults": "^0.7.0", - "typescript": "^5.3.3" + "typescript": "^5.3.3", + "typescript-eslint": "latest" }, "funding": { "type": "opencollective", @@ -1888,6 +1888,53 @@ "typescript": ">= 3.0.0-dev || >= 3.1.0-dev || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.7.0-dev || >= 3.8.0-dev || >= 3.9.0-dev || >= 4.0.0-dev || >=5.0.0-dev" } }, + "node_modules/@definitelytyped/dtslint/node_modules/@eslint/eslintrc": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@definitelytyped/dtslint/node_modules/@eslint/eslintrc/node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@definitelytyped/dtslint/node_modules/@eslint/js": { + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", + "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, "node_modules/@definitelytyped/dtslint/node_modules/@typescript-eslint/eslint-plugin": { "version": "5.62.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz", @@ -1997,6 +2044,33 @@ } } }, + "node_modules/@definitelytyped/dtslint/node_modules/@typescript-eslint/utils": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz", + "integrity": "sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@types/json-schema": "^7.0.9", + "@types/semver": "^7.3.12", + "@typescript-eslint/scope-manager": "5.62.0", + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/typescript-estree": "5.62.0", + "eslint-scope": "^5.1.1", + "semver": "^7.3.7" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, "node_modules/@definitelytyped/dtslint/node_modules/@typescript-eslint/visitor-keys": { "version": "5.62.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", @@ -2015,6 +2089,100 @@ "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@definitelytyped/dtslint/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@definitelytyped/dtslint/node_modules/eslint": { + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", + "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", + "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.1", + "@humanwhocodes/config-array": "^0.13.0", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@definitelytyped/dtslint/node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@definitelytyped/dtslint/node_modules/eslint-scope/node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, "node_modules/@definitelytyped/dtslint/node_modules/eslint-visitor-keys": { "version": "3.4.3", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", @@ -2028,6 +2196,150 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/@definitelytyped/dtslint/node_modules/eslint/node_modules/eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@definitelytyped/dtslint/node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@definitelytyped/dtslint/node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "license": "MIT", + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/@definitelytyped/dtslint/node_modules/flat-cache": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "dev": true, + "license": "MIT", + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/@definitelytyped/dtslint/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@definitelytyped/dtslint/node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/@definitelytyped/dtslint/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, + "license": "MIT", + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@definitelytyped/dtslint/node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@definitelytyped/dtslint/node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@definitelytyped/header-parser": { "version": "0.0.178", "resolved": "https://registry.npmjs.org/@definitelytyped/header-parser/-/header-parser-0.0.178.tgz", @@ -2121,72 +2433,66 @@ "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, - "node_modules/@eslint/eslintrc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", - "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "node_modules/@eslint/config-array": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.19.1.tgz", + "integrity": "sha512-fo6Mtm5mWyKjA/Chy1BYTdn5mGJoDNjC7C64ug20ADsRDGrA85bN3uK3MaKbeRkRuuIEAR5N33Jr1pbm411/PA==", "dev": true, - "license": "MIT", + "license": "Apache-2.0", "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" + "@eslint/object-schema": "^2.1.5", + "debug": "^4.3.1", + "minimatch": "^3.1.2" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, - "node_modules/@eslint/eslintrc/node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "node_modules/@eslint/core": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.9.1.tgz", + "integrity": "sha512-GuUdqkyyzQI5RMIWkHhvTWLCyLo1jNK3vzkSyaExH5kHPDHcuL2VOpHjmMY+y3+NC69qAKToBqldTBgYeLSr9Q==", "dev": true, "license": "Apache-2.0", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "dependencies": { + "@types/json-schema": "^7.0.15" }, - "funding": { - "url": "https://opencollective.com/eslint" + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, - "node_modules/@eslint/eslintrc/node_modules/espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "node_modules/@eslint/eslintrc": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.2.0.tgz", + "integrity": "sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w==", "dev": true, - "license": "BSD-2-Clause", + "license": "MIT", "dependencies": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^10.0.1", + "globals": "^14.0.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "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==", + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", "dev": true, "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, "engines": { - "node": ">=8" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -2201,31 +2507,79 @@ "engines": { "node": ">=8" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@eslint/js": { + "version": "9.17.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.17.0.tgz", + "integrity": "sha512-Sxc4hqcs1kTu0iID3kcZDW3JHq2a77HO9P8CP6YEA/FpH3Ll8UXE2r/86Rz9YJLKme39S9vU5OWNjC6Xl0Cr3w==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/object-schema": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.5.tgz", + "integrity": "sha512-o0bhxnL89h5Bae5T318nFoFzGy+YE5i/gGkoPAgkmTVdRKTiv3p8JHevPiPaMwoloKfEiiaHlawCqaZMqRm+XQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.4.tgz", + "integrity": "sha512-zSkKow6H5Kdm0ZUQUB2kV5JIXqoG0+uH5YADhaEHswm664N9Db8dXSi0nMJpacpMf+MyyglF1vnZohpEg5yUtg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "levn": "^0.4.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, - "node_modules/@eslint/eslintrc/node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "node_modules/@humanfs/core": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", "dev": true, - "license": "(MIT OR CC0-1.0)", + "license": "Apache-2.0", "engines": { - "node": ">=10" + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.6", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz", + "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.3.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "engines": { + "node": ">=18.18.0" } }, - "node_modules/@eslint/js": { - "version": "8.57.1", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", - "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", + "node_modules/@humanfs/node/node_modules/@humanwhocodes/retry": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", + "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", "dev": true, - "license": "MIT", + "license": "Apache-2.0", "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" } }, "node_modules/@humanwhocodes/config-array": { @@ -2266,6 +2620,20 @@ "dev": true, "license": "BSD-3-Clause" }, + "node_modules/@humanwhocodes/retry": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.1.tgz", + "integrity": "sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, "node_modules/@iarna/toml": { "version": "2.2.5", "resolved": "https://registry.npmjs.org/@iarna/toml/-/toml-2.2.5.tgz", @@ -3223,97 +3591,6 @@ "eslint": ">=8.40.0" } }, - "node_modules/@stylistic/eslint-plugin/node_modules/@typescript-eslint/types": { - "version": "8.18.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.18.2.tgz", - "integrity": "sha512-Z/zblEPp8cIvmEn6+tPDIHUbRu/0z5lqZ+NvolL5SvXWT5rQy7+Nch83M0++XzO0XrWRFWECgOAyE8bsJTl1GQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@stylistic/eslint-plugin/node_modules/@typescript-eslint/typescript-estree": { - "version": "8.18.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.18.2.tgz", - "integrity": "sha512-WXAVt595HjpmlfH4crSdM/1bcsqh+1weFRWIa9XMTx/XHZ9TCKMcr725tLYqWOgzKdeDrqVHxFotrvWcEsk2Tg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.18.2", - "@typescript-eslint/visitor-keys": "8.18.2", - "debug": "^4.3.4", - "fast-glob": "^3.3.2", - "is-glob": "^4.0.3", - "minimatch": "^9.0.4", - "semver": "^7.6.0", - "ts-api-utils": "^1.3.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <5.8.0" - } - }, - "node_modules/@stylistic/eslint-plugin/node_modules/@typescript-eslint/utils": { - "version": "8.18.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.18.2.tgz", - "integrity": "sha512-Cr4A0H7DtVIPkauj4sTSXVl+VBWewE9/o40KcF3TV9aqDEOWoXF3/+oRXNby3DYzZeCATvbdksYsGZzplwnK/Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.18.2", - "@typescript-eslint/types": "8.18.2", - "@typescript-eslint/typescript-estree": "8.18.2" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.8.0" - } - }, - "node_modules/@stylistic/eslint-plugin/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/@stylistic/eslint-plugin/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/@tootallnate/quickjs-emscripten": { "version": "0.23.0", "resolved": "https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz", @@ -3393,97 +3670,6 @@ "typescript": ">=4.8.4 <5.8.0" } }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/types": { - "version": "8.18.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.18.2.tgz", - "integrity": "sha512-Z/zblEPp8cIvmEn6+tPDIHUbRu/0z5lqZ+NvolL5SvXWT5rQy7+Nch83M0++XzO0XrWRFWECgOAyE8bsJTl1GQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/typescript-estree": { - "version": "8.18.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.18.2.tgz", - "integrity": "sha512-WXAVt595HjpmlfH4crSdM/1bcsqh+1weFRWIa9XMTx/XHZ9TCKMcr725tLYqWOgzKdeDrqVHxFotrvWcEsk2Tg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.18.2", - "@typescript-eslint/visitor-keys": "8.18.2", - "debug": "^4.3.4", - "fast-glob": "^3.3.2", - "is-glob": "^4.0.3", - "minimatch": "^9.0.4", - "semver": "^7.6.0", - "ts-api-utils": "^1.3.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <5.8.0" - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/utils": { - "version": "8.18.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.18.2.tgz", - "integrity": "sha512-Cr4A0H7DtVIPkauj4sTSXVl+VBWewE9/o40KcF3TV9aqDEOWoXF3/+oRXNby3DYzZeCATvbdksYsGZzplwnK/Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.18.2", - "@typescript-eslint/types": "8.18.2", - "@typescript-eslint/typescript-estree": "8.18.2" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.8.0" - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/@typescript-eslint/parser": { "version": "8.18.2", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.18.2.tgz", @@ -3673,30 +3859,6 @@ "typescript": ">=4.8.4 <5.8.0" } }, - "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/utils": { - "version": "8.18.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.18.2.tgz", - "integrity": "sha512-Cr4A0H7DtVIPkauj4sTSXVl+VBWewE9/o40KcF3TV9aqDEOWoXF3/+oRXNby3DYzZeCATvbdksYsGZzplwnK/Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.18.2", - "@typescript-eslint/types": "8.18.2", - "@typescript-eslint/typescript-estree": "8.18.2" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.8.0" - } - }, "node_modules/@typescript-eslint/type-utils/node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", @@ -3797,79 +3959,94 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz", - "integrity": "sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==", + "version": "8.18.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.18.2.tgz", + "integrity": "sha512-Cr4A0H7DtVIPkauj4sTSXVl+VBWewE9/o40KcF3TV9aqDEOWoXF3/+oRXNby3DYzZeCATvbdksYsGZzplwnK/Q==", "dev": true, "license": "MIT", "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@types/json-schema": "^7.0.9", - "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.62.0", - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/typescript-estree": "5.62.0", - "eslint-scope": "^5.1.1", - "semver": "^7.3.7" + "@eslint-community/eslint-utils": "^4.4.0", + "@typescript-eslint/scope-manager": "8.18.2", + "@typescript-eslint/types": "8.18.2", + "@typescript-eslint/typescript-estree": "8.18.2" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.8.0" } }, - "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/scope-manager": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz", - "integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==", + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/types": { + "version": "8.18.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.18.2.tgz", + "integrity": "sha512-Z/zblEPp8cIvmEn6+tPDIHUbRu/0z5lqZ+NvolL5SvXWT5rQy7+Nch83M0++XzO0XrWRFWECgOAyE8bsJTl1GQ==", "dev": true, "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "5.62.0", - "@typescript-eslint/visitor-keys": "5.62.0" - }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/visitor-keys": { - "version": "5.62.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", - "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/typescript-estree": { + "version": "8.18.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.18.2.tgz", + "integrity": "sha512-WXAVt595HjpmlfH4crSdM/1bcsqh+1weFRWIa9XMTx/XHZ9TCKMcr725tLYqWOgzKdeDrqVHxFotrvWcEsk2Tg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "5.62.0", - "eslint-visitor-keys": "^3.3.0" + "@typescript-eslint/types": "8.18.2", + "@typescript-eslint/visitor-keys": "8.18.2", + "debug": "^4.3.4", + "fast-glob": "^3.3.2", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^1.3.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <5.8.0" } }, - "node_modules/@typescript-eslint/utils/node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "node_modules/@typescript-eslint/utils/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, - "license": "Apache-2.0", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": ">=16 || 14 >=14.17" }, "funding": { - "url": "https://opencollective.com/eslint" + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/@typescript-eslint/visitor-keys": { @@ -6243,84 +6420,80 @@ } }, "node_modules/eslint": { - "version": "8.57.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", - "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", - "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", + "version": "9.17.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.17.0.tgz", + "integrity": "sha512-evtlNcpJg+cZLcnVKwsai8fExnqjGPicK7gnUtlNuzu+Fv9bI0aLpND5T44VLQtoMEnI57LoXO9XAkIXwohKrA==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.1", - "@humanwhocodes/config-array": "^0.13.0", + "@eslint-community/regexpp": "^4.12.1", + "@eslint/config-array": "^0.19.0", + "@eslint/core": "^0.9.0", + "@eslint/eslintrc": "^3.2.0", + "@eslint/js": "9.17.0", + "@eslint/plugin-kit": "^0.2.3", + "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", + "@humanwhocodes/retry": "^0.4.1", + "@types/estree": "^1.0.6", + "@types/json-schema": "^7.0.15", "ajv": "^6.12.4", "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", + "cross-spawn": "^7.0.6", "debug": "^4.3.2", - "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", + "eslint-scope": "^8.2.0", + "eslint-visitor-keys": "^4.2.0", + "espree": "^10.3.0", + "esquery": "^1.5.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", + "file-entry-cache": "^8.0.0", "find-up": "^5.0.0", "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" + "optionator": "^0.9.3" }, "bin": { "eslint": "bin/eslint.js" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://opencollective.com/eslint" + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } } }, "node_modules/eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.2.0.tgz", + "integrity": "sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==", "dev": true, "license": "BSD-2-Clause", "dependencies": { "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" + "estraverse": "^5.2.0" }, "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/eslint-scope/node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/eslint-visitor-keys": { @@ -6349,54 +6522,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/eslint/node_modules/eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint/node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint/node_modules/espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, "node_modules/eslint/node_modules/glob-parent": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", @@ -6410,35 +6535,6 @@ "node": ">=10.13.0" } }, - "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, - "license": "MIT", - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint/node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/esm-import-transformer": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/esm-import-transformer/-/esm-import-transformer-3.0.2.tgz", @@ -6705,16 +6801,16 @@ } }, "node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", "dev": true, "license": "MIT", "dependencies": { - "flat-cache": "^3.0.4" + "flat-cache": "^4.0.0" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=16.0.0" } }, "node_modules/filesize": { @@ -6794,57 +6890,17 @@ } }, "node_modules/flat-cache": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", - "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", "dev": true, "license": "MIT", "dependencies": { "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/flat-cache/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "keyv": "^4.5.4" }, "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/flat-cache/node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "deprecated": "Rimraf versions prior to v4 are no longer supported", - "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "node": ">=16" } }, "node_modules/flatted": { @@ -13288,6 +13344,29 @@ "node": ">=14.17" } }, + "node_modules/typescript-eslint": { + "version": "8.18.2", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.18.2.tgz", + "integrity": "sha512-KuXezG6jHkvC3MvizeXgupZzaG5wjhU3yE8E7e6viOvAvD9xAWYp8/vy0WULTGe9DYDWcQu7aW03YIV3mSitrQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.18.2", + "@typescript-eslint/parser": "8.18.2", + "@typescript-eslint/utils": "8.18.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.8.0" + } + }, "node_modules/uc.micro": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-2.1.0.tgz", diff --git a/package.json b/package.json index a5f904794..f0242f5b2 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "scripts": { "test": "npx htest ./test", "dtslint": "dtslint --expectOnly types", - "eslint": "eslint . --ext .js --ext .ts --ext .cjs", + "eslint": "eslint .", "lint": "run-s build:space-accessors \"eslint -- --fix\" build:ts dtslint", "lint:ci": "run-s build:space-accessors \"eslint -- --max-warnings 0\" build:ts dtslint", "build:html": "npx @11ty/eleventy --config=_build/eleventy.js", @@ -95,12 +95,11 @@ "@rollup/plugin-node-resolve": "^15.2.3", "@rollup/plugin-terser": "^0.4.4", "@stylistic/eslint-plugin": "latest", - "@typescript-eslint/eslint-plugin": "latest", - "@typescript-eslint/parser": "latest", "acorn": "latest", "brep": "^0.0.9", "core-js": "^3.36.0", "eslint": "latest", + "globals": "latest", "htest.dev": ">=0.0.14", "mathjs": "^12.4.0", "npm-run-all": "^4.1.5", @@ -108,7 +107,8 @@ "rollup": "^4.12.0", "typedoc": "^0.25.12", "typedoc-plugin-rename-defaults": "^0.7.0", - "typescript": "^5.3.3" + "typescript": "^5.3.3", + "typescript-eslint": "latest" }, "sideEffects": [ "./src/index.js", diff --git a/src/ColorSpace.js b/src/ColorSpace.js index a73bd5137..01d106793 100644 --- a/src/ColorSpace.js +++ b/src/ColorSpace.js @@ -443,6 +443,7 @@ export default class ColorSpace { function getPath (space) { let ret = [space]; + // eslint-disable-next-line no-cond-assign for (let s = space; s = s.base;) { ret.push(s); } diff --git a/src/color.js b/src/color.js index 6b1bbcc8d..74959071b 100644 --- a/src/color.js +++ b/src/color.js @@ -87,7 +87,9 @@ export default class Color { for (let id in this.space.coords) { Object.defineProperty(this, id, { get: () => this.get(id), - set: value => this.set(id, value), + set: value => { + this.set(id, value); + }, }); } } diff --git a/src/hooks.js b/src/hooks.js index 9460ec63a..11a660056 100644 --- a/src/hooks.js +++ b/src/hooks.js @@ -5,8 +5,8 @@ export class Hooks { add (name, callback, first) { if (typeof arguments[0] != "string") { // Multiple hooks - for (var name in arguments[0]) { - this.add(name, arguments[0][name], arguments[1]); + for (var hookName in arguments[0]) { + this.add(hookName, arguments[0][hookName], arguments[1]); } return; diff --git a/src/spaces/luv.js b/src/spaces/luv.js index 07e829c5b..0b45284a4 100644 --- a/src/spaces/luv.js +++ b/src/spaces/luv.js @@ -48,7 +48,7 @@ export default new ColorSpace({ L, 13 * L * (up - U_PRIME_WHITE), 13 * L * (vp - V_PRIME_WHITE), - ]; + ]; }, // Convert Luv to D65-adapted XYZ diff --git a/src/types.d.ts b/src/types.d.ts index 927e791dd..c955d21d5 100644 --- a/src/types.d.ts +++ b/src/types.d.ts @@ -139,7 +139,7 @@ export interface SerializeOptions { | { type?: "" | "" | undefined; include?: boolean | undefined; - } + } | undefined; /** * Force commas as a separator