Re-enable flow module checking
Summary: Setting the module extension to .tsx overrode the defaults, meaning .js files were no longer being checked when imported. This adds the defaults back to the extensions to be checked, including `.js` It does seem to cause errors importing `.tsx` at the moment, but there aren't many so I've just $FlowFixMe'd them for now. https://flow.org/en/docs/config/options/#toc-module-file-ext-string Reviewed By: passy Differential Revision: D16333800 fbshipit-source-id: 7bea92c038048234b4f634704f71c15d79ab3c63
This commit is contained in:
committed by
Facebook Github Bot
parent
37f8caf714
commit
7d3f05dae3
@@ -22,6 +22,10 @@ emoji=true
|
||||
all=true
|
||||
include_warnings=true
|
||||
module.name_mapper='flipper' -> '<PROJECT_ROOT>/src/index.js'
|
||||
module.file_ext=.js
|
||||
module.file_ext=.jsx
|
||||
module.file_ext=.json
|
||||
module.file_ext=.mjs
|
||||
module.file_ext=.tsx
|
||||
module.name_mapper.extension='tsx' -> 'any'
|
||||
module.name_mapper.extension='ts' -> 'any'
|
||||
|
||||
@@ -9,6 +9,7 @@ import React from 'react';
|
||||
import {FlexColumn, FlexRow} from 'flipper';
|
||||
import {connect} from 'react-redux';
|
||||
import WelcomeScreen from './chrome/WelcomeScreen.js';
|
||||
// $FlowFixMe T47375728
|
||||
import TitleBar from './chrome/TitleBar.tsx';
|
||||
import MainSidebar from './chrome/MainSidebar.js';
|
||||
import BugReporterDialog from './chrome/BugReporterDialog.js';
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
* @format
|
||||
*/
|
||||
|
||||
// $FlowFixMe T47375728
|
||||
import TitleBar from '../TitleBar.tsx';
|
||||
import renderer from 'react-test-renderer';
|
||||
import reducers from '../../reducers/index.js';
|
||||
|
||||
@@ -21,6 +21,7 @@ import iosUtil from '../fb-stubs/iOSContainerUtility';
|
||||
import {reportPlatformFailures} from './metrics';
|
||||
import {getAdbClient} from './adbClient';
|
||||
import * as androidUtil from './androidContainerUtility';
|
||||
// $FlowFixMe T47375728
|
||||
import dateFormat from 'dateformat';
|
||||
const writeFile = promisify(fs.writeFile);
|
||||
const exists = promisify(fs.exists);
|
||||
|
||||
@@ -17,6 +17,7 @@ test('Idler should interrupt', async () => {
|
||||
}
|
||||
await idler.idle();
|
||||
}
|
||||
// $FlowFixMe T47375728
|
||||
fail('Idler should have thrown an error');
|
||||
} catch (e) {
|
||||
expect(i).toEqual(100);
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
* @format
|
||||
*/
|
||||
|
||||
// $FlowFixMe T47375728
|
||||
export const stateSanitizer = state => {
|
||||
let sanitizedState = state;
|
||||
if (state.connections) {
|
||||
|
||||
Reference in New Issue
Block a user