mirror of
https://github.com/element-hq/element-web
synced 2024-11-22 17:25:50 +03:00
Add support for JSX in stuff we import in Cypress test code (#8738)
* Add support for JSX in stuff we import in Cypress test code Spawning from: - https://github.com/matrix-org/matrix-react-sdk/pull/8354#discussion_r883260722 - https://github.com/matrix-org/matrix-react-sdk/pull/8354#discussion_r878660677 * Add problem import * Inherit from existing type definitions See https://github.com/matrix-org/matrix-react-sdk/pull/8738#discussion_r887350469 * Specify `commonjs` Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> * Remove `mxSettingsStore` as it's no longer needed Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com> Co-authored-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
parent
89ae540faa
commit
a5871206fa
3 changed files with 17 additions and 4 deletions
3
cypress/global.d.ts
vendored
3
cypress/global.d.ts
vendored
|
@ -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,
|
||||
|
|
|
@ -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"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue