Skip to content

Commit

Permalink
fix: flow type def errors, upgrade build deps
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards1211 committed Mar 2, 2021
2 parents 321c4fd + 3b4db77 commit 12ac079
Show file tree
Hide file tree
Showing 104 changed files with 11,874 additions and 23,539 deletions.
8 changes: 2 additions & 6 deletions .babelrc.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
module.exports = function(api) {
module.exports = function (api) {
const plugins = [
'@babel/plugin-transform-flow-strip-types',
'@babel/plugin-syntax-dynamic-import',
'@babel/plugin-proposal-export-default-from',
'@babel/plugin-proposal-export-namespace-from',
'@babel/plugin-proposal-object-rest-spread',
'@babel/plugin-proposal-class-properties',
'@babel/plugin-proposal-optional-chaining',
]
Expand All @@ -13,7 +9,7 @@ module.exports = function(api) {
'@babel/preset-env',
api.env('es5')
? { forceAllTransforms: true }
: { targets: { node: 'current' } },
: { targets: { node: '12' } },
],
'@babel/preset-react',
'@babel/preset-flow',
Expand Down
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
ignore:
- gh-pages
docker:
- image: circleci/node:12.16
- image: circleci/node:14

steps:
- checkout
Expand All @@ -31,7 +31,7 @@ jobs:
command: yarn run prepublishOnly
- run:
name: upload test coverage
command: yarn codecov || true
command: yarn codecov
- run:
name: release
command: yarn run semantic-release || true
command: yarn run semantic-release
15 changes: 7 additions & 8 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@
"extends": [
"@jedwards1211/eslint-config-react",
"@jedwards1211/eslint-config-flow",
"eslint-config-prettier"
"prettier",
"prettier/babel",
"prettier/flowtype",
"prettier/react"
],
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"parser": "@babel/eslint-parser",
"env": {
"es6": true,
"shared-node-browser": true
"shared-node-browser": true,
"es2017": true
},
"settings": {
"react": {
Expand Down
3 changes: 0 additions & 3 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,3 @@
[libs]

[options]
module.system=node
esproposal.class_static_fields=enable
esproposal.class_instance_fields=enable
16 changes: 10 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
.eslintcache
.nyc_output
coverage
es
/coverage
/.nyc_output
node_modules
/demo/bundle.js
/lib
/es
.eslintcache
/*.js
/*.js.flow
*.js
*.js.flow
*.ts
!/src/**/*.js
!/src/**/*.ts
!/test/**/*.js
!/.babelrc.js
!/webpack.config.js
2 changes: 0 additions & 2 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
!**/*.js.flow
!**/*.d.ts
!/*.md
!yarn.lock
/demo
/lib
/src
Expand All @@ -13,4 +12,3 @@
/flow-typed
__tests__
/.*
!/.flowconfig
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ import {
bindPopover,
} from 'material-ui-popup-state/hooks'

const styles = theme => ({
const styles = (theme) => ({
typography: {
margin: theme.spacing.unit * 2,
},
Expand Down Expand Up @@ -154,7 +154,7 @@ import {
import Fade from '@material-ui/core/Fade'
import Paper from '@material-ui/core/Paper'

const styles = theme => ({
const styles = (theme) => ({
typography: {
padding: theme.spacing.unit * 2,
},
Expand Down Expand Up @@ -293,7 +293,7 @@ import PopupState, { bindTrigger, bindMenu } from 'material-ui-popup-state'

const MenuPopupState = () => (
<PopupState variant="popover" popupId="demoMenu">
{popupState => (
{(popupState) => (
<React.Fragment>
<Button variant="contained" {...bindTrigger(popupState)}>
Open Menu
Expand Down Expand Up @@ -322,15 +322,15 @@ import Button from '@material-ui/core/Button'
import Popover from '@material-ui/core/Popover'
import PopupState, { bindTrigger, bindPopover } from 'material-ui-popup-state'

const styles = theme => ({
const styles = (theme) => ({
typography: {
margin: theme.spacing.unit * 2,
},
})

const PopoverPopupState = ({ classes }) => (
<PopupState variant="popover" popupId="demoPopover">
{popupState => (
{(popupState) => (
<div>
<Button variant="contained" {...bindTrigger(popupState)}>
Open Popover
Expand Down Expand Up @@ -372,7 +372,7 @@ import Typography from '@material-ui/core/Typography'
import Popover from '@material-ui/core/Popover'
import PopupState, { bindHover, bindPopover } from 'material-ui-popup-state'

const styles = theme => ({
const styles = (theme) => ({
popover: {
pointerEvents: 'none',
},
Expand All @@ -383,7 +383,7 @@ const styles = theme => ({

const HoverPopoverPopupState = ({ classes }) => (
<PopupState variant="popover" popupId="demoPopover">
{popupState => (
{(popupState) => (
<div>
<Typography {...bindHover(popupState)}>
Hover with a Popover.
Expand Down Expand Up @@ -431,15 +431,15 @@ import PopupState, { bindToggle, bindPopper } from 'material-ui-popup-state'
import Fade from '@material-ui/core/Fade'
import Paper from '@material-ui/core/Paper'

const styles = theme => ({
const styles = (theme) => ({
typography: {
padding: theme.spacing.unit * 2,
},
})

const PopperPopupState = ({ classes }) => (
<PopupState variant="popper" popupId="demoPopper">
{popupState => (
{(popupState) => (
<div>
<Button variant="contained" {...bindToggle(popupState)}>
Toggle Popper
Expand Down Expand Up @@ -500,7 +500,7 @@ import PopupState, { bindTrigger, bindMenu } from 'material-ui-popup-state'

const MenuPopupState = () => (
<PopupState variant="popover" popupId="demoMenu">
{popupState => (
{(popupState) => (
<React.Fragment>
<Button variant="contained" {...bindTrigger(popupState)}>
Open Menu
Expand Down
8 changes: 8 additions & 0 deletions demo/Root.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ import HoverMenu from './examples/HoverMenu'
import HoverMenuCode from '!!raw-loader!./examples/HoverMenu'
import HoverMenuHooks from './examples/HoverMenu.hooks'
import HoverMenuHooksCode from '!!raw-loader!./examples/HoverMenu.hooks'
import HoverMenusHooks from './examples/HoverMenus.hooks'
import HoverMenusHooksCode from '!!raw-loader!./examples/HoverMenus.hooks'
import CustomAnchorHooks from './examples/CustomAnchor.hooks'
import CustomAnchorHooksCode from '!!raw-loader!./examples/CustomAnchor.hooks'
import CascadingHoverMenus from './examples/CascadingHoverMenus'
Expand Down Expand Up @@ -92,6 +94,12 @@ const Root = ({ classes }) => (
hooksExample={<HoverMenuHooks />}
hooksCode={HoverMenuHooksCode}
/>
<Demo
title="Hover Menus"
headerId="hover-menus"
hooksExample={<HoverMenusHooks />}
hooksCode={HoverMenusHooksCode}
/>
<Demo
title="Custom Anchor"
headerId="custom-anchor"
Expand Down
44 changes: 22 additions & 22 deletions flow-typed/npm/@babel/cli_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: 29e3f9a52747ae63fc1a39ad7c6a5140
// flow-typed version: <<STUB>>/@babel/cli_v^7.1.5/flow_v0.113.0
// flow-typed signature: 4c4d15d7be5e11edd59bb9e69070cf20
// flow-typed version: <<STUB>>/@babel/cli_v^7.12.10/flow_v0.143.1

/**
* This is an autogenerated libdef stub for:
Expand All @@ -14,7 +14,7 @@
*/

declare module '@babel/cli' {
declare module.exports: any;
declare module.exports: any
}

/**
Expand All @@ -23,68 +23,68 @@ declare module '@babel/cli' {
* needed.
*/
declare module '@babel/cli/bin/babel-external-helpers' {
declare module.exports: any;
declare module.exports: any
}

declare module '@babel/cli/bin/babel' {
declare module.exports: any;
declare module.exports: any
}

declare module '@babel/cli/lib/babel-external-helpers' {
declare module.exports: any;
declare module.exports: any
}

declare module '@babel/cli/lib/babel/dir' {
declare module.exports: any;
declare module.exports: any
}

declare module '@babel/cli/lib/babel/file' {
declare module.exports: any;
declare module.exports: any
}

declare module '@babel/cli/lib/babel' {
declare module.exports: any;
declare module.exports: any
}

declare module '@babel/cli/lib/babel/options' {
declare module.exports: any;
declare module.exports: any
}

declare module '@babel/cli/lib/babel/util' {
declare module.exports: any;
declare module.exports: any
}

// Filename aliases
declare module '@babel/cli/bin/babel-external-helpers.js' {
declare module.exports: $Exports<'@babel/cli/bin/babel-external-helpers'>;
declare module.exports: $Exports<'@babel/cli/bin/babel-external-helpers'>
}
declare module '@babel/cli/bin/babel.js' {
declare module.exports: $Exports<'@babel/cli/bin/babel'>;
declare module.exports: $Exports<'@babel/cli/bin/babel'>
}
declare module '@babel/cli/index' {
declare module.exports: $Exports<'@babel/cli'>;
declare module.exports: $Exports<'@babel/cli'>
}
declare module '@babel/cli/index.js' {
declare module.exports: $Exports<'@babel/cli'>;
declare module.exports: $Exports<'@babel/cli'>
}
declare module '@babel/cli/lib/babel-external-helpers.js' {
declare module.exports: $Exports<'@babel/cli/lib/babel-external-helpers'>;
declare module.exports: $Exports<'@babel/cli/lib/babel-external-helpers'>
}
declare module '@babel/cli/lib/babel/dir.js' {
declare module.exports: $Exports<'@babel/cli/lib/babel/dir'>;
declare module.exports: $Exports<'@babel/cli/lib/babel/dir'>
}
declare module '@babel/cli/lib/babel/file.js' {
declare module.exports: $Exports<'@babel/cli/lib/babel/file'>;
declare module.exports: $Exports<'@babel/cli/lib/babel/file'>
}
declare module '@babel/cli/lib/babel/index' {
declare module.exports: $Exports<'@babel/cli/lib/babel'>;
declare module.exports: $Exports<'@babel/cli/lib/babel'>
}
declare module '@babel/cli/lib/babel/index.js' {
declare module.exports: $Exports<'@babel/cli/lib/babel'>;
declare module.exports: $Exports<'@babel/cli/lib/babel'>
}
declare module '@babel/cli/lib/babel/options.js' {
declare module.exports: $Exports<'@babel/cli/lib/babel/options'>;
declare module.exports: $Exports<'@babel/cli/lib/babel/options'>
}
declare module '@babel/cli/lib/babel/util.js' {
declare module.exports: $Exports<'@babel/cli/lib/babel/util'>;
declare module.exports: $Exports<'@babel/cli/lib/babel/util'>
}
Loading

0 comments on commit 12ac079

Please sign in to comment.