mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Remove dtslint from type tests (#51382)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/51382 This diff replaces `dtslint` which is obsolete and [It is not intended to be used on its own, but as part of the definitelytyped set of packages](https://github.com/microsoft/dtslint) in favor of `tsc` type tests. It's probably not necessary to have `test-typescript-offline` as tsc does that out of the box but doesn't test with multiple TS versions. Changelog: [Internal] Reviewed By: huntie Differential Revision: D74804967 fbshipit-source-id: 4c581ba5debf6fd0bb8dcddbb95f3c85b05082d4
This commit is contained in:
1 parent
2a0c1e6a9e
commit
2e0c2c6df1
4 files changed
+64
-884
No files matched your search
+1
-3
@@ -30,8 +30,7 @@
|
||||
"test-e2e-local-clean": "node ./scripts/release-testing/test-e2e-local-clean.js",
|
||||
"test-e2e-local": "node ./scripts/release-testing/test-e2e-local.js",
|
||||
"test-ios": "./scripts/objc-test.sh test",
|
||||
"test-typescript-offline": "dtslint --localTs node_modules/typescript/lib packages/react-native/types",
|
||||
"test-typescript": "dtslint packages/react-native/types",
|
||||
"test-typescript": "tsc -p packages/react-native/types/tsconfig.test.json",
|
||||
"test": "jest",
|
||||
"fantom": "JS_DIR='..' yarn jest --config packages/react-native-fantom/config/jest.config.js",
|
||||
"trigger-react-native-release": "node ./scripts/releases-local/trigger-react-native-release.js",
|
||||
@@ -50,7 +49,6 @@
|
||||
"@babel/plugin-transform-regenerator": "^7.24.7",
|
||||
"@babel/preset-env": "^7.25.3",
|
||||
"@babel/preset-flow": "^7.24.7",
|
||||
"@definitelytyped/dtslint": "^0.0.127",
|
||||
"@jest/create-cache-key-function": "^29.7.0",
|
||||
"@react-native/metro-babel-transformer": "0.80.0-main",
|
||||
"@react-native/metro-config": "0.80.0-main",
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": ["es6"],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictNullChecks": true,
|
||||
"types": [],
|
||||
"jsx": "react",
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"paths": {"react-native": ["."]}
|
||||
},
|
||||
"include": ["../**/*.d.ts", "__typetests__/**/*"]
|
||||
}
|
||||
@@ -108,7 +108,7 @@ try {
|
||||
}
|
||||
|
||||
describe('Test: TypeScript tests');
|
||||
if (exec(`${YARN_BINARY} run test-typescript-offline`).code) {
|
||||
if (exec(`${YARN_BINARY} run test-typescript`).code) {
|
||||
echo('Failed to run TypeScript tests.');
|
||||
exitCode = 1;
|
||||
throw Error(exitCode);
|
||||
|
||||
Reference in new issue
Block a user