Skip to content

Commit 002aea7

Browse files
committed
Merge branch 'master' into react
2 parents 0f9718c + d7470fa commit 002aea7

File tree

17 files changed

+1582
-1550
lines changed

17 files changed

+1582
-1550
lines changed

.eslintignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
flow-typed/
2-
tools/flow/
31
node_modules/
42
commonjs/
53
coverage/

.eslintrc

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
"root": true,
33
"parser": "babel-eslint",
44
"extends": "airbnb",
5-
"plugins": [
6-
"flowtype"
7-
],
5+
"plugins": [],
86
"env": {
97
"browser": true,
108
"es6": true,
@@ -15,6 +13,20 @@
1513
"defaultParams": true
1614
},
1715
"rules": {
18-
"react/jsx-filename-extension": 0
16+
"react/jsx-filename-extension": 0,
17+
18+
"no-confusing-arrow": 0,
19+
20+
"max-len": [
21+
"error",
22+
{
23+
"ignoreComments": false,
24+
"ignoreStrings": true,
25+
"code": 80
26+
}
27+
],
28+
29+
// Going hipster
30+
"semi": [2, "never"]
1931
}
2032
}

.flowconfig

Lines changed: 0 additions & 43 deletions
This file was deleted.

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.9.4
1+
6.10.0

package.json

Lines changed: 44 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,10 @@
2222
"scripts": {
2323
"build": "babel-node ./tools/scripts/build.js",
2424
"check": "yarn run lint && yarn run test",
25-
"clean": "rimraf ./commonjs && rimraf ./umd && rimraf ./coverage && rimraf ./flow-coverage && rimraf ./umd",
25+
"clean": "rimraf ./commonjs && rimraf ./umd && rimraf ./coverage && rimraf ./umd",
2626
"example:web": "echo 'Make sure to `cd example/web && yarn install`' && cd example/web && yarn run start",
27-
"flow": "babel-node ./tools/scripts/flow",
28-
"flow:coverage": "flow-coverage-report -i 'src/**/*.js' -t html -t json -t text",
29-
"flow:defs": "flow-typed install --overwrite",
3027
"lint": "eslint src",
28+
"precommit": "lint-staged && npm run test",
3129
"prepublish": "yarn run build",
3230
"test": "jest",
3331
"test:coverage": "yarn run test -- --coverage",
@@ -37,62 +35,60 @@
3735
"react": "^0.14.0 || ^15.0.0-0",
3836
"react-dom": "^0.14.0 || ^15.0.0-0"
3937
},
38+
"jest": {
39+
"collectCoverageFrom": [
40+
"src/**/*.{js,jsx}"
41+
],
42+
"testPathIgnorePatterns": [
43+
"<rootDir>/(commonjs|coverage|flow-typed|node_modules|tools|umd)/"
44+
]
45+
},
46+
"lint-staged": {
47+
"*.js": [
48+
"prettier-eslint --write",
49+
"git add"
50+
]
51+
},
4052
"devDependencies": {
4153
"app-root-dir": "1.0.2",
42-
"babel-cli": "6.18.0",
43-
"babel-core": "6.21.0",
54+
"babel-cli": "6.24.0",
55+
"babel-core": "6.24.0",
4456
"babel-eslint": "7.1.1",
45-
"babel-jest": "18.0.0",
46-
"babel-loader": "6.2.10",
47-
"babel-polyfill": "6.20.0",
48-
"babel-preset-env": "1.1.8",
49-
"babel-preset-latest": "6.16.0",
50-
"babel-preset-react": "6.16.0",
51-
"babel-preset-stage-3": "6.17.0",
52-
"babel-register": "6.18.0",
57+
"babel-jest": "19.0.0",
58+
"babel-loader": "6.4.0",
59+
"babel-polyfill": "6.23.0",
60+
"babel-preset-env": "1.2.1",
61+
"babel-preset-latest": "6.24.0",
62+
"babel-preset-react": "6.23.0",
63+
"babel-preset-stage-3": "6.22.0",
64+
"babel-register": "6.24.0",
5365
"codecov": "1.0.1",
54-
"cross-env": "3.1.4",
55-
"enzyme": "2.7.0",
56-
"enzyme-to-json": "1.4.5",
57-
"eslint": "3.13.1",
58-
"eslint-config-airbnb": "14.0.0",
59-
"eslint-plugin-flowtype": "2.30.0",
66+
"cross-env": "3.2.3",
67+
"enzyme": "2.7.1",
68+
"enzyme-to-json": "1.5.0",
69+
"eslint": "3.17.1",
70+
"eslint-config-airbnb": "14.1.0",
6071
"eslint-plugin-import": "2.2.0",
61-
"eslint-plugin-jsx-a11y": "3.0.2",
62-
"eslint-plugin-react": "6.9.0",
63-
"flow-bin": "0.37.4",
64-
"flow-coverage-report": "0.2.0",
65-
"flow-typed": "2.0.0",
66-
"ghooks": "2.0.0",
72+
"eslint-plugin-jsx-a11y": "4.0.0",
73+
"eslint-plugin-react": "6.10.0",
6774
"gzip-size": "3.0.0",
75+
"husky": "0.13.2",
6876
"in-publish": "2.0.0",
69-
"jest": "18.1.0",
77+
"jest": "19.0.2",
78+
"lint-staged": "3.4.0",
79+
"prettier": "0.22.0",
80+
"prettier-eslint": "4.3.0",
81+
"prettier-eslint-cli": "3.1.2",
7082
"pretty-bytes": "4.0.2",
7183
"ramda": "0.23.0",
7284
"react": "15.4.2",
7385
"react-addons-test-utils": "15.4.2",
7486
"react-dom": "15.4.2",
75-
"readline-sync": "1.4.5",
76-
"rimraf": "2.5.4",
87+
"readline-sync": "1.4.6",
88+
"rimraf": "2.6.1",
7789
"sinon": "1.17.7",
78-
"webpack": "2.2.0-rc.3",
79-
"webpack-dev-middleware": "1.9.0",
80-
"webpack-hot-middleware": "2.15.0"
81-
},
82-
"config": {
83-
"ghooks": {
84-
"pre-commit": "yarn run check"
85-
}
86-
},
87-
"jest": {
88-
"collectCoverageFrom": [
89-
"src/**/*.{js,jsx}"
90-
],
91-
"snapshotSerializers": [
92-
"<rootDir>/node_modules/enzyme-to-json/serializer"
93-
],
94-
"testPathIgnorePatterns": [
95-
"<rootDir>/(commonjs|coverage|flow-typed|node_modules|tools|umd)/"
96-
]
90+
"webpack": "2.2.1",
91+
"webpack-dev-middleware": "1.10.1",
92+
"webpack-hot-middleware": "2.17.1"
9793
}
9894
}
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
13
exports[`MyComponent renders 1`] = `
24
<MyComponent
3-
msg="foo" />
5+
msg="foo"
6+
/>
47
`;

