From 0b1cdcc70d6ede900fdca423dcdd6ee05b00c1d9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 14 Jan 2023 01:13:48 +0000 Subject: [PATCH] chore(deps): update devdependency @nuxtjs/eslint-config-typescript to v12 (#9086) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Daniel Roe --- docs/scripts/gen-docs.ts | 1 + docs/scripts/map-redirects.js | 1 + examples/routing/layouts/middleware/other.ts | 2 +- package.json | 2 +- .../nuxt/src/app/components/nuxt-island.ts | 8 +- packages/nuxt/src/app/composables/ssr.ts | 2 +- packages/nuxt/src/app/entry.ts | 2 +- packages/nuxt/src/components/module.ts | 1 - packages/nuxt/src/components/scan.ts | 1 + packages/nuxt/src/pages/utils.ts | 2 +- packages/vite/src/dev-bundler.ts | 1 - packages/webpack/src/plugins/vue/client.ts | 2 +- pnpm-lock.yaml | 173 ++++++++++-------- test/fixtures/basic/composables/random.ts | 2 +- test/fixtures/basic/types.ts | 2 +- 15 files changed, 107 insertions(+), 95 deletions(-) diff --git a/docs/scripts/gen-docs.ts b/docs/scripts/gen-docs.ts index 6b153af04c7..81f4d6b8a7a 100644 --- a/docs/scripts/gen-docs.ts +++ b/docs/scripts/gen-docs.ts @@ -116,6 +116,7 @@ async function generateDocs ({ configFile, configTemplate }) { const start = Date.now() console.log(`Updating docs on ${configFile}`) const template = await readFile(configTemplate, 'utf8') + // eslint-disable-next-line @typescript-eslint/no-var-requires const rootSchema = require('../../packages/schema/schema/config.schema.json') as Schema const keys = Object.keys(rootSchema.properties).sort() let generatedDocs = '' diff --git a/docs/scripts/map-redirects.js b/docs/scripts/map-redirects.js index 252b8f34cf4..47b3b07c869 100644 --- a/docs/scripts/map-redirects.js +++ b/docs/scripts/map-redirects.js @@ -1,3 +1,4 @@ +// eslint-disable-next-line @typescript-eslint/no-var-requires const { readFile, writeFile } = require('node:fs/promises') const netlifyToVercel = (redirects) => { diff --git a/examples/routing/layouts/middleware/other.ts b/examples/routing/layouts/middleware/other.ts index ca4f1530628..24e3a839112 100644 --- a/examples/routing/layouts/middleware/other.ts +++ b/examples/routing/layouts/middleware/other.ts @@ -1,4 +1,4 @@ -// eslint-disable-next-line @typescript-eslint/no-unused-vars + export default defineNuxtRouteMiddleware(() => { setPageLayout('other') }) diff --git a/package.json b/package.json index 0746c53604b..937e9bbe79b 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "@nuxt/test-utils": "workspace:*", "@nuxt/vite-builder": "workspace:*", "@nuxt/webpack-builder": "workspace:*", - "@nuxtjs/eslint-config-typescript": "^11.0.0", + "@nuxtjs/eslint-config-typescript": "^12.0.0", "@types/crawler": "^1.2.2", "@types/node": "^18.11.18", "@types/rimraf": "^3", diff --git a/packages/nuxt/src/app/components/nuxt-island.ts b/packages/nuxt/src/app/components/nuxt-island.ts index 32faf805c20..61e837fd3e4 100644 --- a/packages/nuxt/src/app/components/nuxt-island.ts +++ b/packages/nuxt/src/app/components/nuxt-island.ts @@ -54,14 +54,14 @@ export default defineComponent({ html.value = res.html } - if (process.server || !nuxtApp.isHydrating) { - await fetchComponent() - } - if (process.client) { watch(props, debounce(fetchComponent, 100)) } + if (process.server || !nuxtApp.isHydrating) { + await fetchComponent() + } + return () => createStaticVNode(html.value, 1) } }) diff --git a/packages/nuxt/src/app/composables/ssr.ts b/packages/nuxt/src/app/composables/ssr.ts index 037701ebc89..96b20ba556a 100644 --- a/packages/nuxt/src/app/composables/ssr.ts +++ b/packages/nuxt/src/app/composables/ssr.ts @@ -1,4 +1,4 @@ -/* eslint-disable no-redeclare */ + import type { H3Event } from 'h3' import type { NuxtApp } from '../nuxt' import { useNuxtApp } from '../nuxt' diff --git a/packages/nuxt/src/app/entry.ts b/packages/nuxt/src/app/entry.ts index ee5c13f12a3..9131ba11df2 100644 --- a/packages/nuxt/src/app/entry.ts +++ b/packages/nuxt/src/app/entry.ts @@ -77,7 +77,7 @@ if (process.client) { } entry().catch((error: unknown) => { - console.error('Error while mounting app:', error) // eslint-disable-line no-console + console.error('Error while mounting app:', error) }) } diff --git a/packages/nuxt/src/components/module.ts b/packages/nuxt/src/components/module.ts index 4e2aa4fa08d..a340646d7d5 100644 --- a/packages/nuxt/src/components/module.ts +++ b/packages/nuxt/src/components/module.ts @@ -81,7 +81,6 @@ export default defineNuxtModule({ const present = isDirectory(dirPath) if (!present && !DEFAULT_COMPONENTS_DIRS_RE.test(dirOptions.path)) { - // eslint-disable-next-line no-console console.warn('Components directory not found: `' + dirPath + '`') } diff --git a/packages/nuxt/src/components/scan.ts b/packages/nuxt/src/components/scan.ts index 3b85cbd0fa3..71f204521b8 100644 --- a/packages/nuxt/src/components/scan.ts +++ b/packages/nuxt/src/components/scan.ts @@ -3,6 +3,7 @@ import { globby } from 'globby' import { pascalCase, splitByCase } from 'scule' import type { Component, ComponentsDir } from '@nuxt/schema' import { isIgnored } from '@nuxt/kit' +// eslint-disable-next-line vue/prefer-import-from-vue import { hyphenate } from '@vue/shared' import { withTrailingSlash } from 'ufo' diff --git a/packages/nuxt/src/pages/utils.ts b/packages/nuxt/src/pages/utils.ts index 18e146ae547..ea711ee5a07 100644 --- a/packages/nuxt/src/pages/utils.ts +++ b/packages/nuxt/src/pages/utils.ts @@ -181,7 +181,7 @@ function parseSegment (segment: string) { } else if (PARAM_CHAR_RE.test(c)) { buffer += c } else { - // eslint-disable-next-line no-console + // console.debug(`[pages]Ignored character "${c}" while building param "${buffer}" from "segment"`) } break diff --git a/packages/vite/src/dev-bundler.ts b/packages/vite/src/dev-bundler.ts index 40014f42274..9b4dddcb29b 100644 --- a/packages/vite/src/dev-bundler.ts +++ b/packages/vite/src/dev-bundler.ts @@ -78,7 +78,6 @@ ${genDynamicImport(path, { wrapper: false })} // Transform const res: SSRTransformResult = await opts.viteServer.transformRequest(id, { ssr: true }).catch((err) => { - // eslint-disable-next-line no-console console.warn(`[SSR] Error transforming ${id}:`, err) // console.error(err) }) as SSRTransformResult || { code: '', map: {}, deps: [], dynamicDeps: [] } diff --git a/packages/webpack/src/plugins/vue/client.ts b/packages/webpack/src/plugins/vue/client.ts index 0cb12426dda..37a57a57a4f 100644 --- a/packages/webpack/src/plugins/vue/client.ts +++ b/packages/webpack/src/plugins/vue/client.ts @@ -109,7 +109,7 @@ export default class VueSSRClientPlugin { // Find all asset modules associated with the same chunk assetModules.forEach((m) => { if (m.chunks!.includes(cid)) { - files.push.apply(files, (m.assets as string[]).map(fileToIndex)) + files.push(...(m.assets as string[]).map(fileToIndex)) } }) } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3f2b72fed05..b17e535b077 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -23,7 +23,7 @@ importers: '@nuxt/test-utils': workspace:* '@nuxt/vite-builder': workspace:* '@nuxt/webpack-builder': workspace:* - '@nuxtjs/eslint-config-typescript': ^11.0.0 + '@nuxtjs/eslint-config-typescript': ^12.0.0 '@types/crawler': ^1.2.2 '@types/node': ^18.11.18 '@types/rimraf': ^3 @@ -59,7 +59,7 @@ importers: '@nuxt/test-utils': link:packages/test-utils '@nuxt/vite-builder': link:packages/vite '@nuxt/webpack-builder': link:packages/webpack - '@nuxtjs/eslint-config-typescript': 11.0.0_iukboom6ndih5an6iafl45j2fe + '@nuxtjs/eslint-config-typescript': 12.0.0_iukboom6ndih5an6iafl45j2fe '@types/crawler': 1.2.2 '@types/node': 18.11.18 '@types/rimraf': 3.0.2 @@ -1757,36 +1757,38 @@ packages: pathe: 0.3.9 dev: true - /@nuxtjs/eslint-config-typescript/11.0.0_iukboom6ndih5an6iafl45j2fe: - resolution: {integrity: sha512-hmFjGtXT524ql8eTbK8BaRkamcXB6Z8YOW8nSQhosTP6oBw9WtOFUeWr7holyE278UhOmx+wDFG90BnyM9D+UA==} + /@nuxtjs/eslint-config-typescript/12.0.0_iukboom6ndih5an6iafl45j2fe: + resolution: {integrity: sha512-HJR0ho5MYuOCFjkL+eMX/VXbUwy36J12DUMVy+dj3Qz1GYHwX92Saxap3urFzr8oPkzzFiuOknDivfCeRBWakg==} peerDependencies: eslint: ^8.23.0 dependencies: - '@nuxtjs/eslint-config': 11.0.0_eupp2jjldyrkkyyss5eft7tspe - '@typescript-eslint/eslint-plugin': 5.38.1_qeq3ufhx4mkvr5js5gwhk3c67i - '@typescript-eslint/parser': 5.38.1_iukboom6ndih5an6iafl45j2fe + '@nuxtjs/eslint-config': 12.0.0_uxcld2axmjsv7vkddihld44j44 + '@typescript-eslint/eslint-plugin': 5.45.0_g4ctrfixvsjuszcpwsr4fatum4 + '@typescript-eslint/parser': 5.45.0_iukboom6ndih5an6iafl45j2fe eslint: 8.31.0 - eslint-import-resolver-typescript: 3.5.1_ol7jqilc3wemtdbq3nzhywgxq4 - eslint-plugin-import: 2.26.0_eupp2jjldyrkkyyss5eft7tspe + eslint-import-resolver-typescript: 3.5.2_ol7jqilc3wemtdbq3nzhywgxq4 + eslint-plugin-import: 2.26.0_uxcld2axmjsv7vkddihld44j44 + eslint-plugin-vue: 9.8.0_eslint@8.31.0 transitivePeerDependencies: - eslint-import-resolver-webpack - supports-color - typescript dev: true - /@nuxtjs/eslint-config/11.0.0_eupp2jjldyrkkyyss5eft7tspe: - resolution: {integrity: sha512-o4zFOpU8gJgwrC/gLE7c2E0XEjkv2fEixCGG1y+dZYzBPyzTorkQmfxskSF3WRXcZkpkS9uUYlRkeOSdYB7z0w==} + /@nuxtjs/eslint-config/12.0.0_uxcld2axmjsv7vkddihld44j44: + resolution: {integrity: sha512-ewenelo75x0eYEUK+9EBXjc/OopQCvdkmYmlZuoHq5kub/vtiRpyZ/autppwokpHUq8tiVyl2ejMakoiHiDTrg==} peerDependencies: eslint: ^8.23.0 dependencies: eslint: 8.31.0 - eslint-config-standard: 17.0.0_2je5nn4afgpud7urfz3hehkewu - eslint-plugin-import: 2.26.0_eupp2jjldyrkkyyss5eft7tspe - eslint-plugin-n: 15.3.0_eslint@8.31.0 + eslint-config-standard: 17.0.0_gasqinr6xkes2fvgff4wigbz3e + eslint-plugin-import: 2.26.0_uxcld2axmjsv7vkddihld44j44 + eslint-plugin-n: 15.5.1_eslint@8.31.0 eslint-plugin-node: 11.1.0_eslint@8.31.0 - eslint-plugin-promise: 6.0.1_eslint@8.31.0 - eslint-plugin-unicorn: 43.0.2_eslint@8.31.0 - eslint-plugin-vue: 9.5.1_eslint@8.31.0 + eslint-plugin-promise: 6.1.1_eslint@8.31.0 + eslint-plugin-unicorn: 44.0.2_eslint@8.31.0 + eslint-plugin-vue: 9.8.0_eslint@8.31.0 + local-pkg: 0.4.2 transitivePeerDependencies: - '@typescript-eslint/parser' - eslint-import-resolver-typescript @@ -2217,8 +2219,8 @@ packages: '@types/yargs-parser': 21.0.0 dev: false - /@typescript-eslint/eslint-plugin/5.38.1_qeq3ufhx4mkvr5js5gwhk3c67i: - resolution: {integrity: sha512-ky7EFzPhqz3XlhS7vPOoMDaQnQMn+9o5ICR9CPr/6bw8HrFkzhMSxuA3gRfiJVvs7geYrSeawGJjZoZQKCOglQ==} + /@typescript-eslint/eslint-plugin/5.45.0_g4ctrfixvsjuszcpwsr4fatum4: + resolution: {integrity: sha512-CXXHNlf0oL+Yg021cxgOdMHNTXD17rHkq7iW6RFHoybdFgQBjU3yIXhhcPpGwr1CjZlo6ET8C6tzX5juQoXeGA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: '@typescript-eslint/parser': ^5.0.0 @@ -2228,13 +2230,14 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/parser': 5.38.1_iukboom6ndih5an6iafl45j2fe - '@typescript-eslint/scope-manager': 5.38.1 - '@typescript-eslint/type-utils': 5.38.1_iukboom6ndih5an6iafl45j2fe - '@typescript-eslint/utils': 5.38.1_iukboom6ndih5an6iafl45j2fe + '@typescript-eslint/parser': 5.45.0_iukboom6ndih5an6iafl45j2fe + '@typescript-eslint/scope-manager': 5.45.0 + '@typescript-eslint/type-utils': 5.45.0_iukboom6ndih5an6iafl45j2fe + '@typescript-eslint/utils': 5.45.0_iukboom6ndih5an6iafl45j2fe debug: 4.3.4 eslint: 8.31.0 ignore: 5.2.4 + natural-compare-lite: 1.4.0 regexpp: 3.2.0 semver: 7.3.8 tsutils: 3.21.0_typescript@4.9.4 @@ -2243,8 +2246,8 @@ packages: - supports-color dev: true - /@typescript-eslint/parser/5.38.1_iukboom6ndih5an6iafl45j2fe: - resolution: {integrity: sha512-LDqxZBVFFQnQRz9rUZJhLmox+Ep5kdUmLatLQnCRR6523YV+XhRjfYzStQ4MheFA8kMAfUlclHSbu+RKdRwQKw==} + /@typescript-eslint/parser/5.45.0_iukboom6ndih5an6iafl45j2fe: + resolution: {integrity: sha512-brvs/WSM4fKUmF5Ot/gEve6qYiCMjm6w4HkHPfS6ZNmxTS0m0iNN4yOChImaCkqc1hRwFGqUyanMXuGal6oyyQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 @@ -2253,9 +2256,9 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 5.38.1 - '@typescript-eslint/types': 5.38.1 - '@typescript-eslint/typescript-estree': 5.38.1_typescript@4.9.4 + '@typescript-eslint/scope-manager': 5.45.0 + '@typescript-eslint/types': 5.45.0 + '@typescript-eslint/typescript-estree': 5.45.0_typescript@4.9.4 debug: 4.3.4 eslint: 8.31.0 typescript: 4.9.4 @@ -2263,16 +2266,16 @@ packages: - supports-color dev: true - /@typescript-eslint/scope-manager/5.38.1: - resolution: {integrity: sha512-BfRDq5RidVU3RbqApKmS7RFMtkyWMM50qWnDAkKgQiezRtLKsoyRKIvz1Ok5ilRWeD9IuHvaidaLxvGx/2eqTQ==} + /@typescript-eslint/scope-manager/5.45.0: + resolution: {integrity: sha512-noDMjr87Arp/PuVrtvN3dXiJstQR1+XlQ4R1EvzG+NMgXi8CuMCXpb8JqNtFHKceVSQ985BZhfRdowJzbv4yKw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.38.1 - '@typescript-eslint/visitor-keys': 5.38.1 + '@typescript-eslint/types': 5.45.0 + '@typescript-eslint/visitor-keys': 5.45.0 dev: true - /@typescript-eslint/type-utils/5.38.1_iukboom6ndih5an6iafl45j2fe: - resolution: {integrity: sha512-UU3j43TM66gYtzo15ivK2ZFoDFKKP0k03MItzLdq0zV92CeGCXRfXlfQX5ILdd4/DSpHkSjIgLLLh1NtkOJOAw==} + /@typescript-eslint/type-utils/5.45.0_iukboom6ndih5an6iafl45j2fe: + resolution: {integrity: sha512-DY7BXVFSIGRGFZ574hTEyLPRiQIvI/9oGcN8t1A7f6zIs6ftbrU0nhyV26ZW//6f85avkwrLag424n+fkuoJ1Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: '*' @@ -2281,8 +2284,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 5.38.1_typescript@4.9.4 - '@typescript-eslint/utils': 5.38.1_iukboom6ndih5an6iafl45j2fe + '@typescript-eslint/typescript-estree': 5.45.0_typescript@4.9.4 + '@typescript-eslint/utils': 5.45.0_iukboom6ndih5an6iafl45j2fe debug: 4.3.4 eslint: 8.31.0 tsutils: 3.21.0_typescript@4.9.4 @@ -2291,13 +2294,13 @@ packages: - supports-color dev: true - /@typescript-eslint/types/5.38.1: - resolution: {integrity: sha512-QTW1iHq1Tffp9lNfbfPm4WJabbvpyaehQ0SrvVK2yfV79SytD9XDVxqiPvdrv2LK7DGSFo91TB2FgWanbJAZXg==} + /@typescript-eslint/types/5.45.0: + resolution: {integrity: sha512-QQij+u/vgskA66azc9dCmx+rev79PzX8uDHpsqSjEFtfF2gBUTRCpvYMh2gw2ghkJabNkPlSUCimsyBEQZd1DA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@typescript-eslint/typescript-estree/5.38.1_typescript@4.9.4: - resolution: {integrity: sha512-99b5e/Enoe8fKMLdSuwrfH/C0EIbpUWmeEKHmQlGZb8msY33qn1KlkFww0z26o5Omx7EVjzVDCWEfrfCDHfE7g==} + /@typescript-eslint/typescript-estree/5.45.0_typescript@4.9.4: + resolution: {integrity: sha512-maRhLGSzqUpFcZgXxg1qc/+H0bT36lHK4APhp0AEUVrpSwXiRAomm/JGjSG+kNUio5kAa3uekCYu/47cnGn5EQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: typescript: '*' @@ -2305,8 +2308,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 5.38.1 - '@typescript-eslint/visitor-keys': 5.38.1 + '@typescript-eslint/types': 5.45.0 + '@typescript-eslint/visitor-keys': 5.45.0 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 @@ -2317,29 +2320,31 @@ packages: - supports-color dev: true - /@typescript-eslint/utils/5.38.1_iukboom6ndih5an6iafl45j2fe: - resolution: {integrity: sha512-oIuUiVxPBsndrN81oP8tXnFa/+EcZ03qLqPDfSZ5xIJVm7A9V0rlkQwwBOAGtrdN70ZKDlKv+l1BeT4eSFxwXA==} + /@typescript-eslint/utils/5.45.0_iukboom6ndih5an6iafl45j2fe: + resolution: {integrity: sha512-OUg2JvsVI1oIee/SwiejTot2OxwU8a7UfTFMOdlhD2y+Hl6memUSL4s98bpUTo8EpVEr0lmwlU7JSu/p2QpSvA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: '@types/json-schema': 7.0.11 - '@typescript-eslint/scope-manager': 5.38.1 - '@typescript-eslint/types': 5.38.1 - '@typescript-eslint/typescript-estree': 5.38.1_typescript@4.9.4 + '@types/semver': 7.3.12 + '@typescript-eslint/scope-manager': 5.45.0 + '@typescript-eslint/types': 5.45.0 + '@typescript-eslint/typescript-estree': 5.45.0_typescript@4.9.4 eslint: 8.31.0 eslint-scope: 5.1.1 eslint-utils: 3.0.0_eslint@8.31.0 + semver: 7.3.8 transitivePeerDependencies: - supports-color - typescript dev: true - /@typescript-eslint/visitor-keys/5.38.1: - resolution: {integrity: sha512-bSHr1rRxXt54+j2n4k54p4fj8AHJ49VDWtjpImOpzQj4qjAiOpPni+V1Tyajh19Api1i844F757cur8wH3YvOA==} + /@typescript-eslint/visitor-keys/5.45.0: + resolution: {integrity: sha512-jc6Eccbn2RtQPr1s7th6jJWQHBHI6GBVQkCHoJFQ5UreaKm59Vxw+ynQUPPY2u2Amquc+7tmEoC2G52ApsGNNg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.38.1 + '@typescript-eslint/types': 5.45.0 eslint-visitor-keys: 3.3.0 dev: true @@ -3519,13 +3524,9 @@ packages: resolution: {integrity: sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==} engines: {node: '>=6.0'} - /ci-info/3.5.0: - resolution: {integrity: sha512-yH4RezKOGlOhxkmhbeNuC4eYZKAUsEaGtBuBzDDP1eFUKiccDWzBABxBfOx31IDwDIXMTxWuwAxUGModvkbuVw==} - /ci-info/3.6.1: resolution: {integrity: sha512-up5ggbaDqOqJ4UqLKZ2naVkyqSJQgJi5lwD6b6mM748ysrghDBX0bx/qJTUHzw7zu6Mq4gycviSF5hJnwceD8w==} engines: {node: '>=8'} - dev: false /clean-regexp/1.0.0: resolution: {integrity: sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw==} @@ -4331,7 +4332,7 @@ packages: resolution: {integrity: sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==} engines: {node: '>=12'} - /eslint-config-standard/17.0.0_2je5nn4afgpud7urfz3hehkewu: + /eslint-config-standard/17.0.0_gasqinr6xkes2fvgff4wigbz3e: resolution: {integrity: sha512-/2ks1GKyqSOkH7JFvXJicu0iMpoojkwB+f5Du/1SC0PtBL+s8v30k9njRZ21pm2drKYm2342jFnGWzttxPmZVg==} peerDependencies: eslint: ^8.0.1 @@ -4340,9 +4341,9 @@ packages: eslint-plugin-promise: ^6.0.0 dependencies: eslint: 8.31.0 - eslint-plugin-import: 2.26.0_eupp2jjldyrkkyyss5eft7tspe - eslint-plugin-n: 15.3.0_eslint@8.31.0 - eslint-plugin-promise: 6.0.1_eslint@8.31.0 + eslint-plugin-import: 2.26.0_uxcld2axmjsv7vkddihld44j44 + eslint-plugin-n: 15.5.1_eslint@8.31.0 + eslint-plugin-promise: 6.1.1_eslint@8.31.0 dev: true /eslint-import-resolver-node/0.3.6: @@ -4354,9 +4355,9 @@ packages: - supports-color dev: true - /eslint-import-resolver-typescript/3.5.1_ol7jqilc3wemtdbq3nzhywgxq4: - resolution: {integrity: sha512-U7LUjNJPYjNsHvAUAkt/RU3fcTSpbllA0//35B4eLYTX74frmOepbt7F7J3D1IGtj9k21buOpaqtDd4ZlS/BYQ==} - engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} + /eslint-import-resolver-typescript/3.5.2_ol7jqilc3wemtdbq3nzhywgxq4: + resolution: {integrity: sha512-zX4ebnnyXiykjhcBvKIf5TNvt8K7yX6bllTRZ14MiurKPjDpCAZujlszTdB8pcNXhZcOf+god4s9SjQa5GnytQ==} + engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: eslint: '*' eslint-plugin-import: '*' @@ -4364,7 +4365,7 @@ packages: debug: 4.3.4 enhanced-resolve: 5.10.0 eslint: 8.31.0 - eslint-plugin-import: 2.26.0_eupp2jjldyrkkyyss5eft7tspe + eslint-plugin-import: 2.26.0_uxcld2axmjsv7vkddihld44j44 get-tsconfig: 4.2.0 globby: 13.1.3 is-core-module: 2.10.0 @@ -4374,7 +4375,7 @@ packages: - supports-color dev: true - /eslint-module-utils/2.7.4_hq7bn3mkd2trxspt2jabkiiebe: + /eslint-module-utils/2.7.4_curl6mfqm5fplb2pa3gkf2c5ai: resolution: {integrity: sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==} engines: {node: '>=4'} peerDependencies: @@ -4395,11 +4396,11 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 5.38.1_iukboom6ndih5an6iafl45j2fe + '@typescript-eslint/parser': 5.45.0_iukboom6ndih5an6iafl45j2fe debug: 3.2.7 eslint: 8.31.0 eslint-import-resolver-node: 0.3.6 - eslint-import-resolver-typescript: 3.5.1_ol7jqilc3wemtdbq3nzhywgxq4 + eslint-import-resolver-typescript: 3.5.2_ol7jqilc3wemtdbq3nzhywgxq4 transitivePeerDependencies: - supports-color dev: true @@ -4426,7 +4427,7 @@ packages: regexpp: 3.2.0 dev: true - /eslint-plugin-import/2.26.0_eupp2jjldyrkkyyss5eft7tspe: + /eslint-plugin-import/2.26.0_uxcld2axmjsv7vkddihld44j44: resolution: {integrity: sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==} engines: {node: '>=4'} peerDependencies: @@ -4436,14 +4437,14 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 5.38.1_iukboom6ndih5an6iafl45j2fe + '@typescript-eslint/parser': 5.45.0_iukboom6ndih5an6iafl45j2fe array-includes: 3.1.5 array.prototype.flat: 1.3.0 debug: 2.6.9 doctrine: 2.1.0 eslint: 8.31.0 eslint-import-resolver-node: 0.3.6 - eslint-module-utils: 2.7.4_hq7bn3mkd2trxspt2jabkiiebe + eslint-module-utils: 2.7.4_curl6mfqm5fplb2pa3gkf2c5ai has: 1.0.3 is-core-module: 2.10.0 is-glob: 4.0.3 @@ -4475,8 +4476,8 @@ packages: - supports-color dev: true - /eslint-plugin-n/15.3.0_eslint@8.31.0: - resolution: {integrity: sha512-IyzPnEWHypCWasDpxeJnim60jhlumbmq0pubL6IOcnk8u2y53s5QfT8JnXy7skjHJ44yWHRb11PLtDHuu1kg/Q==} + /eslint-plugin-n/15.5.1_eslint@8.31.0: + resolution: {integrity: sha512-kAd+xhZm7brHoFLzKLB7/FGRFJNg/srmv67mqb7tto22rpr4wv/LV6RuXzAfv3jbab7+k1wi42PsIhGviywaaw==} engines: {node: '>=12.22.0'} peerDependencies: eslint: '>=7.0.0' @@ -4486,7 +4487,7 @@ packages: eslint-plugin-es: 4.1.0_eslint@8.31.0 eslint-utils: 3.0.0_eslint@8.31.0 ignore: 5.2.4 - is-core-module: 2.10.0 + is-core-module: 2.11.0 minimatch: 3.1.2 resolve: 1.22.1 semver: 7.3.8 @@ -4507,8 +4508,8 @@ packages: semver: 6.3.0 dev: true - /eslint-plugin-promise/6.0.1_eslint@8.31.0: - resolution: {integrity: sha512-uM4Tgo5u3UWQiroOyDEsYcVMOo7re3zmno0IZmB5auxoaQNIceAbXEkSt8RNrKtaYehARHG06pYK6K1JhtP0Zw==} + /eslint-plugin-promise/6.1.1_eslint@8.31.0: + resolution: {integrity: sha512-tjqWDwVZQo7UIPMeDReOpUgHCmCiH+ePnVT+5zVapL0uuHnegBUs2smM13CzOs2Xb5+MHMRFTs9v24yjba4Oig==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 @@ -4516,14 +4517,14 @@ packages: eslint: 8.31.0 dev: true - /eslint-plugin-unicorn/43.0.2_eslint@8.31.0: - resolution: {integrity: sha512-DtqZ5mf/GMlfWoz1abIjq5jZfaFuHzGBZYIeuJfEoKKGWRHr2JiJR+ea+BF7Wx2N1PPRoT/2fwgiK1NnmNE3Hg==} + /eslint-plugin-unicorn/44.0.2_eslint@8.31.0: + resolution: {integrity: sha512-GLIDX1wmeEqpGaKcnMcqRvMVsoabeF0Ton0EX4Th5u6Kmf7RM9WBl705AXFEsns56ESkEs0uyelLuUTvz9Tr0w==} engines: {node: '>=14.18'} peerDependencies: - eslint: '>=8.18.0' + eslint: '>=8.23.1' dependencies: '@babel/helper-validator-identifier': 7.19.1 - ci-info: 3.5.0 + ci-info: 3.6.1 clean-regexp: 1.0.0 eslint: 8.31.0 eslint-utils: 3.0.0_eslint@8.31.0 @@ -4539,8 +4540,8 @@ packages: strip-indent: 3.0.0 dev: true - /eslint-plugin-vue/9.5.1_eslint@8.31.0: - resolution: {integrity: sha512-Y0sL2RY7Xc9S8kNih9lbwHIDmewUg9bfas6WSzsOWRgDXhIHKxRBZYNAnVcXBFfE+bMWHUA5GLChl7TcTYUI8w==} + /eslint-plugin-vue/9.8.0_eslint@8.31.0: + resolution: {integrity: sha512-E/AXwcTzunyzM83C2QqDHxepMzvI2y6x+mmeYHbVDQlKFqmKYvRrhaVixEeeG27uI44p9oKDFiyCRw4XxgtfHA==} engines: {node: ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.2.0 || ^7.0.0 || ^8.0.0 @@ -5500,6 +5501,12 @@ packages: resolution: {integrity: sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==} dependencies: has: 1.0.3 + dev: true + + /is-core-module/2.11.0: + resolution: {integrity: sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==} + dependencies: + has: 1.0.3 /is-date-object/1.0.5: resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==} @@ -5654,7 +5661,7 @@ packages: '@jest/types': 29.2.0 '@types/node': 18.11.18 chalk: 4.1.2 - ci-info: 3.5.0 + ci-info: 3.6.1 graceful-fs: 4.2.10 picomatch: 2.3.1 dev: false @@ -6255,6 +6262,10 @@ packages: hasBin: true dev: false + /natural-compare-lite/1.4.0: + resolution: {integrity: sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==} + dev: true + /natural-compare/1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} dev: true @@ -7303,7 +7314,7 @@ packages: resolution: {integrity: sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==} hasBin: true dependencies: - is-core-module: 2.10.0 + is-core-module: 2.11.0 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 diff --git a/test/fixtures/basic/composables/random.ts b/test/fixtures/basic/composables/random.ts index 4e6114c6029..f38f1143547 100644 --- a/test/fixtures/basic/composables/random.ts +++ b/test/fixtures/basic/composables/random.ts @@ -1,3 +1,3 @@ -export function useRandomState (max: number = 100, name = 'default') { +export function useRandomState (max = 100, name = 'default') { return useState('random:' + name, () => Math.round(Math.random() * max)) } diff --git a/test/fixtures/basic/types.ts b/test/fixtures/basic/types.ts index 2b6d531799d..90302360920 100644 --- a/test/fixtures/basic/types.ts +++ b/test/fixtures/basic/types.ts @@ -178,7 +178,7 @@ describe('composables', () => { it('infer request url string literal from server/api routes', () => { // request can accept dynamic string type - const dynamicStringUrl: string = 'https://example.com/api' + const dynamicStringUrl = 'https://example.com/api' expectTypeOf(useFetch(dynamicStringUrl).data).toEqualTypeOf>() // request param should infer string literal type / show auto-complete hint base on server routes, ex: '/api/hello'