This repository has been archived by the owner on Nov 25, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5107405
commit 7b8962d
Showing
6 changed files
with
274 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
module.exports = { | ||
"parser": "babel-eslint", | ||
"extends": "airbnb", | ||
"plugins": [ | ||
"react", | ||
"jsx-a11y", | ||
"import", | ||
"flowtype-errors" | ||
], | ||
"rules": { | ||
"flowtype-errors/show-errors": 2 | ||
} | ||
}; | ||
parser: 'babel-eslint', | ||
extends: 'eslint:recommended', | ||
plugins: ['react', 'jsx-a11y', 'import', 'flowtype-errors'], | ||
env: { | ||
browser: true, | ||
es6: true, | ||
node: true, | ||
}, | ||
rules: { | ||
'flowtype-errors/show-errors': 2, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,14 @@ | ||
import styledProps from './styledProps'; | ||
|
||
type PropsLike = { [key:string]: any }; | ||
type StyledPropsMap = { [key:string]: typeof styledProps }; | ||
type BindFunction = (map:PropsLike) => StyledPropsMap; | ||
type PropsLike = { [key: string]: any }; | ||
type StyledPropsMap = { [key: string]: typeof styledProps }; | ||
type BindFunction = (map: PropsLike) => StyledPropsMap; | ||
|
||
const bind:BindFunction = map => ( | ||
Object.keys(map).reduce((memo:StyledPropsMap, key:string) => { | ||
const bind: BindFunction = map => | ||
Object.keys(map).reduce((memo: StyledPropsMap, key: string) => { | ||
// eslint-disable-next-line no-param-reassign | ||
memo[key] = styledProps(map[key], key); | ||
return memo; | ||
}, {}) | ||
); | ||
}, {}); | ||
|
||
export default bind; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.