src/__tests__/helloWorld.test.js

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
/* @flow */
2-
3-
import helloWorld from '../helloWorld';
1+
import helloWorld from '../helloWorld'
42

53
describe('helloWorld', () => {
64
it('returns the expected result', () => {
7-
const expected = 'hello world';
8-
const actual = helloWorld();
9-
expect(expected).toEqual(actual);
10-
});
11-
});
5+
const expected = 'hello world'
6+
const actual = helloWorld()
7+
expect(expected).toEqual(actual)
8+
})
9+
})

src/goodbyeWorld.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
/* @flow */
2-
31
function goodbyeWorld() {
4-
return 'goodbye world';
2+
return 'goodbye world'
53
}
64

7-
export default goodbyeWorld;
5+
export default goodbyeWorld

src/helloWorld.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
/* @flow */
2-
31
function helloWorld() {
4-
return 'hello world';
2+
return 'hello world'
53
}
64

7-
export default helloWorld;
5+
export default helloWorld

src/index.js

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
1-
/* @flow */
1+
import helloWorld from './helloWorld'
2+
import goodbyeWorld from './goodbyeWorld'
3+
import MyComponent from './MyComponent'
24

3-
import helloWorld from './helloWorld';
4-
import goodbyeWorld from './goodbyeWorld';
5-
import MyComponent from './MyComponent';
6-
7-
export {
8-
helloWorld,
9-
goodbyeWorld,
10-
MyComponent,
11-
};
5+
export { helloWorld, goodbyeWorld, MyComponent }

0 commit comments

Comments
 (0)