Skip to content

Commit 7cba283

Browse files
novemberbornsindresorhus
authored andcommitted
Speed up flow check (#1241)
`flow check` is easily taking 30 seconds on my development machine, presumably it's checking too many files. Move the .flowconfig into the flow-types test directory and only include the index.js.flow file to improve check speed.
1 parent d47c5c8 commit 7cba283

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"node": ">=4"
4444
},
4545
"scripts": {
46-
"test": "xo && flow check && nyc tap --no-cov --timeout=150 --jobs=4 test/*.js test/reporters/*.js",
46+
"test": "xo && flow check test/flow-types && nyc tap --no-cov --timeout=150 --jobs=4 test/*.js test/reporters/*.js",
4747
"test-win": "tap --no-cov --reporter=classic --timeout=150 --jobs=4 test/*.js test/reporters/*.js",
4848
"visual": "node test/visual/run-visual-tests.js",
4949
"prepublish": "npm run make-ts",

.flowconfig renamed to test/flow-types/.flowconfig

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
[ignore]
2-
<PROJECT_ROOT>/node_modules/.*
3-
<PROJECT_ROOT>/.*\.js$
1+
[include]
2+
../../*.js.flow$
43

54
[options]
65
emoji=true

test/flow-types/regression-1114.js.flow

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* @flow */
22

3-
const test = require('../../');
3+
const test = require('../../index.js.flow');
44

55
test('Named test', t => {
66
t.pass('Success');

test/flow-types/regression-1148.js.flow

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* @flow */
22

3-
const test = require('../../');
3+
const test = require('../../index.js.flow');
44

55
test(t => {
66
t.throws(() => { throw new Error(); });

0 commit comments

Comments
 (0)