* autofix recommended

* first pass

* autofix

* fixed lint errors

* pin ts
This commit is contained in:
Jack Kavanagh
2025-04-03 18:15:03 +02:00
committed by GitHub
parent ddb57dbcac
commit b429feb2f2
48 changed files with 458 additions and 654 deletions

View File

@@ -1,17 +0,0 @@
.idea/
.github/
docker/
traces/
**/*.min.js
**/build/
**/dist/
**/.cache/
**/coverage/
**/node_modules/
**/bin/
**/__fixtures__/
**/fixtures
**/__snapshots__/
**/dist/
**/.cache/
*.md

View File

@@ -1,121 +0,0 @@
/** @type { import('eslint').Linter.Config } */
module.exports = {
settings: {
react: {
version: 'detect',
},
},
parser: '@typescript-eslint/parser',
parserOptions: {
tsconfigRootDir: __dirname,
ecmaFeatures: {
jsx: true,
},
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
],
plugins: [
'@typescript-eslint',
'react',
'react-hooks',
'import',
'simple-import-sort',
],
globals: {
__DEV__: true,
fail: true,
NodeJS: true,
HTMLDivElement: true,
HTMLElement: true,
HTMLInputElement: true,
HTMLSelectElement: true,
JSX: true,
},
env: {
browser: true,
commonjs: true,
es6: true,
node: true,
},
overrides: [
{
files: ['*.js'],
rules: {
'@typescript-eslint/no-var-requires': 'off',
},
},
],
rules: {
'array-bracket-spacing': 'error',
'block-spacing': 'error',
'comma-dangle': ['error', 'always-multiline'],
'comma-spacing': 'error',
'curly': 'error',
'default-case': 'error',
'default-case-last': 'error',
'eol-last': ['error', 'always'],
'eqeqeq': ['error', 'smart'],
'arrow-parens': ['error', 'as-needed'],
'arrow-spacing': 'error',
'no-async-promise-executor': 'off',
'no-else-return': 'error',
'no-empty': ["error", { "allowEmptyCatch": true }],
'no-var': 'error',
'no-trailing-spaces': 'error',
'no-multiple-empty-lines': ['error', { 'max': 1, 'maxEOF': 0 }],
'no-inner-declarations': 'off',
'no-useless-escape': 'off', // TODO: Enable this rule
'object-curly-spacing': ['error', 'always'],
'space-before-function-paren': ['error', { anonymous: 'ignore', named: 'ignore', asyncArrow: 'always' }],
'space-unary-ops': 'error',
'space-in-parens': 'error',
'spaced-comment': ['error', 'always', {
exceptions: ['/', '*', '-', '* '], // for ASCII art :)
markers: [
'/', // for TypeScript directives, doxygen, vsdoc, etc. (which use `///`)
'?', // for Quokka
],
}],
'react/no-unescaped-entities': 'off', // TODO: Enable this rule
'react/jsx-first-prop-new-line': ['error', 'multiline'],
'react/jsx-max-props-per-line': ['error', { maximum: 1, when: 'multiline' }],
'react/jsx-uses-react': 'error',
'react/jsx-uses-vars': 'error',
'react/jsx-indent-props': ['error', 2],
'react/prop-types': 'off',
'react/function-component-definition': ['error', {
'namedComponents': 'arrow-function',
'unnamedComponents': 'arrow-function',
}],
'react/jsx-closing-bracket-location': ['error', 'line-aligned'],
'react/prefer-stateless-function': 'error',
'react/jsx-key': ['error', { 'checkFragmentShorthand': true }],
'react/no-array-index-key': 'error',
'react/self-closing-comp': 'error',
'react-hooks/exhaustive-deps': ['error', {
// From react-use https://github.com/streamich/react-use/issues/1703#issuecomment-770972824
'additionalHooks': '^use(Async|AsyncFn|AsyncRetry|Debounce|UpdateEffect|IsomorphicLayoutEffect|DeepCompareEffect|ShallowCompareEffect)$',
}],
'react-hooks/rules-of-hooks': 'error',
'@typescript-eslint/array-type': ['error', { default: 'array', readonly: 'array' }],
'@typescript-eslint/consistent-type-definitions': ['error', 'interface'],
'@typescript-eslint/no-empty-interface': ['error', { 'allowSingleExtends': true }],
'@typescript-eslint/no-empty-object-type': 'off', // TODO: Enable this rule
'@typescript-eslint/no-namespace': ['error', { allowDeclarations: true }],
'@typescript-eslint/no-redeclare': 'error',
'@typescript-eslint/no-require-imports': 'off',
'@typescript-eslint/no-unused-expressions': 'off', // TODO: Enable this rule
'@typescript-eslint/no-unused-vars': 'off', // TODO: Enable this rule
'simple-import-sort/imports': 'error',
'@typescript-eslint/no-use-before-define': 'off', // TODO: Enable this rule
'@typescript-eslint/no-explicit-any': 'off', // TODO: Enable this rule
},
};

110
eslint.config.mjs Normal file
View File

