From 40423571c1898b487d2eb1584d179d1ae59ad40b Mon Sep 17 00:00:00 2001 From: Brian Deane Date: Sat, 20 May 2017 15:58:55 -0700 Subject: [PATCH 1/2] don't check node_modules with flow --- tutorial/02-babel-es6-eslint-flow-jest-husky.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tutorial/02-babel-es6-eslint-flow-jest-husky.md b/tutorial/02-babel-es6-eslint-flow-jest-husky.md index b2384aec..c382de2a 100644 --- a/tutorial/02-babel-es6-eslint-flow-jest-husky.md +++ b/tutorial/02-babel-es6-eslint-flow-jest-husky.md @@ -243,11 +243,15 @@ I know this is a lot to take in, so take a minute to think about it. I'm still a - Create a `.flowconfig` file at the root of your project containing: ```flowconfig +[ignore] +.*/node_modules/.* [options] suppress_comment= \\(.\\|\n\\)*\\flow-disable-next-line ``` -This is a little utility that we set up to make Flow ignore any warning detected on the next line. You would use it like this, similarly to `eslint-disable`: +The first two lines tell `flow` not to check the libraries you've downloaded in node_modules. Otherwise, `flow` might fail on code you didn't even write! + +The `suppress_comment` option is a little utility that we set up to make Flow ignore any warning detected on the next line. You would use it like this, similarly to `eslint-disable`: ```js // flow-disable-next-line From d5606245e2e11c67d40a5833c723584f02471f70 Mon Sep 17 00:00:00 2001 From: Brian Deane Date: Sat, 20 May 2017 16:05:09 -0700 Subject: [PATCH 2/2] use stricter ignore syntax --- tutorial/02-babel-es6-eslint-flow-jest-husky.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorial/02-babel-es6-eslint-flow-jest-husky.md b/tutorial/02-babel-es6-eslint-flow-jest-husky.md index c382de2a..e1ac6e54 100644 --- a/tutorial/02-babel-es6-eslint-flow-jest-husky.md +++ b/tutorial/02-babel-es6-eslint-flow-jest-husky.md @@ -244,7 +244,7 @@ I know this is a lot to take in, so take a minute to think about it. I'm still a ```flowconfig [ignore] -.*/node_modules/.* +/node_modules/ [options] suppress_comment= \\(.\\|\n\\)*\\flow-disable-next-line ```