From ae11583088d844892aab75b65b999dd45e842bb7 Mon Sep 17 00:00:00 2001 From: Haoqun Jiang Date: Fri, 15 Jul 2022 12:05:44 +0800 Subject: [PATCH] fix: fix Cypress Component Testing TypeScript & ESLint warnings --- template/config/cypress-ct/cypress/support/component.ts | 1 + template/tsconfig/cypress-ct/tsconfig.cypress-ct.json | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/template/config/cypress-ct/cypress/support/component.ts b/template/config/cypress-ct/cypress/support/component.ts index 38ca910f..04e4c352 100644 --- a/template/config/cypress-ct/cypress/support/component.ts +++ b/template/config/cypress-ct/cypress/support/component.ts @@ -28,6 +28,7 @@ import { mount } from 'cypress/vue' // your custom command. // Alternatively, can be defined in cypress/support/component.d.ts // with a at the top of your spec. +/* eslint-disable @typescript-eslint/no-namespace */ declare global { namespace Cypress { interface Chainable { diff --git a/template/tsconfig/cypress-ct/tsconfig.cypress-ct.json b/template/tsconfig/cypress-ct/tsconfig.cypress-ct.json index 29cbaa47..b21f0843 100644 --- a/template/tsconfig/cypress-ct/tsconfig.cypress-ct.json +++ b/template/tsconfig/cypress-ct/tsconfig.cypress-ct.json @@ -1,6 +1,12 @@ { "extends": "./tsconfig.app.json", - "include": ["env.d.ts", "src/**/*", "src/**/*.vue", "cypress/support/component.*"], + "include": [ + "env.d.ts", + "src/**/*", + "src/**/*.vue", + "cypress/support/component.*", + "cypress/support/commands.ts" + ], "exclude": [], "compilerOptions": { "composite": true -- 2.39.5