@@ -0,0 +1,110 @@
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import reactPlugin from 'eslint-plugin-react';
import reactHooksPlugin from 'eslint-plugin-react-hooks';
import simpleImportSortPlugin from 'eslint-plugin-simple-import-sort';
import eslintConfigPrettier from "eslint-config-prettier/flat";
export default tseslint.config(
eslint.configs.recommended,
tseslint.configs.strict,
tseslint.configs.stylistic,
{
settings: {
react: {
version: 'detect',
},
},
plugins: {
'react': reactPlugin,
'react-hooks': reactHooksPlugin,
'simple-import-sort': simpleImportSortPlugin,
},
rules: {
'default-case': 'error',
'default-case-last': 'error',
'eol-last': ['error', 'always'],
'eqeqeq': ['error', 'smart'],
'no-async-promise-executor': 'off',
'no-else-return': 'error',
'no-empty': ["error", { "allowEmptyCatch": true }],
'no-var': 'error',
'no-trailing-spaces': 'error',
'no-multiple-empty-lines': ['error', { 'max': 1, 'maxEOF': 0 }],
'no-inner-declarations': 'off',
'no-useless-escape': 'off', // TODO: Enable this rule
'object-curly-spacing': ['error', 'always'],
'space-before-function-paren': ['error', { anonymous: 'ignore', named: 'ignore', asyncArrow: 'always' }],
'space-unary-ops': 'error',
'react/no-unescaped-entities': 'off', // TODO: Enable this rule
'react/jsx-first-prop-new-line': ['error', 'multiline'],
'react/jsx-max-props-per-line': ['error', { maximum: 1, when: 'multiline' }],
'react/jsx-uses-react': 'error',
'react/jsx-uses-vars': 'error',
'react/jsx-indent-props': ['error', 2],
'react/prop-types': 'off',
'react/function-component-definition': ['error', {
'namedComponents': 'arrow-function',
'unnamedComponents': 'arrow-function',
}],
'react/jsx-closing-bracket-location': ['error', 'line-aligned'],
'react/prefer-stateless-function': 'error',
'react/jsx-key': ['error', { 'checkFragmentShorthand': true }],
'react/no-array-index-key': 'error',
'react/self-closing-comp': 'error',
'react-hooks/exhaustive-deps': ['error', {
// From react-use https://github.com/streamich/react-use/issues/1703#issuecomment-770972824
'additionalHooks': '^use(Async|AsyncFn|AsyncRetry|Debounce|UpdateEffect|IsomorphicLayoutEffect|DeepCompareEffect|ShallowCompareEffect)$',
}],
'react-hooks/rules-of-hooks': 'error',
'@typescript-eslint/array-type': ['error', { default: 'array', readonly: 'array' }],
'@typescript-eslint/consistent-type-definitions': ['error', 'interface'],
'@typescript-eslint/no-empty-interface': ['error', { 'allowSingleExtends': true }],
'@typescript-eslint/no-empty-object-type': 'off', // TODO: Enable this rule
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-namespace': ['error', { allowDeclarations: true }],
'@typescript-eslint/no-redeclare': 'error',
'@typescript-eslint/no-require-imports': 'off',
'@typescript-eslint/no-unused-expressions': 'off', // TODO: Enable this rule
'@typescript-eslint/no-unused-vars': 'off', // TODO: Enable this rule
'simple-import-sort/imports': 'error',
'@typescript-eslint/no-use-before-define': 'off', // TODO: Enable this rule
'@typescript-eslint/no-explicit-any': 'off', // TODO: Enable this rule
'@typescript-eslint/no-dynamic-delete': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-invalid-void-type': 'off',
}
},
eslintConfigPrettier,
{
ignores: [
'*.md',
'**/__fixtures__/*',
'**/__snapshots__/*',
'**/.cache/*',
'**/.github/*',
'**/.idea/*',
'**/*.config.js',
'**/*.d.ts',
'**/*.min.js',
'**/bin/*',
'**/build/*',
'**/coverage/*',
'**/customSign.js',
'**/dist/*',
'**/docker/*',
'**/electron/index.js',
'**/fixtures',
'**/hidden-window-preload.js',
'**/node_modules/*',
'**/preload.js',
'**/svgr',
'**/traces/*',
'**/verify-pkg.js',
'**/__mocks__/*',
]
}
);

630
package-lock.json generated
View File

