Skip to content

Commit d40a1df

Browse files
author
Ives van Hoorne
committed
Update on typings
1 parent 9951bab commit d40a1df

30 files changed

+799
-705
lines changed

.flowconfig

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,32 @@
11
[ignore]
2-
.*/node_modules/fbjs/.*
2+
# We vendor our src directory, which is not needed for type-checking
3+
.*/styled-components/src/.*
34

45
[include]
56

67
[libs]
7-
flow-typed/
8+
# This is were your own flow-typed libdefs go
9+
flow-typed
10+
11+
# These declarations are super explicit...
12+
# We want to show what libdef files we need to make
13+
# flow understand all external dependencies
14+
#
15+
# If you have similar dependencies, you will need to
16+
# check which libdef files are covered by your flow-typed
17+
# directory!
18+
#
19+
# A more generic approach (please use with caution!):
20+
# node_modules/styled-components/flow-typed/*.js
21+
22+
node_modules/styled-components/flow-typed/react-native.js
23+
node_modules/styled-components/flow-typed/glamor_vx.x.x.js
24+
node_modules/styled-components/flow-typed/lodash_v4.x.x.js
25+
node_modules/styled-components/flow-typed/react-native.js
26+
node_modules/styled-components/flow-typed/inline-style-prefixer_vx.x.x.js
827

928
[options]
10-
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue
29+
30+
# Yeah, we use this to ignore errors...
31+
# Just add it, if you have a different suppress_comment notation
32+
suppress_comment=.*\\$FlowIssue

.vscode/tasks.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the tasks.json format
4+
"version": "0.1.0",
5+
"command": "tsc",
6+
"isShellCommand": true,
7+
"args": ["-w", "-p", "."],
8+
"showOutput": "silent",
9+
"isWatching": true,
10+
"problemMatcher": "$tsc-watch"
11+
}

config/babel.dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ module.exports = {
3131
regenerator: true,
3232
// Resolve the Babel runtime relative to the config.
3333
// You can safely remove this after ejecting:
34-
moduleName: path.dirname(require.resolve('babel-runtime/package'))
34+
moduleName: path.dirname(require.resolve('babel-runtime/package')),
3535
}],
3636
require.resolve('react-hot-loader/babel'),
3737
],

config/babel.prod.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,21 @@ module.exports = {
55
babelrc: false,
66
presets: [
77
// Latest stable ECMAScript features
8-
require.resolve('babel-preset-latest'),
8+
['es2015', { modules: false }],
99
// JSX, Flow
10-
require.resolve('babel-preset-react')
10+
'react',
1111
],
1212
plugins: [
1313
// To split lodash modules
14-
require.resolve('babel-plugin-lodash'),
14+
// require.resolve('babel-plugin-lodash'),
1515
// class { handleClick = () => { } }
1616
require.resolve('babel-plugin-transform-class-properties'),
1717
// { ...todo, completed: true }
1818
require.resolve('babel-plugin-transform-object-rest-spread'),
1919
// function* () { yield 42; yield 43; }
2020
[require.resolve('babel-plugin-transform-regenerator'), {
2121
// Async functions are converted to generators by babel-preset-latest
22-
async: false
22+
async: false,
2323
}],
2424
// Polyfills the runtime needed for async/await and generators
2525
[require.resolve('babel-plugin-transform-runtime'), {
@@ -28,13 +28,13 @@ module.exports = {
2828
regenerator: true,
2929
// Resolve the Babel runtime relative to the config.
3030
// You can safely remove this after ejecting:
31-
moduleName: path.dirname(require.resolve('babel-runtime/package'))
31+
moduleName: path.dirname(require.resolve('babel-runtime/package')),
3232
}],
3333
// Optimization: hoist JSX that never changes out of render()
3434
// Disabled because of issues:
3535
// * https://github.com/facebookincubator/create-react-app/issues/525
3636
// * https://phabricator.babeljs.io/search/query/pCNlnC2xzwzx/
3737
// TODO: Enable again when these issues are resolved.
3838
// require.resolve('babel-plugin-transform-react-constant-elements')
39-
]
39+
],
4040
};

config/webpack.config.dev.js

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

0 commit comments

Comments
 (0)