Commit 58417412 authored by Zach Pomerantz's avatar Zach Pomerantz Committed by GitHub

build: tighten tsconfig (to include build cache, exclude watch folders) (#6375)

* build: extend cypress tsconfig from build tsconfig

* build: exclude node_modules from watch to improve typechecking perf

* fix: even tighter tsconfigs

* fix: even tighter

* fix: tailor cypress tsconfig to testing

* fix: split them up again

* fix: pr comments
parent cd3cff02
import { defineConfig } from 'cypress'
export default defineConfig({
projectId: 'yp82ef',
e2e: {
specPattern: 'cypress/release.ts',
},
})
import assert = require('assert')
import assert from 'assert'
describe('Service Worker', () => {
before(() => {
......
const ONE_MINUTE = 60_000
describe(
'Release',
{
pageLoadTimeout: ONE_MINUTE,
retries: 30,
},
() => {
it('loads swap page', () => {
// TODO: We *must* wait in order to space out the retry attempts. Find a better way to do this.
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(ONE_MINUTE)
.visit('/', {
retryOnStatusCodeFailure: true,
retryOnNetworkFailure: true,
})
.get('#swap-page')
})
}
)
......@@ -6,11 +6,12 @@
// ***********************************************************
// Import commands.ts using ES2015 syntax:
import { injected } from './ethereum'
import assert = require('assert')
import '@cypress/code-coverage/support'
import assert from 'assert'
import { FeatureFlag } from '../../src/featureFlags/flags/featureFlags'
import { injected } from './ethereum'
declare global {
// eslint-disable-next-line @typescript-eslint/no-namespace
......
{
"compilerOptions": {
"esModuleInterop": true,
"incremental": true,
"lib": ["DOM", "DOM.Iterable", "ESNext"],
"noEmit": true,
"strict": true,
"target": "es5",
"lib": ["es5", "dom"],
"types": ["cypress"]
"target": "ES5",
"tsBuildInfoFile": "../node_modules/.cache/tsbuildinfo/cypress", // avoid clobbering the build tsbuildinfo
"types": ["cypress", "node"]
},
"include": ["**/*.ts"]
"exclude": ["node_modules"],
"include": ["**/*.ts"],
"watchOptions": {
"excludeDirectories": ["node_modules"]
}
}
......@@ -24,7 +24,7 @@
"analyze": "source-map-explorer 'build/static/js/*.js'",
"serve": "serve build -l 3000",
"lint": "yarn eslint --ignore-path .gitignore --cache --cache-location node_modules/.cache/eslint/ .",
"typecheck": "tsc --noEmit",
"typecheck": "tsc",
"test": "craco test --coverage",
"test:size": "node scripts/test-size.js",
"cypress:open": "cypress open --browser chrome --e2e",
......
......@@ -8,7 +8,6 @@
"downlevelIteration": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"incremental": true,
"isolatedModules": true,
"jsx": "react-jsx",
"lib": ["DOM", "DOM.Iterable", "ESNext"],
......@@ -25,10 +24,13 @@
"strict": true,
"strictNullChecks": true,
"target": "ESNext",
"tsBuildInfoFile": "node_modules/.cache/.tsbuildinfo",
"tsBuildInfoFile": "node_modules/.cache/tsbuildinfo/build", // avoid clobbering the cypress tsbuildinfo
"types": ["jest"],
"useUnknownInCatchVariables": false
},
"exclude": ["node_modules", "cypress"],
"include": ["src/**/*", "src/**/*.json"]
"exclude": ["node_modules"],
"include": ["src/**/*", "src/**/*.json"],
"watchOptions": {
"excludeDirectories": ["node_modules"]
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment