Skip to content

Commit 1e3c000

Browse files
committed
Add flow
1 parent d447faf commit 1e3c000

File tree

4 files changed

+7
-1
lines changed

4 files changed

+7
-1
lines changed

.babelrc

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"presets": ["es2015", "stage-0", "react"],
33
"plugins": [
4+
"transform-flow-strip-types",
45
"transform-object-rest-spread",
56
"transform-es3-member-expression-literals",
67
"transform-es3-property-literals"

.flowconfig

Whitespace-only changes.

package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@
1212
],
1313
"scripts": {
1414
"clean": "rimraf lib dist es .nyc_output",
15+
"flow": "flow; test $? -eq 0 -o $? -eq 2",
1516
"test": "cross-env BABEL_ENV=commonjs nyc --require babel-register --require ./test/setup.js mocha --recursive",
1617
"test:watch": "npm test -- --watch",
1718
"test:cov": "nyc report --reporter=text-lcov | coveralls",
18-
"check:src": "npm run lint && npm run test",
19+
"check:src": "npm run lint && npm run flow && npm run test",
1920
"build:commonjs": "cross-env BABEL_ENV=commonjs babel src --out-dir lib",
2021
"build:es": "cross-env BABEL_ENV=es babel src --out-dir es",
2122
"build:umd": "cross-env BABEL_ENV=commonjs NODE_ENV=development webpack src/index.js dist/react-cssom.js",
@@ -49,6 +50,7 @@
4950
"babel-plugin-transform-es2015-modules-commonjs": "6.10.3",
5051
"babel-plugin-transform-es3-member-expression-literals": "6.8.0",
5152
"babel-plugin-transform-es3-property-literals": "6.8.0",
53+
"babel-plugin-transform-flow-strip-types": "6.21.0",
5254
"babel-plugin-transform-object-rest-spread": "6.8.0",
5355
"babel-preset-es2015": "6.5.0",
5456
"babel-preset-react": "6.5.0",
@@ -63,6 +65,7 @@
6365
"eslint-plugin-jsx-a11y": "1.3.0",
6466
"eslint-plugin-react": "5.1.1",
6567
"expect": "1.20.2",
68+
"flow-bin": "0.37.4",
6669
"istanbul": "0.4.5",
6770
"jsdom": "9.5.0",
6871
"mocha": "3.0.2",

src/index.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// @flow
2+
13
import React from 'react';
24
import inject from './injector';
35

0 commit comments

Comments
 (0)