@@ -21,6 +21,7 @@
"decompress": "^4.2.1"
},
"devDependencies": {
"@eslint/js": "^9.23.0",
"@types/chai": "^4.3.14",
"@types/har-format": "^1.2.15",
"@types/mocha": "^10.0.6",
@@ -29,14 +30,15 @@
"@typescript-eslint/parser": "^8.29.0",
"esbuild": "^0.24.0",
"esbuild-runner": "^2.2.2",
"eslint": "^8.57.0",
"eslint-plugin-import": "^2.29.1",
"eslint": "^9.23.0",
"eslint-config-prettier": "^10.1.1",
"eslint-plugin-react": "^7.37.4",
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-simple-import-sort": "^12.1.1",
"tslib": "2.0.1",
"type-fest": "^4.15.0",
"typescript": "^5.6.2",
"typescript": "5.6.2",
"typescript-eslint": "^8.29.0",
"vitest": "^2.0.4"
},
"engines": {
@@ -1342,26 +1344,64 @@
}
},
"node_modules/@eslint-community/regexpp": {
"version": "4.11.1",
"resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.1.tgz",
"integrity": "sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q==",
"version": "4.12.1",
"resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz",
"integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==",
"dev": true,
"license": "MIT",
"engines": {
"node": "^12.0.0 || ^14.0.0 || >=16.0.0"
}
},
"node_modules/@eslint/config-array": {
"version": "0.19.2",
"resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.19.2.tgz",
"integrity": "sha512-GNKqxfHG2ySmJOBSHg7LxeUx4xpuCoFjacmlCoYWEbaPXLwvfIjixRI12xCQZeULksQb23uiA8F40w5TojpV7w==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"@eslint/object-schema": "^2.1.6",
"debug": "^4.3.1",
"minimatch": "^3.1.2"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
}
},
"node_modules/@eslint/config-helpers": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.2.1.tgz",
"integrity": "sha512-RI17tsD2frtDu/3dmI7QRrD4bedNKPM08ziRYaC5AhkGrzIAJelm9kJU1TznK+apx6V+cqRz8tfpEeG3oIyjxw==",
"dev": true,
"license": "Apache-2.0",
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
}
},
"node_modules/@eslint/core": {
"version": "0.12.0",
"resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.12.0.tgz",
"integrity": "sha512-cmrR6pytBuSMTaBweKoGMwu3EiHiEC+DoyupPmlZ0HxBJBtIxwe+j/E4XPIKNx+Q74c8lXKPwYawBf5glsTkHg==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"@types/json-schema": "^7.0.15"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
}
},
"node_modules/@eslint/eslintrc": {
"version": "2.1.4",
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz",
"integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==",
"version": "3.3.1",
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.1.tgz",
"integrity": "sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"ajv": "^6.12.4",
"debug": "^4.3.2",
"espree": "^9.6.0",
"globals": "^13.19.0",
"espree": "^10.0.1",
"globals": "^14.0.0",
"ignore": "^5.2.0",
"import-fresh": "^3.2.1",
"js-yaml": "^4.1.0",
@@ -1369,7 +1409,7 @@
"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"
@@ -1400,16 +1440,13 @@
"license": "Python-2.0"
},
"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"
@@ -1435,27 +1472,51 @@
"dev": true,
"license": "MIT"
},
"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==",
"dev": true,
"license": "(MIT OR CC0-1.0)",
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"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==",
"version": "9.23.0",
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.23.0.tgz",
"integrity": "sha512-35MJ8vCPU0ZMxo7zfev2pypqTwWTofFZO6m4KAtdoFhRpLJUpHTZZ+KB3C7Hb1d7bULYwO4lJXGCi5Se+8OMbw==",
"dev": true,
"license": "MIT",
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
}
},
"node_modules/@eslint/object-schema": {
"version": "2.1.6",
"resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.6.tgz",
"integrity": "sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==",
"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.8",
"resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.8.tgz",
"integrity": "sha512-ZAoA40rNMPwSm+AeHpCq8STiNAwzWLJuP8Xv4CHIc9wv/PSuExjMrmjfYNj682vW0OOiZ1HKxzvjQr9XZIisQA==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"@eslint/core": "^0.13.0",
"levn": "^0.4.1"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
}
},
"node_modules/@eslint/plugin-kit/node_modules/@eslint/core": {
"version": "0.13.0",
"resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.13.0.tgz",
"integrity": "sha512-yfkgDw1KR66rkT5A8ci4irzDysN7FRpq3ttJolR88OqQikAWqwA8j5VZyas+vjyBNFIJ7MfybJ9plMILI2UrCw==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"@types/json-schema": "^7.0.15"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
}
},
"node_modules/@exodus/schemasafe": {
@@ -1766,20 +1827,42 @@
"integrity": "sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==",
"license": "BSD-3-Clause"
},
"node_modules/@humanwhocodes/config-array": {
"version": "0.13.0",
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz",
"integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==",
"deprecated": "Use @eslint/config-array instead",
"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": "Apache-2.0",
"engines": {
"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": {
"@humanwhocodes/object-schema": "^2.0.3",
"debug": "^4.3.1",
"minimatch": "^3.0.5"
"@humanfs/core": "^0.19.1",
"@humanwhocodes/retry": "^0.3.0"
},
"engines": {
"node": ">=10.10.0"
"node": ">=18.18.0"
}
},
"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": "Apache-2.0",
"engines": {
"node": ">=18.18"
},
"funding": {
"type": "github",
"url": "https://github.com/sponsors/nzakas"
}
},
"node_modules/@humanwhocodes/module-importer": {
@@ -1796,13 +1879,19 @@
"url": "https://github.com/sponsors/nzakas"
}
},
"node_modules/@humanwhocodes/object-schema": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz",
"integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==",
"deprecated": "Use @eslint/object-schema instead",
"node_modules/@humanwhocodes/retry": {
"version": "0.4.2",
"resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.2.tgz",
"integrity": "sha512-xeO57FpIu4p1Ri3Jq/EXq4ClRm86dVF2z/+kvFnyqVYRavTZmaFaUBbWCOuuTh0o/g7DSsk6kc2vrS4Vl5oPOQ==",
"dev": true,
"license": "BSD-3-Clause"
"license": "Apache-2.0",
"engines": {
"node": ">=18.18"
},
"funding": {
"type": "github",
"url": "https://github.com/sponsors/nzakas"
}
},
"node_modules/@internationalized/date": {
"version": "3.5.5",
@@ -5033,13 +5122,6 @@
"win32"
]
},
"node_modules/@rtsao/scc": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@rtsao/scc/-/scc-1.1.0.tgz",
"integrity": "sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==",
"dev": true,
"license": "MIT"
},
"node_modules/@seald-io/binary-search-tree": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/@seald-io/binary-search-tree/-/binary-search-tree-1.0.3.tgz",
@@ -6350,13 +6432,6 @@
"integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==",
"license": "MIT"
},
"node_modules/@types/json5": {
"version": "0.0.29",
"resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz",
"integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==",
"dev": true,
"license": "MIT"
},
"node_modules/@types/jsonpath-plus": {
"version": "5.0.5",
"resolved": "https://registry.npmjs.org/@types/jsonpath-plus/-/jsonpath-plus-5.0.5.tgz",
@@ -7001,13 +7076,6 @@
"url": "https://opencollective.com/eslint"
}
},
"node_modules/@ungap/structured-clone": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz",
"integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==",
"dev": true,
"license": "ISC"
},
"node_modules/@vitejs/plugin-react": {
"version": "4.3.2",
"resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.3.2.tgz",
@@ -7322,9 +7390,9 @@
}
},
"node_modules/acorn": {
"version": "8.12.1",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz",
"integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==",
"version": "8.14.1",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.1.tgz",
"integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==",
"dev": true,
"license": "MIT",
"bin": {
@@ -7982,27 +8050,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/array.prototype.findlastindex": {
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.5.tgz",
"integrity": "sha512-zfETvRFA8o7EiNn++N5f/kaCw221hrpGsDmcpndVupkPzEc1Wuf3VgC0qby1BbHs7f5DVYjgtEU2LLh5bqeGfQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"call-bind": "^1.0.7",
"define-properties": "^1.2.1",
"es-abstract": "^1.23.2",
"es-errors": "^1.3.0",
"es-object-atoms": "^1.0.0",
"es-shim-unscopables": "^1.0.2"
},
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/array.prototype.flat": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz",
@@ -9794,9 +9841,9 @@
}
},
"node_modules/cross-spawn": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
"integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
"version": "7.0.6",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
"integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
"license": "MIT",
"dependencies": {
"path-key": "^3.1.0",
@@ -10511,19 +10558,6 @@
"license": "MIT",
"optional": true
},
"node_modules/doctrine": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz",
"integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"esutils": "^2.0.2"
},
"engines": {
"node": ">=6.0.0"
}
},
"node_modules/dom-accessibility-api": {
"version": "0.5.16",
"resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz",
@@ -11447,175 +11481,77 @@
}
},
"node_modules/eslint": {
"version": "8.57.1",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz",
"integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==",
"version": "9.23.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-9.23.0.tgz",
"integrity": "sha512-jV7AbNoFPAY1EkFYpLq5bslU9NLNO8xnEeQXwErNibVryjk67wHVmddTBilc5srIttJDBrB0eMHKZBFbSIABCw==",
"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.2",
"@eslint/config-helpers": "^0.2.0",
"@eslint/core": "^0.12.0",
"@eslint/eslintrc": "^3.3.1",
"@eslint/js": "9.23.0",
"@eslint/plugin-kit": "^0.2.7",
"@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.2",
"@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.3.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"
}
},
"node_modules/eslint-import-resolver-node": {
"version": "0.3.9",
"resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz",
"integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==",
"dev": true,
"license": "MIT",
"dependencies": {
"debug": "^3.2.7",
"is-core-module": "^2.13.0",
"resolve": "^1.22.4"
}
},
"node_modules/eslint-import-resolver-node/node_modules/debug": {
"version": "3.2.7",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
"integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"ms": "^2.1.1"
}
},
"node_modules/eslint-module-utils": {
"version": "2.12.0",
"resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.12.0.tgz",
"integrity": "sha512-wALZ0HFoytlyh/1+4wuZ9FJCD/leWHQzzrxJ8+rebyReSLk7LApMyd3WJaLVoN+D5+WIdJyDK1c6JnE65V4Zyg==",
"dev": true,
"license": "MIT",
"dependencies": {
"debug": "^3.2.7"
"url": "https://eslint.org/donate"
},
"engines": {
"node": ">=4"
"peerDependencies": {
"jiti": "*"
},
"peerDependenciesMeta": {
"eslint": {
"jiti": {
"optional": true
}
}
},
"node_modules/eslint-module-utils/node_modules/debug": {
"version": "3.2.7",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
"integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
"node_modules/eslint-config-prettier": {
"version": "10.1.1",
"resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-10.1.1.tgz",
"integrity": "sha512-4EQQr6wXwS+ZJSzaR5ZCrYgLxqvUjdXctaEtBqHcbkW944B1NQyO4qpdHQbXBONfwxXdkAY81HH4+LUfrg+zPw==",
"dev": true,
"license": "MIT",
"dependencies": {
"ms": "^2.1.1"
}
},
"node_modules/eslint-plugin-import": {
"version": "2.30.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.30.0.tgz",
"integrity": "sha512-/mHNE9jINJfiD2EKkg1BKyPyUk4zdnT54YgbOgfjSakWT5oyX/qQLVNTkehyfpcMxZXMy1zyonZ2v7hZTX43Yw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@rtsao/scc": "^1.1.0",
"array-includes": "^3.1.8",
"array.prototype.findlastindex": "^1.2.5",
"array.prototype.flat": "^1.3.2",
"array.prototype.flatmap": "^1.3.2",
"debug": "^3.2.7",
"doctrine": "^2.1.0",
"eslint-import-resolver-node": "^0.3.9",
"eslint-module-utils": "^2.9.0",
"hasown": "^2.0.2",
"is-core-module": "^2.15.1",
"is-glob": "^4.0.3",
"minimatch": "^3.1.2",
"object.fromentries": "^2.0.8",
"object.groupby": "^1.0.3",
"object.values": "^1.2.0",
"semver": "^6.3.1",
"tsconfig-paths": "^3.15.0"
},
"engines": {
"node": ">=4"
"bin": {
"eslint-config-prettier": "bin/cli.js"
},
"peerDependencies": {
"eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8"
}
},
"node_modules/eslint-plugin-import/node_modules/debug": {
"version": "3.2.7",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
"integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"ms": "^2.1.1"
}
},
"node_modules/eslint-plugin-import/node_modules/doctrine": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz",
"integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"esutils": "^2.0.2"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/eslint-plugin-import/node_modules/semver": {
"version": "6.3.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
"integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
"dev": true,
"license": "ISC",
"bin": {
"semver": "bin/semver.js"
"eslint": ">=7.0.0"
}
},
"node_modules/eslint-plugin-react": {
@@ -11716,9 +11652,9 @@
}
},
"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==",
"version": "8.3.0",
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.3.0.tgz",
"integrity": "sha512-pUNxi75F8MJ/GdeKtVLSbYg4ZI34J6C0C7sbL4YOp2exGwen7ZsuBqKzUhXd0qMQ362yET3z+uPwKeg/0C2XCQ==",
"dev": true,
"license": "BSD-2-Clause",
"dependencies": {
@@ -11726,7 +11662,7 @@
"estraverse": "^5.2.0"
},
"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"
@@ -11745,6 +11681,13 @@
"url": "https://opencollective.com/eslint"
}
},
"node_modules/eslint/node_modules/@types/estree": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.7.tgz",
"integrity": "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==",
"dev": true,
"license": "MIT"
},
"node_modules/eslint/node_modules/ajv": {
"version": "6.12.6",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
@@ -11762,40 +11705,17 @@
"url": "https://github.com/sponsors/epoberezkin"
}
},
"node_modules/eslint/node_modules/argparse": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
"node_modules/eslint/node_modules/eslint-visitor-keys": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz",
"integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==",
"dev": true,
"license": "Python-2.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"
},
"license": "Apache-2.0",
"engines": {
"node": ">=8"
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/eslint/node_modules/js-yaml": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
"integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
"dev": true,
"license": "MIT",
"dependencies": {
"argparse": "^2.0.1"
},
"bin": {
"js-yaml": "bin/js-yaml.js"
"url": "https://opencollective.com/eslint"
}
},
"node_modules/eslint/node_modules/json-schema-traverse": {
@@ -11805,19 +11725,6 @@
"dev": true,
"license": "MIT"
},
"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/esniff": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/esniff/-/esniff-2.0.1.tgz",
@@ -11835,18 +11742,31 @@
}
},
"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==",
"version": "10.3.0",
"resolved": "https://registry.npmjs.org/espree/-/espree-10.3.0.tgz",
"integrity": "sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==",
"dev": true,
"license": "BSD-2-Clause",
"dependencies": {
"acorn": "^8.9.0",
"acorn": "^8.14.0",
"acorn-jsx": "^5.3.2",
"eslint-visitor-keys": "^3.4.1"
"eslint-visitor-keys": "^4.2.0"
},
"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/espree/node_modules/eslint-visitor-keys": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz",
"integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==",
"dev": true,
"license": "Apache-2.0",
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"funding": {
"url": "https://opencollective.com/eslint"
@@ -12261,16 +12181,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/file-type": {
@@ -12389,24 +12309,23 @@
}
},
"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"
"keyv": "^4.5.4"
},
"engines": {
"node": "^10.12.0 || >=12.0.0"
"node": ">=16"
}
},
"node_modules/flatted": {
"version": "3.3.1",
"resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz",
"integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==",
"version": "3.3.3",
"resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz",
"integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==",
"dev": true,
"license": "ISC"
},
@@ -14053,16 +13972,6 @@
"node": ">=0.10.0"
}
},
"node_modules/is-path-inside": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz",
"integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/is-plain-obj": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz",
@@ -17086,21 +16995,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/object.groupby": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.3.tgz",
"integrity": "sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"call-bind": "^1.0.7",
"define-properties": "^1.2.1",
"es-abstract": "^1.23.2"
},
"engines": {
"node": ">= 0.4"
}
},
"node_modules/object.values": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.1.tgz",
@@ -20249,16 +20143,6 @@
"node": ">=8"
}
},
"node_modules/strip-bom": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
"integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=4"
}
},
"node_modules/strip-dirs": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/strip-dirs/-/strip-dirs-2.1.0.tgz",
@@ -20709,13 +20593,6 @@
"node": ">= 10.0.0"
}
},
"node_modules/text-table": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
"integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==",
"dev": true,
"license": "MIT"
},
"node_modules/thenify": {
"version": "3.3.1",
"resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.1.tgz",
@@ -20975,32 +20852,6 @@
"dev": true,
"license": "Apache-2.0"
},
"node_modules/tsconfig-paths": {
"version": "3.15.0",
"resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz",
"integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@types/json5": "^0.0.29",
"json5": "^1.0.2",
"minimist": "^1.2.6",
"strip-bom": "^3.0.0"
}
},
"node_modules/tsconfig-paths/node_modules/json5": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz",
"integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==",
"dev": true,
"license": "MIT",
"dependencies": {
"minimist": "^1.2.0"
},
"bin": {
"json5": "lib/cli.js"
}
},
"node_modules/tslib": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz",
@@ -21186,6 +21037,29 @@
"node": ">=14.17"
}
},
"node_modules/typescript-eslint": {
"version": "8.29.0",
"resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.29.0.tgz",
"integrity": "sha512-ep9rVd9B4kQsZ7ZnWCVxUE/xDLUUUsRzE0poAeNu+4CkFErLfuvPt/qtm2EpnSyfvsR0S6QzDFSrPCFBwf64fg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/eslint-plugin": "8.29.0",
"@typescript-eslint/parser": "8.29.0",
"@typescript-eslint/utils": "8.29.0"
},
"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.9.0"
}
},
"node_modules/uid-safe": {
"version": "2.1.5",
"resolved": "https://registry.npmjs.org/uid-safe/-/uid-safe-2.1.5.tgz",

View File

@@ -42,6 +42,7 @@
"download-all-npm-plugins": "esr ./scripts/download-all-npm-plugins.ts"
},
"devDependencies": {
"@eslint/js": "^9.23.0",
"@types/chai": "^4.3.14",
"@types/har-format": "^1.2.15",
"@types/mocha": "^10.0.6",
@@ -50,14 +51,15 @@
"@typescript-eslint/parser": "^8.29.0",
"esbuild": "^0.24.0",
"esbuild-runner": "^2.2.2",
"eslint": "^8.57.0",
"eslint-plugin-import": "^2.29.1",
"eslint": "^9.23.0",
"eslint-config-prettier": "^10.1.1",
"eslint-plugin-react": "^7.37.4",
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-simple-import-sort": "^12.1.1",
"tslib": "2.0.1",
"type-fest": "^4.15.0",
"typescript": "^5.6.2",
"typescript": "5.6.2",
"typescript-eslint": "^8.29.0",
"vitest": "^2.0.4"
},
"dependencies": {

View File

@@ -1,4 +0,0 @@
dist
bin
coverage
verify-pkg.js

View File

@@ -73,9 +73,7 @@ export const tryToReadInsoConfigFile = async (configFile?: string, workingDir?:
return {};
};
export type LogsByType = {
[t in logType]?: string[]
};
export type LogsByType = Partial<Record<logType, string[]>>;
export type ModifiedConsola = ReturnType<typeof consola.create> & { __getLogs: () => LogsByType };

View File

@@ -1,5 +1,5 @@
import { RulesetDefinition, Spectral } from '@stoplight/spectral-core';
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { bundleAndLoadRuleset } = require('@stoplight/spectral-ruleset-bundler/with-loader');
import { oas } from '@stoplight/spectral-rulesets';
import { DiagnosticSeverity } from '@stoplight/types';

View File

@@ -37,7 +37,7 @@ type RawTypeKey = 'api_spec'
| 'unit_test_suite'
| 'unit_test';
/* eslint-disable camelcase */
const rawTypeToParsedTypeMap: Record<RawTypeKey, BaseModel['type']> = {
api_spec: 'ApiSpec',
environment: 'Environment',
@@ -47,7 +47,7 @@ const rawTypeToParsedTypeMap: Record<RawTypeKey, BaseModel['type']> = {
unit_test_suite: 'UnitTestSuite',
unit_test: 'UnitTest',
};
/* eslint-enable camelcase */
type ExtraProperties = Record<string, unknown>;

View File

@@ -1 +0,0 @@
dist

View File

@@ -1,2 +0,0 @@
**/fixtures
dist

View File

@@ -23,7 +23,7 @@ const runInternal = async <TReturn, TNetworkResponse>(
// @ts-expect-error -- global hack
global.insomnia = new Insomnia(options);
// eslint-disable-next-line @typescript-eslint/no-var-requires
chai.use(require('chai-json-schema'));
// @ts-expect-error -- global hack
global.chai = chai;

View File

@@ -1,7 +0,0 @@
build
bin
coverage
src/*.js
src/*.js.map
**/svgr
svgr.config.js

View File

@@ -11,9 +11,9 @@ import { EventEmitter } from 'events';
import fs from 'fs';
class Curl extends EventEmitter {
_options: { [key: string]: any } = {};
_meta: { [key: string]: any } = {};
_features: { [key: string]: any } = {};
_options: Record<string, any> = {};
_meta: Record<string, any> = {};
_features: Record<string, any> = {};
static info = {
COOKIELIST: 'COOKIELIST',

View File

@@ -669,9 +669,7 @@ export const database = {
},
};
interface DB {
[index: string]: NeDB;
}
type DB = Record<string, NeDB>;
// @ts-expect-error -- TSCONVERSION _empty doesn't match the index signature, use something other than _empty in future
const db: DB = {

View File

@@ -257,7 +257,7 @@ export async function render<T>(
blacklistPathRegex: RegExp | null = null,
errorMode: 'keep' | 'throw' = 'throw',
name = '',
ignoreUndefinedEnvVariable: boolean = false,
ignoreUndefinedEnvVariable = false,
) {
// Make a deep copy so no one gets mad :)
const newObj = clone(obj);
@@ -469,9 +469,7 @@ export async function getRenderContext(
// Get Keys from ancestors (e.g. Folders)
if (ancestors) {
for (let index = 0; index < ancestors.length; index++) {
const ancestor: any = ancestors[index] || {};
for (const ancestor of ancestors) {
if (isRequestGroup(ancestor) && 'environment' in ancestor && 'name' in ancestor) {
getKeySource(ancestor.environment || {}, inKey, ancestor.name || '');
}

View File

@@ -4,13 +4,11 @@ import { Enum, Field, MapField, Message, OneOf, Service, Type } from 'protobufjs
import { v4 } from 'uuid';
export interface MethodPayload {
plain: {[key: string]: any};
plain: Record<string, any>;
message: Message;
}
export interface ServiceMethodsPayload {
[name: string]: () => MethodPayload;
}
export type ServiceMethodsPayload = Record<string, () => MethodPayload>;
const enum MethodType {
request,
@@ -82,7 +80,7 @@ function mockTypeFields(type: Type, stackDepth: StackDepth): object {
return {};
}
const fieldsData: { [key: string]: any } = {};
const fieldsData: Record<string, any> = {};
if (!type.fieldsArray) {
return fieldsData;
}
@@ -180,7 +178,7 @@ function isProtoType(resolvedType: Enum | Type | null): resolvedType is Type {
}
function pickOneOf(oneofs: OneOf[], stackDepth: StackDepth) {
return oneofs.reduce((fields: {[key: string]: any}, oneOf) => {
return oneofs.reduce((fields: Record<string, any>, oneOf) => {
fields[oneOf.name] = mockField(oneOf.fieldsArray[0], stackDepth);
return fields;
}, {});
@@ -240,7 +238,7 @@ function interpretMockViaFieldName(fieldName: string): string {
}
class StackDepth {
private readonly depths: { [type: string]: number };
private readonly depths: Record<string, number>;
readonly maxStackSize: number;
constructor(maxStackSize = 3) {

View File

@@ -45,7 +45,7 @@ export async function buildMultipart(params: RequestBodyParameter[]) {
end: false,
});
// TODO: remove non-null assertion
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
totalSize += size!;
});
}

View File

@@ -149,7 +149,7 @@ const openWebSocketConnection = async (
}
const readyStateChannel = `webSocket.${request._id}.readyState`;
const reduceArrayToLowerCaseKeyedDictionary = (acc: { [key: string]: string }, { name, value }: BaseWebSocketRequest['headers'][0]) =>
const reduceArrayToLowerCaseKeyedDictionary = (acc: Record<string, string>, { name, value }: BaseWebSocketRequest['headers'][0]) =>
({ ...acc, [name.toLowerCase() || '']: value || '' });
const headers = options.headers;
let url = options.url;

View File

@@ -32,7 +32,7 @@ export function isUrlMatchedInNoProxyRule(url: string | undefined, noProxyRule:
}
const port = uri.port || (uri.protocol === 'https:' ? '443' : '80');
// TODO: remove non-null assertion
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const hostname = formatHostname(uri.hostname!);
const noProxyList = noProxyRule.split(',');

View File

@@ -5,7 +5,7 @@ import { setDefaultProtocol } from '../utils/url/protocol';
const DEFAULT_PORT = 443;
export function urlMatchesCertHost(certificateHost: string, requestUrl: string, needCheckPort: boolean = true) {
export function urlMatchesCertHost(certificateHost: string, requestUrl: string, needCheckPort = true) {
const cHostWithProtocol = setDefaultProtocol(certificateHost, 'https:');
const { hostname, port } = urlParse(requestUrl);
let certificateHostWithProtocol = new URL('https://example.com');

View File

@@ -21,7 +21,7 @@ export function projectRoutableFSClient(
for (const prefix of Object.keys(otherFS)) {
if (filePath.indexOf(path.normalize(prefix)) === 0) {
// TODO: remove non-null assertion
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
return otherFS[prefix].promises[method]!(filePath, ...args);
}
}
@@ -30,7 +30,7 @@ export function projectRoutableFSClient(
// console.log('[routablefs] Executing', method, filePath, { args });
// Fallback to default if no prefix matched
// TODO: remove non-null assertion
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
// We store insomnia files in the database and all other files in a folder named 'other' on disk
// When we read a directory, we need to merge the two lists to provide the full list of files

View File

@@ -20,7 +20,7 @@ export function routableFSClient(
for (const prefix of Object.keys(otherFS)) {
if (filePath.indexOf(path.normalize(prefix)) === 0) {
// TODO: remove non-null assertion
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
return otherFS[prefix].promises[method]!(filePath, ...args);
}
}
@@ -29,7 +29,7 @@ export function routableFSClient(
// console.log('[routablefs] Executing', method, filePath, { args });
// Fallback to default if no prefix matched
// TODO: remove non-null assertion
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const result = await defaultFS.promises[method]!(filePath, ...args);
// If the method is returning a list of files for the root directory
// we need to return the actual result plus inject the .insomnia directory

View File

@@ -7,7 +7,7 @@ import { VCS } from './vcs';
let vcs: VCS | null = null;
export class UserAbortResolveMergeConflictError extends Error {
constructor(msg: string = 'User aborted merge') {
constructor(msg = 'User aborted merge') {
super(msg);
}
name = 'UserAbortResolveMergeConflictError';

View File

@@ -21,7 +21,7 @@ export class RenderError extends Error {
// because nunjucks only report the first error, we need to extract all missing variables that are not present in the context
// for example, if the text is `{{ a }} {{ b }}`, nunjucks only report `a` is missing, but we need to report both `a` and `b`
export function extractUndefinedVariableKey(text: string = '', templatingContext: Record<string, any>): string[] {
export function extractUndefinedVariableKey(text = '', templatingContext: Record<string, any>): string[] {
const regexVariable = /{{\s*([^ }]+)\s*}}/g;
const missingVariables: string[] = [];
let match;

View File

@@ -67,9 +67,7 @@ async function _highlightNunjucksTags(this: CodeMirror.Editor, render: HandleRen
const newTokens: Token[] = [];
let currTok: Token | null = null;
for (let i = 0; i < tokens.length; i++) {
const nextTok = tokens[i];
for (const nextTok of tokens) {
if (currTok && currTok.type === nextTok.type && currTok.end === nextTok.start) {
currTok.end = nextTok.end;
currTok.string += nextTok.string;
@@ -173,7 +171,7 @@ async function _highlightNunjucksTags(this: CodeMirror.Editor, render: HandleRen
if (pos) {
const { from, to } = pos;
// TODO: unsound non-null assertion
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
this.replaceRange(template!, from, to);
} else {
console.warn('Tried to replace mark that did not exist', mark);
@@ -216,7 +214,7 @@ async function _highlightNunjucksTags(this: CodeMirror.Editor, render: HandleRen
// changing it doesn't seem to take affect in Chromium 56 (maybe bug?)
if (droppedInSameEditor) {
// TODO: unsound non-null assertion
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const { from, to } = mark.find()!;
this.replaceRange('', from, to, '+dnd');
}

View File

@@ -36,9 +36,7 @@ function validator(text: string, options: LintOptions): ValidationError[] {
}
function parseErrors(errors: LintError[], output: ValidationError[]) {
for (let i = 0; i < errors.length; i++) {
const error = errors[i];
for (const error of errors) {
if (error) {
if (error.line <= 0) {
if (window.console) {

View File

@@ -544,8 +544,7 @@ export const GraphQLEditor: FC<Props> = ({
const allOperationNames: (string | null)[] = [];
// Loop through all operationDefinitions to see if one contains the cursor.
for (let i = 0; i < operationDefinitions.length; i++) {
const operation = operationDefinitions[i];
for (const operation of operationDefinitions) {
if (!operation.name) {
continue;

View File

@@ -22,7 +22,7 @@ interface EditorProps {
}
const cellCommonStyle = 'h-full px-2 flex items-center';
const createNewPair = (enabled: boolean = true): EnvironmentKvPairData => ({
const createNewPair = (enabled = true): EnvironmentKvPairData => ({
id: generateId('envPair'),
name: '',
value: '',

View File

@@ -11,7 +11,7 @@ import { GraphQLExplorerType } from './graph-ql-explorer-type';
import type { ActiveReference, GraphQLFieldWithParentName } from './graph-ql-types';
function getReferenceInfo(reference: SchemaReference) {
let field: GraphQLField<any, any, { [key: string]: any }> | undefined;
let field: GraphQLField<any, any, Record<string, any>> | undefined;
if ('field' in reference) {
field = reference.field;
}
@@ -28,7 +28,7 @@ function isSameFieldAndType(
currentType?: GraphQLType | null,
type?: GraphQLType | null,
currentField?: GraphQLFieldWithParentName,
field?: GraphQLField<any, any, { [key: string]: any }>
field?: GraphQLField<any, any, Record<string, any>>
) {
// @TODO Simplify this function since it's hard to follow along
const compare = <

View File

@@ -10,7 +10,7 @@ import type { RootLoaderData } from '../routes/root';
const keyCombinationToTinyKeyString = ({ ctrl, alt, shift, meta, keyCode }: KeyCombination): string =>
`${meta ? 'Meta+' : ''}${alt ? 'Alt+' : ''}${ctrl ? 'Control+' : ''}${shift ? 'Shift+' : ''}` + Object.entries(keyboardKeys).find(([, { keyCode: kc }]) => kc === keyCode)?.[1].code;
export function useKeyboardShortcuts(getTarget: () => HTMLElement, listeners: { [key in KeyboardShortcut]?: (event: KeyboardEvent) => any }) {
export function useKeyboardShortcuts(getTarget: () => HTMLElement, listeners: Partial<Record<KeyboardShortcut, (event: KeyboardEvent) => any>>) {
const {
settings,
} = useRouteLoaderData('root') as RootLoaderData;
@@ -39,7 +39,7 @@ export function useKeyboardShortcuts(getTarget: () => HTMLElement, listeners: {
}, [hotKeyRegistry, listeners, getTarget]);
}
export function useDocBodyKeyboardShortcuts(listeners: { [key in KeyboardShortcut]?: (event: KeyboardEvent) => any }) {
export function useDocBodyKeyboardShortcuts(listeners: Partial<Record<KeyboardShortcut, (event: KeyboardEvent) => any>>) {
useKeyboardShortcuts(() => document.body, listeners);
}

View File

@@ -564,7 +564,6 @@ export const InviteModalContainer: FC<{
);
}
return null;
};
function checkPermissionRefType(permissionRef: MutableRefObject<Record<Permission, boolean> | undefined>): permissionRef is MutableRefObject<Record<Permission, boolean>> {

View File

@@ -26,18 +26,16 @@ export const RunnerResultHistoryPane: FC<Props> = ({
let failedCount = 0;
let skippedCount = 0;
for (let i = 0; i < runnerResult.iterationResults.length; i++) { // iterations
for (let j = 0; j < runnerResult.iterationResults[i].length; j++) { // requests
for (let k = 0; k < runnerResult.iterationResults[i][j].results.length; k++) { // test cases
const result = runnerResult.iterationResults[i][j].results[k];
if (result.status === 'failed') {
for (const iteration of runnerResult.iterationResults) {
for (const requests of iteration) {
for (const testCase of requests.results) {
if (testCase.status === 'failed') {
failedCount++;
}
if (result.status === 'skipped') {
if (testCase.status === 'skipped') {
skippedCount++;
}
if (result.status === 'passed') {
if (testCase.status === 'passed') {
passedCount++;
}
}

View File

@@ -9,7 +9,7 @@ import { Icon } from '../icon';
const ThemePreview: FC<{ theme: PluginTheme }> = ({ theme: { name: themeName } }) => (
<svg
// @ts-expect-error -- something about themes
// eslint-disable-next-line react/no-unknown-property
theme={themeName}
className="theme-preview"
width="100%"
@@ -26,7 +26,7 @@ const ThemePreview: FC<{ theme: PluginTheme }> = ({ theme: { name: themeName } }
<g
// @ts-expect-error -- something about themes
// eslint-disable-next-line react/no-unknown-property
subtheme={themeName}
>
{/* App Header */}

View File

@@ -58,7 +58,7 @@ function renderPaths({
clipPath={`url(#${id}-clip-path-${i})`}
x={`-${internals.TRIAL_SIZE_PERCENTAGE}`}
/>
{/* eslint-disable-next-line no-template-curly-in-string */}
{ }
<g id="${id}-circles-${i}" className="dot" style={{ opacity: 0 }}>
<circle r={internals.LINE_WIDTH * 20} fill={`url(#${id}-rgradient-dot-back)`} />
<circle r={internals.LINE_WIDTH * 10} fill={`url(#${id}-rgradient-dot-front)`} />

View File

@@ -31,7 +31,7 @@ export const ResponseWebView: FC<Props> = ({ webpreferences, body, url }) => {
data-testid="ResponseWebView"
ref={webviewRef}
src="about:blank"
// eslint-disable-next-line react/no-unknown-property
webpreferences={webpreferences}
/>
);

View File

@@ -42,9 +42,7 @@ const InsomniaTabContext = createContext<ContextProps>({
changeActiveTab: () => { },
});
interface InsomniaTabs {
[orgId: string]: OrganizationTabs;
}
type InsomniaTabs = Record<string, OrganizationTabs>;
export const InsomniaTabProvider: FC<PropsWithChildren> = ({ children }) => {
const {

View File

@@ -17,13 +17,9 @@ interface RunnerState {
reqList: RequestRow[];
}
interface OrgRunnerStateMap {
[runnerId: string]: Partial<RunnerState>;
}
type OrgRunnerStateMap = Record<string, Partial<RunnerState>>;
interface RunnerStateMap {
[orgId: string]: OrgRunnerStateMap;
}
type RunnerStateMap = Record<string, OrgRunnerStateMap>;
interface ContextProps {
runnerStateMap: RunnerStateMap;
runnerStateRef?: React.MutableRefObject<RunnerStateMap>;

View File

@@ -55,7 +55,7 @@ export default function useLocalStorageState<T = undefined>(
function useLocalStorage<T>(
key: string,
defaultValue: T | undefined,
storageSync: boolean = true,
storageSync = true,
parse: (value: string) => unknown = parseJSON,
stringify: (value: unknown) => string = JSON.stringify,
): LocalStorageState<T | undefined> {
@@ -114,7 +114,7 @@ function useLocalStorage<T>(
// `localStorage.setItem()` will throw
// - trying to access localStorage object when cookies are disabled in Safari throws
// "SecurityError: The operation is insecure."
// eslint-disable-next-line no-console
goodTry(() => {
const string = stringify(defaultValue);
localStorage.setItem(key, string);

View File

@@ -630,7 +630,7 @@ async function duplicateWorkspace(
workspace: Workspace | null,
duplicateToProject: Project | null,
newWorkspaceName: string,
needPushSnapshotOnInitialize: boolean = false,
needPushSnapshotOnInitialize = false,
) {
invariant(workspace, 'Workspace not found');
invariant(duplicateToProject, 'Project not found');

View File

@@ -181,7 +181,7 @@ const getMethodsFromOpenApiPathItem = (
'patch',
'trace',
].filter(method =>
// @ts-expect-error -- shrug
// @ts-expect-error -- shrug I don't care what pathItem has in it
pathItem[method]);
return methods;
@@ -448,19 +448,19 @@ const Design: FC = () => {
setDirection('vertical');
return () => { };
}
// Listen on media query changes
const mediaQuery = window.matchMedia('(max-width: 880px)');
setDirection(mediaQuery.matches ? 'vertical' : 'horizontal');
// Listen on media query changes
const mediaQuery = window.matchMedia('(max-width: 880px)');
setDirection(mediaQuery.matches ? 'vertical' : 'horizontal');
const handleChange = (e: MediaQueryListEvent) => {
setDirection(e.matches ? 'vertical' : 'horizontal');
};
const handleChange = (e: MediaQueryListEvent) => {
setDirection(e.matches ? 'vertical' : 'horizontal');
};
mediaQuery.addEventListener('change', handleChange);
mediaQuery.addEventListener('change', handleChange);
return () => {
mediaQuery.removeEventListener('change', handleChange);
};
return () => {
mediaQuery.removeEventListener('change', handleChange);
};
}, [settings.forceVerticalLayout, direction]);

View File

@@ -377,7 +377,7 @@ export const syncOrganizationStorageRuleAction: ActionFunction = async ({ params
export async function fetchAndCacheOrganizationStorageRule(
organizationId: string | undefined,
forceFetch: boolean = false,
forceFetch = false,
): Promise<ORG_STORAGE_RULE> {
invariant(organizationId, 'Organization ID is required');

View File

@@ -45,8 +45,7 @@ async function aggregateAllTimelines(errorMsg: string | null, testResult: Runner
let timelines = new Array<ResponseTimelineEntry>();
const responsesInfo = testResult.responsesInfo;
for (let i = 0; i < responsesInfo.length; i++) {
const respInfo = responsesInfo[i];
for (const respInfo of responsesInfo) {
const resp = await models.response.getById(respInfo.responseId);
if (resp) {
@@ -149,19 +148,19 @@ export const Runner: FC<{}> = () => {
setDirection('vertical');
return () => { };
}
// Listen on media query changes
const mediaQuery = window.matchMedia('(max-width: 880px)');
setDirection(mediaQuery.matches ? 'vertical' : 'horizontal');
// Listen on media query changes
const mediaQuery = window.matchMedia('(max-width: 880px)');
setDirection(mediaQuery.matches ? 'vertical' : 'horizontal');
const handleChange = (e: MediaQueryListEvent) => {
setDirection(e.matches ? 'vertical' : 'horizontal');
};
const handleChange = (e: MediaQueryListEvent) => {
setDirection(e.matches ? 'vertical' : 'horizontal');
};
mediaQuery.addEventListener('change', handleChange);
mediaQuery.addEventListener('change', handleChange);
return () => {
mediaQuery.removeEventListener('change', handleChange);
};
return () => {
mediaQuery.removeEventListener('change', handleChange);
};
}, [settings.forceVerticalLayout, direction]);
@@ -382,10 +381,10 @@ export const Runner: FC<{}> = () => {
if (!isRunning) {
if (executionResult?.iterationResults) {
for (let i = 0; i < executionResult.iterationResults.length; i++) { // iterations
for (let j = 0; j < executionResult.iterationResults[i].length; j++) { // requests
for (let k = 0; k < executionResult.iterationResults[i][j].results.length; k++) { // test cases
if (executionResult.iterationResults[i][j].results[k].status === 'passed') {
for (const iteration of executionResult.iterationResults) {
for (const requests of iteration) {
for (const testCase of requests.results) {
if (testCase.status === 'passed') {
passedTestCount++;
}
totalTestCount++;
@@ -881,7 +880,7 @@ export const runCollectionAction: ActionFunction = async ({ request, params }) =
startExecution(runnerId);
const noLogRuntime = {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
appendTimeline: async (_timelinePath: string, _logs: string[]) => { }, // no op
};

View File

@@ -33,9 +33,7 @@ const SUPPORTED_ARGS = [
type Pair = string | boolean;
interface PairsByName {
[name: string]: Pair[];
}
type PairsByName = Record<string, Pair[]>;
const importCommand = (parseEntries: ParseEntry[]): ImportRequest => {
// ~~~~~~~~~~~~~~~~~~~~~ //

View File

@@ -22,7 +22,7 @@ function isPlainObject(value: any) {
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in value) && !(Symbol.iterator in value);
}
/* eslint-disable camelcase -- some camecase is required by the parsing of the spec itself */
const SUPPORTED_OPENAPI_VERSION = /^3\.\d+\.\d+$/;

View File

@@ -16,9 +16,7 @@ interface Environment {
_postman_variable_scope: 'environment' | string;
}
type Data = {
[key in EnvVar['key']]: EnvVar['value'];
};
type Data = Record<EnvVar['key'], EnvVar['value']>;
export enum POSTMAN_ENV_TYPE {
GLOBAL = 'globals',

View File

@@ -136,14 +136,13 @@ export class ImportPostman {
this.collection = collection;
}
importVariable = (variables: { [key: string]: string }[]) => {
importVariable = (variables: Record<string, string>[]) => {
if (variables?.length === 0) {
return null;
}
const variable: { [key: string]: string } = {};
for (let i = 0; i < variables.length; i++) {
const { key, value } = variables[i];
const variable: Record<string, string> = {};
for (const { key, value } of variables) {
if (key === undefined) {
continue;
}
@@ -307,7 +306,7 @@ export class ImportPostman {
event,
} = this.collection;
const postmanVariable = this.importVariable((variable as { [key: string]: string }[]) || []);
const postmanVariable = this.importVariable((variable as Record<string, string>[]) || []);
const { authentication } = this.importAuthentication(auth);
const preRequestScript = this.importPreRequestScript(event);
const afterResponseScript = this.importAfterResponseScript(event);

View File

@@ -21,7 +21,7 @@ export const id = 'swagger2';
export const name = 'Swagger 2.0';
export const description = 'Importer for Swagger 2.0 specification (json/yaml)';
/* eslint-disable camelcase -- this file uses camel case too often */
/**
* Return Insomnia folder / request group
@@ -102,7 +102,7 @@ const parseEndpoints = (document: OpenAPIV2.Document) => {
...accumulator,
...(name === undefined ? {} : { [name]: _id }),
}),
{} as { [name: string]: string | undefined },
{} as Record<string, string | undefined>,
);
const requests: ImportRequest[] = [];
@@ -442,11 +442,9 @@ const generateParameterExample = (
parameter: OpenAPIV2.Parameter | TypeExample,
ancestors: OpenAPIV2.Parameter[] = [],
) => {
const typeExamples: {
[kind in TypeExample]: (
const typeExamples: Record<TypeExample, (
parameter: OpenAPIV2.Parameter
) => null | string | boolean | number | Record<string, unknown>;
} = {
) => null | string | boolean | number | Record<string, unknown>> = {
string: () => 'string',
string_email: () => 'user@example.com',
'string_date-time': () => new Date().toISOString(),