mirror of
https://github.com/status-im/react-native.git
synced 2025-02-06 14:43:49 +00:00
Summary: This PR removes the need for having the `providesModule` tags in all the modules in the repository. It configures Flow, Jest and Metro to get the module names from the filenames (`Libraries/Animated/src/nodes/AnimatedInterpolation.js` => `AnimatedInterpolation`) * Checked the Flow configuration by running flow on the project root (no errors): ``` yarn flow ``` * Checked the Jest configuration by running the tests with a clean cache: ``` yarn jest --clearCache && yarn test ``` * Checked the Metro configuration by starting the server with a clean cache and requesting some bundles: ``` yarn run start --reset-cache curl 'localhost:8081/IntegrationTests/AccessibilityManagerTest.bundle?platform=android' curl 'localhost:8081/Libraries/Alert/Alert.bundle?platform=ios' ``` [INTERNAL] [FEATURE] [All] - Removed providesModule from all modules and configured tools. Closes https://github.com/facebook/react-native/pull/18995 Reviewed By: mjesun Differential Revision: D7729509 Pulled By: rubennorte fbshipit-source-id: 892f760a05ce1fddb088ff0cd2e97e521fb8e825
73 lines
2.4 KiB
Plaintext
73 lines
2.4 KiB
Plaintext
[ignore]
|
|
; We fork some components by platform
|
|
.*/*[.]android.js
|
|
|
|
; Ignore templates for 'react-native init'
|
|
.*/local-cli/templates/.*
|
|
|
|
; Ignore the Dangerfile
|
|
<PROJECT_ROOT>/bots/dangerfile.js
|
|
|
|
; Ignore "BUCK" generated dirs
|
|
<PROJECT_ROOT>/\.buckd/
|
|
|
|
; Ignore unexpected extra "@providesModule"
|
|
.*/node_modules/.*/node_modules/fbjs/.*
|
|
|
|
; Ignore duplicate module providers
|
|
; For RN Apps installed via npm, "Libraries" folder is inside
|
|
; "node_modules/react-native" but in the source repo it is in the root
|
|
.*/Libraries/react-native/React.js
|
|
|
|
; Ignore polyfills
|
|
.*/Libraries/polyfills/.*
|
|
|
|
; Ignore metro
|
|
.*/node_modules/metro/.*
|
|
|
|
[include]
|
|
|
|
[libs]
|
|
Libraries/react-native/react-native-interface.js
|
|
flow/
|
|
flow-github/
|
|
|
|
[options]
|
|
emoji=true
|
|
|
|
module.system=haste
|
|
module.system.haste.use_name_reducers=true
|
|
# keep the following in sync with server/haste/hasteImpl.js
|
|
# get basename
|
|
module.system.haste.name_reducers='^.*/\([a-zA-Z0-9$_.-]+\.js\(\.flow\)?\)$' -> '\1'
|
|
# strip .js or .js.flow suffix
|
|
module.system.haste.name_reducers='^\(.*\)\.js\(\.flow\)?$' -> '\1'
|
|
# strip .ios suffix
|
|
module.system.haste.name_reducers='^\(.*\)\.ios$' -> '\1'
|
|
module.system.haste.name_reducers='^\(.*\)\.android$' -> '\1'
|
|
module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1'
|
|
module.system.haste.paths.blacklist=.*/__tests__/.*
|
|
module.system.haste.paths.blacklist=.*/__mocks__/.*
|
|
module.system.haste.paths.blacklist=<PROJECT_ROOT>/Libraries/Animated/src/polyfills/.*
|
|
module.system.haste.paths.whitelist=<PROJECT_ROOT>/Libraries/.*
|
|
module.system.haste.paths.whitelist=<PROJECT_ROOT>/RNTester/.*
|
|
module.system.haste.paths.whitelist=<PROJECT_ROOT>/IntegrationTests/.*
|
|
module.system.haste.paths.blacklist=<PROJECT_ROOT>/Libraries/Animated/src/polyfills/.*
|
|
|
|
munge_underscores=true
|
|
|
|
module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'
|
|
|
|
suppress_type=$FlowIssue
|
|
suppress_type=$FlowFixMe
|
|
suppress_type=$FlowFixMeProps
|
|
suppress_type=$FlowFixMeState
|
|
|
|
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*[react_native_oss|react_native_fb][a-z,_]*\\)?)\\)
|
|
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*[react_native_oss|react_native_fb][a-z,_]*\\)?)\\)?:? #[0-9]+
|
|
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
|
|
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
|
|
|
|
[version]
|
|
^0.70.0
|