From c6d523c4b5b88bedd68b8039d7f8e520854430a8 Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Sun, 28 May 2023 20:19:29 +1000 Subject: [PATCH] More eslint improvements --- .eslintrc.cjs | 4 + examples/react/algolia/.eslintrc | 10 +- .../react/basic-graphql-request/.eslintrc | 9 +- examples/react/basic-typescript/.eslintrc | 6 +- examples/react/basic/.eslintrc | 6 +- .../react/default-query-function/.eslintrc | 9 +- examples/react/offline/.eslintrc | 9 +- examples/react/playground/.eslintrc | 9 +- examples/react/react-router/.eslintrc | 9 +- examples/react/rick-morty/.eslintrc | 9 +- examples/react/simple/.eslintrc | 9 +- examples/react/star-wars/.eslintrc | 9 +- examples/react/suspense/.eslintrc | 9 +- .../solid/basic-graphql-request/.eslintrc | 7 +- examples/solid/basic-typescript/.eslintrc | 7 +- .../solid/default-query-function/.eslintrc | 7 +- examples/solid/simple/.eslintrc | 7 +- .../solid/solid-start-streaming/.eslintrc | 6 +- nx.json | 6 +- package.json | 4 - packages/codemods/.eslintrc.cjs | 2 - packages/eslint-plugin-query/.eslintrc.cjs | 2 - .../.eslintrc.cjs | 2 - .../.eslintrc.cjs | 2 - packages/query-core/.eslintrc.cjs | 2 - packages/query-devtools/.eslintrc.cjs | 2 - .../query-persist-client-core/.eslintrc.cjs | 2 - .../.eslintrc.cjs | 2 - packages/react-query-devtools/.eslintrc.cjs | 6 +- .../react-query-persist-client/.eslintrc.cjs | 6 +- packages/react-query/.eslintrc.cjs | 6 +- packages/solid-query/.eslintrc.cjs | 2 - packages/svelte-query-devtools/.eslintrc.cjs | 3 +- packages/svelte-query/.eslintrc.cjs | 3 +- packages/vue-query/.eslintrc.cjs | 2 - pnpm-lock.yaml | 190 +----------------- scripts/publish.ts | 2 +- 37 files changed, 85 insertions(+), 302 deletions(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index d39d1b574e..574da2aebe 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -8,6 +8,7 @@ module.exports = { extends: [ 'plugin:@typescript-eslint/eslint-recommended', 'plugin:@typescript-eslint/recommended', + 'plugin:import/recommended', 'plugin:import/typescript', 'prettier', ], @@ -46,7 +47,10 @@ module.exports = { '@typescript-eslint/no-inferrable-types': [ 'error', { ignoreParameters: true }, ], + 'import/default': 'off', + 'import/export': 'off', 'import/no-cycle': 'error', + 'import/no-duplicates': 'off', 'import/no-unresolved': ['error', { ignore: ['^@tanstack/'] }], 'import/no-unused-modules': ['off', { unusedExports: true }], 'no-redeclare': 'off', diff --git a/examples/react/algolia/.eslintrc b/examples/react/algolia/.eslintrc index 46ff287e38..775fadbac6 100644 --- a/examples/react/algolia/.eslintrc +++ b/examples/react/algolia/.eslintrc @@ -1,7 +1,7 @@ { - "extends": ["react-app", "prettier", "plugin:@tanstack/eslint-plugin-query/recommended"], - "rules": { - "react/jsx-uses-react": "off", - "react/react-in-jsx-scope": "off" - } + "extends": [ + "plugin:react/recommended", + "plugin:react-hooks/recommended", + "plugin:@tanstack/eslint-plugin-query/recommended" + ] } diff --git a/examples/react/basic-graphql-request/.eslintrc b/examples/react/basic-graphql-request/.eslintrc index 404725ad66..e456e4af4e 100644 --- a/examples/react/basic-graphql-request/.eslintrc +++ b/examples/react/basic-graphql-request/.eslintrc @@ -1,7 +1,6 @@ { - "extends": ["react-app", "prettier"], - "rules": { - // "eqeqeq": 0, - // "jsx-a11y/anchor-is-valid": 0 - } + "extends": [ + "plugin:react/recommended", + "plugin:react-hooks/recommended" + ] } diff --git a/examples/react/basic-typescript/.eslintrc b/examples/react/basic-typescript/.eslintrc index 1699a80e89..775fadbac6 100644 --- a/examples/react/basic-typescript/.eslintrc +++ b/examples/react/basic-typescript/.eslintrc @@ -1,3 +1,7 @@ { - "extends": ["react-app", "prettier", "plugin:@tanstack/eslint-plugin-query/recommended"] + "extends": [ + "plugin:react/recommended", + "plugin:react-hooks/recommended", + "plugin:@tanstack/eslint-plugin-query/recommended" + ] } diff --git a/examples/react/basic/.eslintrc b/examples/react/basic/.eslintrc index 1699a80e89..775fadbac6 100644 --- a/examples/react/basic/.eslintrc +++ b/examples/react/basic/.eslintrc @@ -1,3 +1,7 @@ { - "extends": ["react-app", "prettier", "plugin:@tanstack/eslint-plugin-query/recommended"] + "extends": [ + "plugin:react/recommended", + "plugin:react-hooks/recommended", + "plugin:@tanstack/eslint-plugin-query/recommended" + ] } diff --git a/examples/react/default-query-function/.eslintrc b/examples/react/default-query-function/.eslintrc index 404725ad66..e456e4af4e 100644 --- a/examples/react/default-query-function/.eslintrc +++ b/examples/react/default-query-function/.eslintrc @@ -1,7 +1,6 @@ { - "extends": ["react-app", "prettier"], - "rules": { - // "eqeqeq": 0, - // "jsx-a11y/anchor-is-valid": 0 - } + "extends": [ + "plugin:react/recommended", + "plugin:react-hooks/recommended" + ] } diff --git a/examples/react/offline/.eslintrc b/examples/react/offline/.eslintrc index 404725ad66..e456e4af4e 100644 --- a/examples/react/offline/.eslintrc +++ b/examples/react/offline/.eslintrc @@ -1,7 +1,6 @@ { - "extends": ["react-app", "prettier"], - "rules": { - // "eqeqeq": 0, - // "jsx-a11y/anchor-is-valid": 0 - } + "extends": [ + "plugin:react/recommended", + "plugin:react-hooks/recommended" + ] } diff --git a/examples/react/playground/.eslintrc b/examples/react/playground/.eslintrc index 404725ad66..e456e4af4e 100644 --- a/examples/react/playground/.eslintrc +++ b/examples/react/playground/.eslintrc @@ -1,7 +1,6 @@ { - "extends": ["react-app", "prettier"], - "rules": { - // "eqeqeq": 0, - // "jsx-a11y/anchor-is-valid": 0 - } + "extends": [ + "plugin:react/recommended", + "plugin:react-hooks/recommended" + ] } diff --git a/examples/react/react-router/.eslintrc b/examples/react/react-router/.eslintrc index 404725ad66..e456e4af4e 100644 --- a/examples/react/react-router/.eslintrc +++ b/examples/react/react-router/.eslintrc @@ -1,7 +1,6 @@ { - "extends": ["react-app", "prettier"], - "rules": { - // "eqeqeq": 0, - // "jsx-a11y/anchor-is-valid": 0 - } + "extends": [ + "plugin:react/recommended", + "plugin:react-hooks/recommended" + ] } diff --git a/examples/react/rick-morty/.eslintrc b/examples/react/rick-morty/.eslintrc index 404725ad66..e456e4af4e 100644 --- a/examples/react/rick-morty/.eslintrc +++ b/examples/react/rick-morty/.eslintrc @@ -1,7 +1,6 @@ { - "extends": ["react-app", "prettier"], - "rules": { - // "eqeqeq": 0, - // "jsx-a11y/anchor-is-valid": 0 - } + "extends": [ + "plugin:react/recommended", + "plugin:react-hooks/recommended" + ] } diff --git a/examples/react/simple/.eslintrc b/examples/react/simple/.eslintrc index 404725ad66..e456e4af4e 100644 --- a/examples/react/simple/.eslintrc +++ b/examples/react/simple/.eslintrc @@ -1,7 +1,6 @@ { - "extends": ["react-app", "prettier"], - "rules": { - // "eqeqeq": 0, - // "jsx-a11y/anchor-is-valid": 0 - } + "extends": [ + "plugin:react/recommended", + "plugin:react-hooks/recommended" + ] } diff --git a/examples/react/star-wars/.eslintrc b/examples/react/star-wars/.eslintrc index 404725ad66..e456e4af4e 100644 --- a/examples/react/star-wars/.eslintrc +++ b/examples/react/star-wars/.eslintrc @@ -1,7 +1,6 @@ { - "extends": ["react-app", "prettier"], - "rules": { - // "eqeqeq": 0, - // "jsx-a11y/anchor-is-valid": 0 - } + "extends": [ + "plugin:react/recommended", + "plugin:react-hooks/recommended" + ] } diff --git a/examples/react/suspense/.eslintrc b/examples/react/suspense/.eslintrc index 404725ad66..e456e4af4e 100644 --- a/examples/react/suspense/.eslintrc +++ b/examples/react/suspense/.eslintrc @@ -1,7 +1,6 @@ { - "extends": ["react-app", "prettier"], - "rules": { - // "eqeqeq": 0, - // "jsx-a11y/anchor-is-valid": 0 - } + "extends": [ + "plugin:react/recommended", + "plugin:react-hooks/recommended" + ] } diff --git a/examples/solid/basic-graphql-request/.eslintrc b/examples/solid/basic-graphql-request/.eslintrc index 86b22fec59..d445a4e4e1 100644 --- a/examples/solid/basic-graphql-request/.eslintrc +++ b/examples/solid/basic-graphql-request/.eslintrc @@ -1,10 +1,5 @@ { "parserOptions": { - "project": "./tsconfig.json", - "sourceType": "module" - }, - "rules": { - "react/react-in-jsx-scope": "off", - "jsx-a11y/anchor-is-valid": "off" + "project": "./tsconfig.json" } } diff --git a/examples/solid/basic-typescript/.eslintrc b/examples/solid/basic-typescript/.eslintrc index 86b22fec59..d445a4e4e1 100644 --- a/examples/solid/basic-typescript/.eslintrc +++ b/examples/solid/basic-typescript/.eslintrc @@ -1,10 +1,5 @@ { "parserOptions": { - "project": "./tsconfig.json", - "sourceType": "module" - }, - "rules": { - "react/react-in-jsx-scope": "off", - "jsx-a11y/anchor-is-valid": "off" + "project": "./tsconfig.json" } } diff --git a/examples/solid/default-query-function/.eslintrc b/examples/solid/default-query-function/.eslintrc index 86b22fec59..d445a4e4e1 100644 --- a/examples/solid/default-query-function/.eslintrc +++ b/examples/solid/default-query-function/.eslintrc @@ -1,10 +1,5 @@ { "parserOptions": { - "project": "./tsconfig.json", - "sourceType": "module" - }, - "rules": { - "react/react-in-jsx-scope": "off", - "jsx-a11y/anchor-is-valid": "off" + "project": "./tsconfig.json" } } diff --git a/examples/solid/simple/.eslintrc b/examples/solid/simple/.eslintrc index ea632a1553..c0c21e7b8a 100644 --- a/examples/solid/simple/.eslintrc +++ b/examples/solid/simple/.eslintrc @@ -1,11 +1,6 @@ { "extends": ["plugin:@tanstack/eslint-plugin-query/recommended"], "parserOptions": { - "project": "./tsconfig.json", - "sourceType": "module" - }, - "rules": { - "react/react-in-jsx-scope": "off", - "jsx-a11y/accessible-emoji": "off", + "project": "./tsconfig.json" } } diff --git a/examples/solid/solid-start-streaming/.eslintrc b/examples/solid/solid-start-streaming/.eslintrc index 82d26e5b94..d445a4e4e1 100644 --- a/examples/solid/solid-start-streaming/.eslintrc +++ b/examples/solid/solid-start-streaming/.eslintrc @@ -1,7 +1,5 @@ { - "extends": ["../../../.eslintrc"], - "rules": { - "react/react-in-jsx-scope": "off", - "import/no-unresolved": "off" + "parserOptions": { + "project": "./tsconfig.json" } } diff --git a/nx.json b/nx.json index 94ac6b1639..59a719a79f 100644 --- a/nx.json +++ b/nx.json @@ -31,7 +31,7 @@ "{workspaceRoot}/tsconfig.base.json", "{workspaceRoot}/package.json" ], - "globalNonBuildAffectingConfig": ["{workspaceRoot}/.eslintrc"], + "globalNonBuildAffectingConfig": ["{workspaceRoot}/.eslintrc.cjs"], "default": [ "{projectRoot}/**/*", "globalBuildAffectingConfig", @@ -41,9 +41,9 @@ ], "public": [ "default", - "!{workspaceRoot}/.eslintrc", + "!{workspaceRoot}/.eslintrc.cjs", "!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)", - "!{projectRoot}/.eslintrc*", + "!{projectRoot}/.eslintrc.cjs", "!{projectRoot}/tsconfig.eslint.json" ] }, diff --git a/package.json b/package.json index 13d1d1be74..4b56a9c30c 100644 --- a/package.json +++ b/package.json @@ -65,12 +65,8 @@ "current-git-branch": "^1.1.0", "eslint": "^8.34.0", "eslint-config-prettier": "^8.8.0", - "eslint-config-react-app": "^7.0.1", "eslint-import-resolver-typescript": "^3.5.5", "eslint-plugin-import": "^2.27.5", - "eslint-plugin-jsx-a11y": "^6.7.1", - "eslint-plugin-prettier": "^4.2.1", - "eslint-plugin-promise": "^6.1.1", "eslint-plugin-react": "^7.32.2", "eslint-plugin-react-hooks": "^4.6.0", "git-log-parser": "^1.2.0", diff --git a/packages/codemods/.eslintrc.cjs b/packages/codemods/.eslintrc.cjs index 26a1b3978d..6907d4b634 100644 --- a/packages/codemods/.eslintrc.cjs +++ b/packages/codemods/.eslintrc.cjs @@ -2,8 +2,6 @@ /** @type {import('eslint').Linter.Config} */ const config = { - root: true, - extends: ['../../.eslintrc.cjs'], parserOptions: { tsconfigRootDir: __dirname, project: './tsconfig.eslint.json', diff --git a/packages/eslint-plugin-query/.eslintrc.cjs b/packages/eslint-plugin-query/.eslintrc.cjs index 8eb8791b6f..52b44816b8 100644 --- a/packages/eslint-plugin-query/.eslintrc.cjs +++ b/packages/eslint-plugin-query/.eslintrc.cjs @@ -2,8 +2,6 @@ /** @type {import('eslint').Linter.Config} */ const config = { - root: true, - extends: ['../../.eslintrc.cjs'], parserOptions: { tsconfigRootDir: __dirname, project: './tsconfig.eslint.json', diff --git a/packages/query-async-storage-persister/.eslintrc.cjs b/packages/query-async-storage-persister/.eslintrc.cjs index 8eb8791b6f..52b44816b8 100644 --- a/packages/query-async-storage-persister/.eslintrc.cjs +++ b/packages/query-async-storage-persister/.eslintrc.cjs @@ -2,8 +2,6 @@ /** @type {import('eslint').Linter.Config} */ const config = { - root: true, - extends: ['../../.eslintrc.cjs'], parserOptions: { tsconfigRootDir: __dirname, project: './tsconfig.eslint.json', diff --git a/packages/query-broadcast-client-experimental/.eslintrc.cjs b/packages/query-broadcast-client-experimental/.eslintrc.cjs index 8eb8791b6f..52b44816b8 100644 --- a/packages/query-broadcast-client-experimental/.eslintrc.cjs +++ b/packages/query-broadcast-client-experimental/.eslintrc.cjs @@ -2,8 +2,6 @@ /** @type {import('eslint').Linter.Config} */ const config = { - root: true, - extends: ['../../.eslintrc.cjs'], parserOptions: { tsconfigRootDir: __dirname, project: './tsconfig.eslint.json', diff --git a/packages/query-core/.eslintrc.cjs b/packages/query-core/.eslintrc.cjs index 8eb8791b6f..52b44816b8 100644 --- a/packages/query-core/.eslintrc.cjs +++ b/packages/query-core/.eslintrc.cjs @@ -2,8 +2,6 @@ /** @type {import('eslint').Linter.Config} */ const config = { - root: true, - extends: ['../../.eslintrc.cjs'], parserOptions: { tsconfigRootDir: __dirname, project: './tsconfig.eslint.json', diff --git a/packages/query-devtools/.eslintrc.cjs b/packages/query-devtools/.eslintrc.cjs index 8eb8791b6f..52b44816b8 100644 --- a/packages/query-devtools/.eslintrc.cjs +++ b/packages/query-devtools/.eslintrc.cjs @@ -2,8 +2,6 @@ /** @type {import('eslint').Linter.Config} */ const config = { - root: true, - extends: ['../../.eslintrc.cjs'], parserOptions: { tsconfigRootDir: __dirname, project: './tsconfig.eslint.json', diff --git a/packages/query-persist-client-core/.eslintrc.cjs b/packages/query-persist-client-core/.eslintrc.cjs index 8eb8791b6f..52b44816b8 100644 --- a/packages/query-persist-client-core/.eslintrc.cjs +++ b/packages/query-persist-client-core/.eslintrc.cjs @@ -2,8 +2,6 @@ /** @type {import('eslint').Linter.Config} */ const config = { - root: true, - extends: ['../../.eslintrc.cjs'], parserOptions: { tsconfigRootDir: __dirname, project: './tsconfig.eslint.json', diff --git a/packages/query-sync-storage-persister/.eslintrc.cjs b/packages/query-sync-storage-persister/.eslintrc.cjs index 8eb8791b6f..52b44816b8 100644 --- a/packages/query-sync-storage-persister/.eslintrc.cjs +++ b/packages/query-sync-storage-persister/.eslintrc.cjs @@ -2,8 +2,6 @@ /** @type {import('eslint').Linter.Config} */ const config = { - root: true, - extends: ['../../.eslintrc.cjs'], parserOptions: { tsconfigRootDir: __dirname, project: './tsconfig.eslint.json', diff --git a/packages/react-query-devtools/.eslintrc.cjs b/packages/react-query-devtools/.eslintrc.cjs index c0bb45efe9..2578431a12 100644 --- a/packages/react-query-devtools/.eslintrc.cjs +++ b/packages/react-query-devtools/.eslintrc.cjs @@ -2,8 +2,10 @@ /** @type {import('eslint').Linter.Config} */ const config = { - root: true, - extends: ['../../.eslintrc.cjs', 'react-app',], + extends: [ + 'plugin:react/recommended', + 'plugin:react-hooks/recommended', + ], parserOptions: { tsconfigRootDir: __dirname, project: './tsconfig.eslint.json', diff --git a/packages/react-query-persist-client/.eslintrc.cjs b/packages/react-query-persist-client/.eslintrc.cjs index c0bb45efe9..2578431a12 100644 --- a/packages/react-query-persist-client/.eslintrc.cjs +++ b/packages/react-query-persist-client/.eslintrc.cjs @@ -2,8 +2,10 @@ /** @type {import('eslint').Linter.Config} */ const config = { - root: true, - extends: ['../../.eslintrc.cjs', 'react-app',], + extends: [ + 'plugin:react/recommended', + 'plugin:react-hooks/recommended', + ], parserOptions: { tsconfigRootDir: __dirname, project: './tsconfig.eslint.json', diff --git a/packages/react-query/.eslintrc.cjs b/packages/react-query/.eslintrc.cjs index c0bb45efe9..2578431a12 100644 --- a/packages/react-query/.eslintrc.cjs +++ b/packages/react-query/.eslintrc.cjs @@ -2,8 +2,10 @@ /** @type {import('eslint').Linter.Config} */ const config = { - root: true, - extends: ['../../.eslintrc.cjs', 'react-app',], + extends: [ + 'plugin:react/recommended', + 'plugin:react-hooks/recommended', + ], parserOptions: { tsconfigRootDir: __dirname, project: './tsconfig.eslint.json', diff --git a/packages/solid-query/.eslintrc.cjs b/packages/solid-query/.eslintrc.cjs index 8eb8791b6f..52b44816b8 100644 --- a/packages/solid-query/.eslintrc.cjs +++ b/packages/solid-query/.eslintrc.cjs @@ -2,8 +2,6 @@ /** @type {import('eslint').Linter.Config} */ const config = { - root: true, - extends: ['../../.eslintrc.cjs'], parserOptions: { tsconfigRootDir: __dirname, project: './tsconfig.eslint.json', diff --git a/packages/svelte-query-devtools/.eslintrc.cjs b/packages/svelte-query-devtools/.eslintrc.cjs index aab5f1b07c..ae50e465c6 100644 --- a/packages/svelte-query-devtools/.eslintrc.cjs +++ b/packages/svelte-query-devtools/.eslintrc.cjs @@ -2,8 +2,7 @@ /** @type {import('eslint').Linter.Config} */ const config = { - root: true, - extends: ['../../.eslintrc.cjs', 'plugin:svelte/recommended'], + extends: ['plugin:svelte/recommended'], parserOptions: { tsconfigRootDir: __dirname, project: './tsconfig.json', diff --git a/packages/svelte-query/.eslintrc.cjs b/packages/svelte-query/.eslintrc.cjs index aab5f1b07c..ae50e465c6 100644 --- a/packages/svelte-query/.eslintrc.cjs +++ b/packages/svelte-query/.eslintrc.cjs @@ -2,8 +2,7 @@ /** @type {import('eslint').Linter.Config} */ const config = { - root: true, - extends: ['../../.eslintrc.cjs', 'plugin:svelte/recommended'], + extends: ['plugin:svelte/recommended'], parserOptions: { tsconfigRootDir: __dirname, project: './tsconfig.json', diff --git a/packages/vue-query/.eslintrc.cjs b/packages/vue-query/.eslintrc.cjs index 8eb8791b6f..52b44816b8 100644 --- a/packages/vue-query/.eslintrc.cjs +++ b/packages/vue-query/.eslintrc.cjs @@ -2,8 +2,6 @@ /** @type {import('eslint').Linter.Config} */ const config = { - root: true, - extends: ['../../.eslintrc.cjs'], parserOptions: { tsconfigRootDir: __dirname, project: './tsconfig.eslint.json', diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 262bfb5c6a..dc5f33414a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -111,24 +111,12 @@ importers: eslint-config-prettier: specifier: ^8.8.0 version: 8.8.0(eslint@8.34.0) - eslint-config-react-app: - specifier: ^7.0.1 - version: 7.0.1(@babel/plugin-syntax-flow@7.18.6)(@babel/plugin-transform-react-jsx@7.19.0)(eslint-import-resolver-typescript@3.5.5)(eslint@8.34.0)(typescript@5.0.4) eslint-import-resolver-typescript: specifier: ^3.5.5 version: 3.5.5(@typescript-eslint/parser@5.59.7)(eslint-plugin-import@2.27.5)(eslint@8.34.0) eslint-plugin-import: specifier: ^2.27.5 version: 2.27.5(@typescript-eslint/parser@5.59.7)(eslint-import-resolver-typescript@3.5.5)(eslint@8.34.0) - eslint-plugin-jsx-a11y: - specifier: ^6.7.1 - version: 6.7.1(eslint@8.34.0) - eslint-plugin-prettier: - specifier: ^4.2.1 - version: 4.2.1(eslint-config-prettier@8.8.0)(eslint@8.34.0)(prettier@2.8.8) - eslint-plugin-promise: - specifier: ^6.1.1 - version: 6.1.1(eslint@8.34.0) eslint-plugin-react: specifier: ^7.32.2 version: 7.32.2(eslint@8.34.0) @@ -2086,6 +2074,7 @@ packages: '@babel/plugin-syntax-decorators': 7.18.6(@babel/core@7.21.8) transitivePeerDependencies: - supports-color + dev: false /@babel/plugin-proposal-dynamic-import@7.18.6(@babel/core@7.21.8): resolution: {integrity: sha512-1auuwmK+Rz13SJj36R+jqFPMJWyKEDd7lLSdOj4oJK0UTgGueSAtkrCvz9ewmgyU/P941Rv2fQwZJN8s6QruXw==} @@ -2261,6 +2250,7 @@ packages: dependencies: '@babel/core': 7.21.8 '@babel/helper-plugin-utils': 7.21.5 + dev: false /@babel/plugin-syntax-dynamic-import@7.8.3(@babel/core@7.21.8): resolution: {integrity: sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==} @@ -2766,6 +2756,7 @@ packages: semver: 6.3.0 transitivePeerDependencies: - supports-color + dev: false /@babel/plugin-transform-shorthand-properties@7.18.6(@babel/core@7.21.8): resolution: {integrity: sha512-eCLXXJqv8okzg86ywZJbRn19YJHU4XUa55oz2wbHhaQVn/MM+XhukiT7SYqp/7o00dg52Rj51Ny+Ecw4oyoygw==} @@ -5043,10 +5034,6 @@ packages: picomatch: 2.3.1 rollup: 3.23.0 - /@rushstack/eslint-patch@1.3.0: - resolution: {integrity: sha512-IthPJsJR85GhOkp3Hvp8zFOPK5ynKn6STyHa/WZpioK7E1aYDiBzpqQPrngc14DszIUkIrdd3k9Iu0XSzlP/1w==} - dev: true - /@segment/loosely-validate-event@2.0.0: resolution: {integrity: sha512-ZMCSfztDBqwotkl848ODgVcAmN4OItEWDCkshcKz0/W6gGSQayuuCtWV/MlodFivAZD793d6UgANd6wCXUfrIw==} dependencies: @@ -5612,6 +5599,7 @@ packages: /@types/parse-json@4.0.0: resolution: {integrity: sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==} + dev: false /@types/prop-types@15.7.5: resolution: {integrity: sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==} @@ -5732,19 +5720,6 @@ packages: - supports-color dev: true - /@typescript-eslint/experimental-utils@5.59.7(eslint@8.34.0)(typescript@5.0.4): - resolution: {integrity: sha512-jqM0Cjfvta/sBlY1MxdXYv853/dJUC2wmUWnKoG2srwp0njNGQ6Zu/XLWoRFiLvocQbzBbpHkPFwKgC2UqyovA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - dependencies: - '@typescript-eslint/utils': 5.59.7(eslint@8.34.0)(typescript@5.0.4) - eslint: 8.34.0 - transitivePeerDependencies: - - supports-color - - typescript - dev: true - /@typescript-eslint/parser@5.59.7(eslint@8.34.0)(typescript@5.0.4): resolution: {integrity: sha512-VhpsIEuq/8i5SF+mPg9jSdIwgMBBp0z9XqjiEay+81PYLJuroN+ET1hM5IhkiYMJd9MkTz8iJLt7aaGAgzWUbQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -6450,11 +6425,6 @@ packages: engines: {node: '>= 0.4'} dev: true - /axe-core@4.6.3: - resolution: {integrity: sha512-/BQzOX780JhsxDnPpH4ZiyrJAzcd8AfzFPkv+89veFSr1rcMjuq2JDCwypKaPeB6ljHp9KjXhPpjgCvQlWYuqg==} - engines: {node: '>=4'} - dev: true - /axios@0.19.2: resolution: {integrity: sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==} deprecated: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410 @@ -6498,12 +6468,6 @@ packages: transitivePeerDependencies: - debug - /axobject-query@3.1.1: - resolution: {integrity: sha512-goKlv8DZrK9hUh975fnHzhNIO4jUnFCfv/dszV5VwUGDFjI6vQ2VwoyjYjYNEbBE8AH87TduWP5uyDR1D+Iteg==} - dependencies: - deep-equal: 2.2.0 - dev: true - /babel-core@7.0.0-bridge.0(@babel/core@7.21.8): resolution: {integrity: sha512-poPX9mZH/5CSanm50Q+1toVci6pv5KSRv/5TWCwtzQS5XEwn40BcCrgIeMFWP9CKKIniKXNxoIOnOq4VVlGXhg==} peerDependencies: @@ -6534,6 +6498,7 @@ packages: '@babel/runtime': 7.21.0 cosmiconfig: 7.1.0 resolve: 1.22.2 + dev: false /babel-plugin-module-resolver@4.1.0: resolution: {integrity: sha512-MlX10UDheRr3lb3P0WcaIdtCSRlxdQsB1sBqL7W0raF070bGl1HQQq5K3T2vf2XAYie+ww+5AKC/WrkjRO2knA==} @@ -6587,10 +6552,6 @@ packages: resolution: {integrity: sha512-Xj9XuRuz3nTSbaTXWv3itLOcxyF4oPD8douBBmj7U9BBC6nEBYfyOJYQMf/8PJAFotC62UY5dFfIGEPr7WswzQ==} dev: false - /babel-plugin-transform-react-remove-prop-types@0.4.24: - resolution: {integrity: sha512-eqj0hVcJUR57/Ug2zE1Yswsw4LhuqqHhD+8v120T1cl3kjg76QwtyBrdIk4WVwK+lAhBJVYCd/v+4nc4y+8JsA==} - dev: true - /babel-preset-expo@9.3.2(@babel/core@7.21.8): resolution: {integrity: sha512-BjyvjwjJG0MaaDBLP/esbXRrAItM76po9L9zfnLxeqgFsHCIPmD+6ir45coDLGAXwR8m9It3G1yqYM9JPyemsQ==} dependencies: @@ -6643,30 +6604,6 @@ packages: - supports-color dev: false - /babel-preset-react-app@10.0.1: - resolution: {integrity: sha512-b0D9IZ1WhhCWkrTXyFuIIgqGzSkRIH5D5AmB0bXbzYAB1OBAwHcUeyWW2LorutLWF5btNo/N7r/cIdmvvKJlYg==} - dependencies: - '@babel/core': 7.21.8 - '@babel/plugin-proposal-class-properties': 7.18.6(@babel/core@7.21.8) - '@babel/plugin-proposal-decorators': 7.18.6(@babel/core@7.21.8) - '@babel/plugin-proposal-nullish-coalescing-operator': 7.18.6(@babel/core@7.21.8) - '@babel/plugin-proposal-numeric-separator': 7.18.6(@babel/core@7.21.8) - '@babel/plugin-proposal-optional-chaining': 7.21.0(@babel/core@7.21.8) - '@babel/plugin-proposal-private-methods': 7.18.6(@babel/core@7.21.8) - '@babel/plugin-proposal-private-property-in-object': 7.21.0(@babel/core@7.21.8) - '@babel/plugin-transform-flow-strip-types': 7.18.6(@babel/core@7.21.8) - '@babel/plugin-transform-react-display-name': 7.18.6(@babel/core@7.21.8) - '@babel/plugin-transform-runtime': 7.21.0(@babel/core@7.21.8) - '@babel/preset-env': 7.21.5(@babel/core@7.21.8) - '@babel/preset-react': 7.18.6(@babel/core@7.21.8) - '@babel/preset-typescript': 7.21.5(@babel/core@7.21.8) - '@babel/runtime': 7.21.0 - babel-plugin-macros: 3.1.0 - babel-plugin-transform-react-remove-prop-types: 0.4.24 - transitivePeerDependencies: - - supports-color - dev: true - /babel-preset-solid@1.6.10(@babel/core@7.21.8): resolution: {integrity: sha512-qBLjzeWmgY5jX11sJg/lriXABYdClfJrJJrIHaT6G5EuGhxhm6jn7XjqXjLBZHBgy5n/Z+iqJ5YfQj8KG2jKTA==} peerDependencies: @@ -7364,10 +7301,6 @@ packages: yargs: 17.7.1 dev: true - /confusing-browser-globals@1.0.11: - resolution: {integrity: sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA==} - dev: true - /connect@3.7.0: resolution: {integrity: sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==} engines: {node: '>= 0.10.0'} @@ -7459,6 +7392,7 @@ packages: parse-json: 5.2.0 path-type: 4.0.0 yaml: 1.10.2 + dev: false /cp-file@9.1.0: resolution: {integrity: sha512-3scnzFj/94eb7y4wyXRWwvzLFaQp87yyfTnChIjlfYrVqp5lVO3E2hIJMeQIltUT0K2ZAB3An1qXcBmwGyvuwA==} @@ -7602,10 +7536,6 @@ packages: resolution: {integrity: sha512-+LSAiGFwQ9dRnRdOeaj7g47ZFJcOUPukAP8J3A3fuZ1g9Y44BG+P1sgApjLXTQPOzC4+7S9Wr8kXsfpINM4jpw==} dev: false - /damerau-levenshtein@1.0.8: - resolution: {integrity: sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==} - dev: true - /data-uri-to-buffer@4.0.1: resolution: {integrity: sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==} engines: {node: '>= 12'} @@ -7964,10 +7894,6 @@ packages: /emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} - /emoji-regex@9.2.2: - resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} - dev: true - /encodeurl@1.0.2: resolution: {integrity: sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==} engines: {node: '>= 0.8'} @@ -8389,41 +8315,6 @@ packages: eslint: 8.34.0 dev: true - /eslint-config-react-app@7.0.1(@babel/plugin-syntax-flow@7.18.6)(@babel/plugin-transform-react-jsx@7.19.0)(eslint-import-resolver-typescript@3.5.5)(eslint@8.34.0)(typescript@5.0.4): - resolution: {integrity: sha512-K6rNzvkIeHaTd8m/QEh1Zko0KI7BACWkkneSs6s9cKZC/J27X3eZR6Upt1jkmZ/4FK+XUOPPxMEN7+lbUXfSlA==} - engines: {node: '>=14.0.0'} - peerDependencies: - eslint: ^8.0.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@babel/core': 7.21.8 - '@babel/eslint-parser': 7.21.8(@babel/core@7.21.8)(eslint@8.34.0) - '@rushstack/eslint-patch': 1.3.0 - '@typescript-eslint/eslint-plugin': 5.59.7(@typescript-eslint/parser@5.59.7)(eslint@8.34.0)(typescript@5.0.4) - '@typescript-eslint/parser': 5.59.7(eslint@8.34.0)(typescript@5.0.4) - babel-preset-react-app: 10.0.1 - confusing-browser-globals: 1.0.11 - eslint: 8.34.0 - eslint-plugin-flowtype: 8.0.3(@babel/plugin-syntax-flow@7.18.6)(@babel/plugin-transform-react-jsx@7.19.0)(eslint@8.34.0) - eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.59.7)(eslint-import-resolver-typescript@3.5.5)(eslint@8.34.0) - eslint-plugin-jest: 25.7.0(@typescript-eslint/eslint-plugin@5.59.7)(eslint@8.34.0)(typescript@5.0.4) - eslint-plugin-jsx-a11y: 6.7.1(eslint@8.34.0) - eslint-plugin-react: 7.32.2(eslint@8.34.0) - eslint-plugin-react-hooks: 4.6.0(eslint@8.34.0) - eslint-plugin-testing-library: 5.11.0(eslint@8.34.0)(typescript@5.0.4) - typescript: 5.0.4 - transitivePeerDependencies: - - '@babel/plugin-syntax-flow' - - '@babel/plugin-transform-react-jsx' - - eslint-import-resolver-typescript - - eslint-import-resolver-webpack - - jest - - supports-color - dev: true - /eslint-import-resolver-alias@1.1.2(eslint-plugin-import@2.27.5): resolution: {integrity: sha512-WdviM1Eu834zsfjHtcGHtGfcu+F30Od3V7I9Fi57uhBEwPkjDcii7/yW8jAT+gOhn4P/vOxxNAXbFAKsrrc15w==} engines: {node: '>= 4'} @@ -8545,27 +8436,6 @@ packages: - supports-color dev: true - /eslint-plugin-jest@25.7.0(@typescript-eslint/eslint-plugin@5.59.7)(eslint@8.34.0)(typescript@5.0.4): - resolution: {integrity: sha512-PWLUEXeeF7C9QGKqvdSbzLOiLTx+bno7/HC9eefePfEb257QFHg7ye3dh80AZVkaa/RQsBB1Q/ORQvg2X7F0NQ==} - engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} - peerDependencies: - '@typescript-eslint/eslint-plugin': ^4.0.0 || ^5.0.0 - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - jest: '*' - peerDependenciesMeta: - '@typescript-eslint/eslint-plugin': - optional: true - jest: - optional: true - dependencies: - '@typescript-eslint/eslint-plugin': 5.59.7(@typescript-eslint/parser@5.59.7)(eslint@8.34.0)(typescript@5.0.4) - '@typescript-eslint/experimental-utils': 5.59.7(eslint@8.34.0)(typescript@5.0.4) - eslint: 8.34.0 - transitivePeerDependencies: - - supports-color - - typescript - dev: true - /eslint-plugin-jest@27.2.1(@typescript-eslint/eslint-plugin@5.59.7)(eslint@8.34.0)(typescript@5.0.4): resolution: {integrity: sha512-l067Uxx7ZT8cO9NJuf+eJHvt6bqJyz2Z29wykyEdz/OtmcELQl2MQGQLX8J94O1cSJWAwUSEvCjwjA7KEK3Hmg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -8587,31 +8457,6 @@ packages: - typescript dev: true - /eslint-plugin-jsx-a11y@6.7.1(eslint@8.34.0): - resolution: {integrity: sha512-63Bog4iIethyo8smBklORknVjB0T2dwB8Mr/hIC+fBS0uyHdYYpzM/Ed+YC8VxTjlXHEWFOdmgwcDn1U2L9VCA==} - engines: {node: '>=4.0'} - peerDependencies: - eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 - dependencies: - '@babel/runtime': 7.21.0 - aria-query: 5.1.3 - array-includes: 3.1.6 - array.prototype.flatmap: 1.3.1 - ast-types-flow: 0.0.7 - axe-core: 4.6.3 - axobject-query: 3.1.1 - damerau-levenshtein: 1.0.8 - emoji-regex: 9.2.2 - eslint: 8.34.0 - has: 1.0.3 - jsx-ast-utils: 3.3.3 - language-tags: 1.0.5 - minimatch: 3.1.2 - object.entries: 1.1.6 - object.fromentries: 2.0.6 - semver: 6.3.0 - dev: true - /eslint-plugin-prettier@4.2.1(eslint-config-prettier@8.8.0)(eslint@8.34.0)(prettier@2.8.8): resolution: {integrity: sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==} engines: {node: '>=12.0.0'} @@ -8725,19 +8570,6 @@ packages: - ts-node dev: true - /eslint-plugin-testing-library@5.11.0(eslint@8.34.0)(typescript@5.0.4): - resolution: {integrity: sha512-ELY7Gefo+61OfXKlQeXNIDVVLPcvKTeiQOoMZG9TeuWa7Ln4dUNRv8JdRWBQI9Mbb427XGlVB1aa1QPZxBJM8Q==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0, npm: '>=6'} - peerDependencies: - eslint: ^7.5.0 || ^8.0.0 - dependencies: - '@typescript-eslint/utils': 5.59.7(eslint@8.34.0)(typescript@5.0.4) - eslint: 8.34.0 - transitivePeerDependencies: - - supports-color - - typescript - dev: true - /eslint-restricted-globals@0.2.0: resolution: {integrity: sha512-kwYJALm5KS2QW3Mc1PgObO4V+pTR6RQtRT65L1GQILlEnAhabUQqGAX7/qUjoQR4KZJKehWpBtyDEiDecwmY9A==} dev: true @@ -11187,16 +11019,6 @@ packages: engines: {node: '>=14.16'} dev: false - /language-subtag-registry@0.3.22: - resolution: {integrity: sha512-tN0MCzyWnoz/4nHS6uxdlFWoUZT7ABptwKPQ52Ea7URk6vll88bWBVhodtnlfEuCcKWNGoc+uGbw1cwa9IKh/w==} - dev: true - - /language-tags@1.0.5: - resolution: {integrity: sha512-qJhlO9cGXi6hBGKoxEG/sKZDAHD5Hnu9Hs4WbOY3pCWXDhw0N8x1NenNzm2EnNLkLkk7J2SdxAkDSbb6ftT+UQ==} - dependencies: - language-subtag-registry: 0.3.22 - dev: true - /leven@3.1.0: resolution: {integrity: sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==} engines: {node: '>=6'} diff --git a/scripts/publish.ts b/scripts/publish.ts index 1b61361055..03395e7e97 100644 --- a/scripts/publish.ts +++ b/scripts/publish.ts @@ -6,7 +6,7 @@ import path from 'path' import { execSync } from 'child_process' import chalk from 'chalk' import jsonfile from 'jsonfile' -import semver from 'semver' +import * as semver from 'semver' import currentGitBranch from 'current-git-branch' import parseCommit from '@commitlint/parse' import log from 'git-log-parser'