Skip to content

Commit 27ba7d3

Browse files
authored
Merge pull request #7 from piglovesyou/mod-graphql-import-for-flow
mod: better suppressing flow error for .graphql import
2 parents c15b123 + 47e4e50 commit 27ba7d3

File tree

4 files changed

+916
-445
lines changed

4 files changed

+916
-445
lines changed

.flowconfig

+7
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,10 @@
88

99
[options]
1010
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectError
11+
module.file_ext=.js
12+
module.file_ext=.jsx
13+
module.file_ext=.json
14+
module.file_ext=.css
15+
module.file_ext=.scss
16+
module.file_ext=.graphql
17+
module.name_mapper='^.*\.graphql$' -> 'empty/object'

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
"glob": "^7.1.3",
9191
"husky": "^1.0.0-rc.15",
9292
"identity-obj-proxy": "^3.0.0",
93-
"jest": "^23.6.0",
93+
"jest": "^24.5.0",
9494
"jest-codemods": "^0.16.0",
9595
"jest-transform-graphql": "^2.1.0",
9696
"lint-staged": "^7.3.0",

src/routes/home/Home.js

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import React from 'react';
1313
import { graphql } from 'react-apollo';
1414
import type { OperationComponent } from 'react-apollo';
1515
import withStyles from 'isomorphic-style-loader/lib/withStyles';
16-
// $FlowExpectError
1716
import newsQuery from './news.graphql';
1817
import s from './Home.css';
1918

0 commit comments

Comments
 (0)