diff --git a/cypress/global.d.ts b/cypress/global.d.ts index 3d36daf951..2cbfff94c2 100644 --- a/cypress/global.d.ts +++ b/cypress/global.d.ts @@ -14,6 +14,9 @@ See the License for the specific language governing permissions and limitations under the License. */ +import "../src/@types/global"; +import "../src/@types/svg"; +import "../src/@types/raw-loader"; import "matrix-js-sdk/src/@types/global"; import type { MatrixClient, diff --git a/cypress/tsconfig.json b/cypress/tsconfig.json index e8db14a01f..bf92664f35 100644 --- a/cypress/tsconfig.json +++ b/cypress/tsconfig.json @@ -1,9 +1,19 @@ { "compilerOptions": { "target": "es2016", - "lib": ["es2020", "dom"], + "jsx": "react", + "lib": [ + "es2020", + "dom", + "dom.iterable" + ], "types": ["cypress", "@percy/cypress"], - "moduleResolution": "node" + "resolveJsonModule": true, + "esModuleInterop": true, + "moduleResolution": "node", + "module": "commonjs" }, - "include": ["**/*.ts"] + "include": [ + "**/*.ts" + ] } diff --git a/package.json b/package.json index 740333f8b5..727e23baf9 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "lint": "yarn lint:types && yarn lint:js && yarn lint:style", "lint:js": "eslint --max-warnings 0 src test cypress", "lint:js-fix": "eslint --fix src test cypress", - "lint:types": "tsc --noEmit --jsx react && tsc --noEmit -p cypress", + "lint:types": "tsc --noEmit --jsx react && tsc --noEmit --jsx react -p cypress", "lint:style": "stylelint \"res/css/**/*.scss\"", "test": "jest", "test:cypress": "cypress run",