Skip to content

Commit f37836f

Browse files
committed
chore: upgrade toolchain
Merge branch 'master' of https://github.com/jedwards1211/react-library-skeleton
2 parents 97c5716 + f4ec441 commit f37836f

File tree

83 files changed

+9530
-10199
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+9530
-10199
lines changed

.babelrc.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
1-
module.exports = function(api) {
1+
module.exports = function (api) {
22
const plugins = [
33
'@babel/plugin-transform-flow-strip-types',
4-
'@babel/plugin-syntax-dynamic-import',
5-
'@babel/plugin-proposal-export-default-from',
6-
'@babel/plugin-proposal-export-namespace-from',
7-
'@babel/plugin-proposal-object-rest-spread',
4+
'babel-plugin-flow-react-proptypes',
85
'@babel/plugin-proposal-class-properties',
96
]
107
const presets = [
118
[
129
'@babel/preset-env',
1310
api.env('es5')
1411
? { forceAllTransforms: true }
15-
: { targets: { node: 'current' } },
12+
: { targets: { node: '12' } },
1613
],
1714
'@babel/preset-react',
1815
'@babel/preset-flow',

.circleci/config.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ jobs:
1111
command: |
1212
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
1313
echo "registry=https://registry.npmjs.org/" >> ~/.npmrc
14+
# https://github.com/atlassian/react-beautiful-dnd/issues/1007#issuecomment-446415426
15+
- run:
16+
name: Workaround for Flow crashing
17+
command: echo "server.max_workers=1" >> .flowconfig
1418
- run:
1519
name: Install pnpm
1620
command: sudo npm install --global pnpm

.eslintrc

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,17 @@
22
"extends": [
33
"@jedwards1211/eslint-config-react",
44
"@jedwards1211/eslint-config-flow",
5-
"eslint-config-prettier"
5+
"prettier"
66
],
7-
"parser": "babel-eslint",
8-
"parserOptions": {
9-
"ecmaVersion": 6,
10-
"sourceType": "module"
11-
},
7+
"parser": "@babel/eslint-parser",
128
"env": {
13-
"es6": true
9+
"es2017": true
10+
},
11+
"settings": {
12+
"react": {
13+
"pragma": "React",
14+
"version": "detect",
15+
"flowVersion": "detect"
16+
}
1417
}
1518
}

.flowconfig

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<PROJECT_ROOT>/node_modules/.*/fbjs/.*
77
<PROJECT_ROOT>/node_modules/fbjs/.*
88
<PROJECT_ROOT>/node_modules/.*/config-chain/.*
9+
<PROJECT_ROOT>/node_modules/.*/resolve/.*
910

1011
[include]
1112
./src
@@ -14,6 +15,3 @@
1415
[libs]
1516

1617
[options]
17-
module.system=node
18-
esproposal.class_static_fields=enable
19-
esproposal.class_instance_fields=enable

.gitignore

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1-
.eslintcache
2-
.nyc_output
3-
coverage
4-
es
1+
/coverage
2+
/.nyc_output
53
node_modules
4+
/lib
5+
/es
66
.eslintcache
7-
/*.js
8-
/*.js.flow
7+
*.js
8+
*.js.flow
9+
*.ts
10+
!/flow-typed/**/*.js
11+
!/src/**/*.js
12+
!/src/**/*.ts
13+
!/test/**/*.js
914
!/.babelrc.js
15+
!/webpack.config.js

.npmignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
**
22
!**/*.js
33
!**/*.js.flow
4+
!**/*.d.ts
45
!/*.md
5-
!yarn.lock
66
/lib
77
/src
88
/stories
@@ -11,4 +11,3 @@
1111
/flow-typed
1212
__tests__
1313
/.*
14-
!/.flowconfig

LICENSE.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121
SOFTWARE.
22-

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,14 @@ import ScriptLoader from 'react-render-props-script-loader'
3636

3737
import MapView from './MapView'
3838

39-
export const MapViewContainer = props => (
39+
export const MapViewContainer = (props) => (
4040
<ScriptLoader
4141
type="text/javascript"
4242
src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&libraries=places"
4343
onLoad={() => console.log('loaded google maps!')}
44-
onError={error => console.error('failed to load google maps:', error.stack)}
44+
onError={(error) =>
45+
console.error('failed to load google maps:', error.stack)
46+
}
4547
>
4648
{({ loading, error }) => {
4749
if (loading) return <h3>Loading Google Maps API...</h3>
@@ -128,7 +130,7 @@ const html = (
128130
Make sure your header includes this meta tag:
129131
130132
```jsx
131-
<meta property="csp-nonce" content={nonce} />
133+
<meta property="csp-nonce" content={nonce} />
132134
```
133135
134136
And in SSR, pass the `nonce` to `registry.scriptTags({ nonce })`.
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
// flow-typed signature: 2485f3c8faf00702ed0b841413335a0c
2+
// flow-typed version: <<STUB>>/@babel/cli_v^7.15.7/flow_v0.161.0
3+
4+
/**
5+
* This is an autogenerated libdef stub for:
6+
*
7+
* '@babel/cli'
8+
*
9+
* Fill this stub out by replacing all the `any` types.
10+
*
11+
* Once filled out, we encourage you to share your work with the
12+
* community by sending a pull request to:
13+
* https://github.com/flowtype/flow-typed
14+
*/
15+
16+
declare module '@babel/cli' {
17+
declare module.exports: any
18+
}
19+
20+
/**
21+
* We include stubs for each file inside this npm package in case you need to
22+
* require those files directly. Feel free to delete any files that aren't
23+
* needed.
24+
*/
25+
declare module '@babel/cli/bin/babel-external-helpers' {
26+
declare module.exports: any
27+
}
28+
29+
declare module '@babel/cli/bin/babel' {
30+
declare module.exports: any
31+
}
32+
33+
declare module '@babel/cli/lib/babel-external-helpers' {
34+
declare module.exports: any
35+
}
36+
37+
declare module '@babel/cli/lib/babel/dir' {
38+
declare module.exports: any
39+
}
40+
41+
declare module '@babel/cli/lib/babel/file' {
42+
declare module.exports: any
43+
}
44+
45+
declare module '@babel/cli/lib/babel' {
46+
declare module.exports: any
47+
}
48+
49+
declare module '@babel/cli/lib/babel/options' {
50+
declare module.exports: any
51+
}
52+
53+
declare module '@babel/cli/lib/babel/util' {
54+
declare module.exports: any
55+
}
56+
57+
// Filename aliases
58+
declare module '@babel/cli/bin/babel-external-helpers.js' {
59+
declare module.exports: $Exports<'@babel/cli/bin/babel-external-helpers'>
60+
}
61+
declare module '@babel/cli/bin/babel.js' {
62+
declare module.exports: $Exports<'@babel/cli/bin/babel'>
63+
}
64+
declare module '@babel/cli/index' {
65+
declare module.exports: $Exports<'@babel/cli'>
66+
}
67+
declare module '@babel/cli/index.js' {
68+
declare module.exports: $Exports<'@babel/cli'>
69+
}
70+
declare module '@babel/cli/lib/babel-external-helpers.js' {
71+
declare module.exports: $Exports<'@babel/cli/lib/babel-external-helpers'>
72+
}
73+
declare module '@babel/cli/lib/babel/dir.js' {
74+
declare module.exports: $Exports<'@babel/cli/lib/babel/dir'>
75+
}
76+
declare module '@babel/cli/lib/babel/file.js' {
77+
declare module.exports: $Exports<'@babel/cli/lib/babel/file'>
78+
}
79+
declare module '@babel/cli/lib/babel/index' {
80+
declare module.exports: $Exports<'@babel/cli/lib/babel'>
81+
}
82+
declare module '@babel/cli/lib/babel/index.js' {
83+
declare module.exports: $Exports<'@babel/cli/lib/babel'>
84+
}
85+
declare module '@babel/cli/lib/babel/options.js' {
86+
declare module.exports: $Exports<'@babel/cli/lib/babel/options'>
87+
}
88+
declare module '@babel/cli/lib/babel/util.js' {
89+
declare module.exports: $Exports<'@babel/cli/lib/babel/util'>
90+
}

0 commit comments

Comments
 (0)