зеркало из https://github.com/microsoft/rnx-kit.git
fix(jest-preset): use public `loadConfig` if it exists (#1596)
This commit is contained in:
Родитель
1edb9acd3b
Коммит
78a6c4edc5
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
"@rnx-kit/jest-preset": patch
|
||||
---
|
||||
|
||||
Use publicly exported `loadConfig` if it exists
|
3
nx.json
3
nx.json
|
@ -22,6 +22,9 @@
|
|||
"update-readme": ["build"]
|
||||
},
|
||||
"implicitDependencies": {
|
||||
"packages/eslint-config/*": "*",
|
||||
"packages/eslint-plugin/*": "*",
|
||||
"packages/jest-preset/*": "*",
|
||||
"yarn.lock": "*"
|
||||
},
|
||||
"affected": {
|
||||
|
|
|
@ -51,7 +51,10 @@
|
|||
]
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "@rnx-kit/eslint-config"
|
||||
"extends": "@rnx-kit/eslint-config",
|
||||
"rules": {
|
||||
"@typescript-eslint/ban-ts-comment": "off"
|
||||
}
|
||||
},
|
||||
"jest": {
|
||||
"preset": "@rnx-kit/scripts"
|
||||
|
|
|
@ -79,7 +79,8 @@ function getTargetPlatform(defaultPlatform) {
|
|||
|
||||
/** @type {() => CLIConfig} */
|
||||
const loadConfig =
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore could not find a declaration file
|
||||
require("@react-native-community/cli").loadConfig ||
|
||||
// @ts-ignore could not find a declaration file
|
||||
require("@react-native-community/cli/build/tools/config").default;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче