From 797a8141db59ddbdab61ac744c55819406ffe28f Mon Sep 17 00:00:00 2001 From: James Ide Date: Fri, 27 Oct 2017 21:37:15 +0000 Subject: [PATCH] Run prettier 1.7 with 100-col on libraries Used the latest prettier with 100-col config on most libraries except expo-sdk and snack-sdk. Will do those individually and later. fbshipit-source-id: 79cf6a6 --- EvilIcons.js | 9 ++------- Feather.js | 6 +----- FontAwesome.js | 9 ++------- Foundation.js | 9 ++------- Ionicons.js | 9 ++------- MaterialCommunityIcons.js | 3 +-- MaterialIcons.js | 9 ++------- Octicons.js | 9 ++------- SimpleLineIcons.js | 9 ++------- createIconSetFromFontello.js | 9 ++------- createIconSetFromIcoMoon.js | 9 ++------- website/src/App.js | 5 +---- website/src/Icon.js | 4 +--- website/src/IconList.js | 13 +++++-------- 14 files changed, 27 insertions(+), 85 deletions(-) diff --git a/EvilIcons.js b/EvilIcons.js index bfb2dfa..3e23a3b 100644 --- a/EvilIcons.js +++ b/EvilIcons.js @@ -1,9 +1,4 @@ -import glyphMap - from './vendor/react-native-vector-icons/glyphmaps/EvilIcons.json'; +import glyphMap from './vendor/react-native-vector-icons/glyphmaps/EvilIcons.json'; import createIconSet from './createIconSet'; -export default createIconSet( - glyphMap, - 'evilicons', - require('./fonts/EvilIcons.ttf') -); +export default createIconSet(glyphMap, 'evilicons', require('./fonts/EvilIcons.ttf')); diff --git a/Feather.js b/Feather.js index e65a1a7..34ac22a 100644 --- a/Feather.js +++ b/Feather.js @@ -1,8 +1,4 @@ import glyphMap from './vendor/react-native-vector-icons/glyphmaps/Feather.json'; import createIconSet from './createIconSet'; -export default createIconSet( - glyphMap, - 'feather', - require('./fonts/Feather.ttf') -); +export default createIconSet(glyphMap, 'feather', require('./fonts/Feather.ttf')); diff --git a/FontAwesome.js b/FontAwesome.js index 9de3045..b8fde88 100644 --- a/FontAwesome.js +++ b/FontAwesome.js @@ -1,9 +1,4 @@ -import glyphMap - from './vendor/react-native-vector-icons/glyphmaps/FontAwesome.json'; +import glyphMap from './vendor/react-native-vector-icons/glyphmaps/FontAwesome.json'; import createIconSet from './createIconSet'; -export default createIconSet( - glyphMap, - 'awesome', - require('./fonts/FontAwesome.ttf') -); +export default createIconSet(glyphMap, 'awesome', require('./fonts/FontAwesome.ttf')); diff --git a/Foundation.js b/Foundation.js index 404afc6..b28c5cd 100644 --- a/Foundation.js +++ b/Foundation.js @@ -1,9 +1,4 @@ -import glyphMap - from './vendor/react-native-vector-icons/glyphmaps/Foundation.json'; +import glyphMap from './vendor/react-native-vector-icons/glyphmaps/Foundation.json'; import createIconSet from './createIconSet'; -export default createIconSet( - glyphMap, - 'foundation', - require('./fonts/Foundation.ttf') -); +export default createIconSet(glyphMap, 'foundation', require('./fonts/Foundation.ttf')); diff --git a/Ionicons.js b/Ionicons.js index 98e97ec..50d65d0 100644 --- a/Ionicons.js +++ b/Ionicons.js @@ -1,9 +1,4 @@ -import glyphMap - from './vendor/react-native-vector-icons/glyphmaps/Ionicons.json'; +import glyphMap from './vendor/react-native-vector-icons/glyphmaps/Ionicons.json'; import createIconSet from './createIconSet'; -export default createIconSet( - glyphMap, - 'ionicons', - require('./fonts/Ionicons.ttf') -); +export default createIconSet(glyphMap, 'ionicons', require('./fonts/Ionicons.ttf')); diff --git a/MaterialCommunityIcons.js b/MaterialCommunityIcons.js index 6e0eea7..95fdc5c 100644 --- a/MaterialCommunityIcons.js +++ b/MaterialCommunityIcons.js @@ -1,5 +1,4 @@ -import glyphMap - from './vendor/react-native-vector-icons/glyphmaps/MaterialCommunityIcons.json'; +import glyphMap from './vendor/react-native-vector-icons/glyphmaps/MaterialCommunityIcons.json'; import createIconSet from './createIconSet'; export default createIconSet( diff --git a/MaterialIcons.js b/MaterialIcons.js index 6f1bbe4..b9b63a2 100644 --- a/MaterialIcons.js +++ b/MaterialIcons.js @@ -1,9 +1,4 @@ -import glyphMap - from './vendor/react-native-vector-icons/glyphmaps/MaterialIcons.json'; +import glyphMap from './vendor/react-native-vector-icons/glyphmaps/MaterialIcons.json'; import createIconSet from './createIconSet'; -export default createIconSet( - glyphMap, - 'material', - require('./fonts/MaterialIcons.ttf') -); +export default createIconSet(glyphMap, 'material', require('./fonts/MaterialIcons.ttf')); diff --git a/Octicons.js b/Octicons.js index 0c806d3..5dbbd4f 100644 --- a/Octicons.js +++ b/Octicons.js @@ -1,9 +1,4 @@ -import glyphMap - from './vendor/react-native-vector-icons/glyphmaps/Octicons.json'; +import glyphMap from './vendor/react-native-vector-icons/glyphmaps/Octicons.json'; import createIconSet from './createIconSet'; -export default createIconSet( - glyphMap, - 'octicons', - require('./fonts/Octicons.ttf') -); +export default createIconSet(glyphMap, 'octicons', require('./fonts/Octicons.ttf')); diff --git a/SimpleLineIcons.js b/SimpleLineIcons.js index fb4fea2..fc538b8 100644 --- a/SimpleLineIcons.js +++ b/SimpleLineIcons.js @@ -1,9 +1,4 @@ -import glyphMap - from './vendor/react-native-vector-icons/glyphmaps/SimpleLineIcons.json'; +import glyphMap from './vendor/react-native-vector-icons/glyphmaps/SimpleLineIcons.json'; import createIconSet from './createIconSet'; -export default createIconSet( - glyphMap, - 'simple-line-icons', - require('./fonts/SimpleLineIcons.ttf') -); +export default createIconSet(glyphMap, 'simple-line-icons', require('./fonts/SimpleLineIcons.ttf')); diff --git a/createIconSetFromFontello.js b/createIconSetFromFontello.js index 750bfcb..4784c95 100644 --- a/createIconSetFromFontello.js +++ b/createIconSetFromFontello.js @@ -1,11 +1,6 @@ import { Font } from 'expo'; -import createIconSetFromFontello - from './vendor/react-native-vector-icons/lib/create-icon-set-from-fontello'; +import createIconSetFromFontello from './vendor/react-native-vector-icons/lib/create-icon-set-from-fontello'; export default function(config, expoFontName, expoAssetId) { - return createIconSetFromFontello( - config, - Font.style(expoFontName).fontFamily, - expoAssetId - ); + return createIconSetFromFontello(config, Font.style(expoFontName).fontFamily, expoAssetId); } diff --git a/createIconSetFromIcoMoon.js b/createIconSetFromIcoMoon.js index 8825b89..bc84d8d 100644 --- a/createIconSetFromIcoMoon.js +++ b/createIconSetFromIcoMoon.js @@ -1,11 +1,6 @@ import { Font } from 'expo'; -import createIconSetFromIcoMoon - from './vendor/react-native-vector-icons/lib/create-icon-set-from-icomoon'; +import createIconSetFromIcoMoon from './vendor/react-native-vector-icons/lib/create-icon-set-from-icomoon'; export default function(config, expoFontName, expoAssetId) { - return createIconSetFromIcoMoon( - config, - Font.style(expoFontName).fontFamily, - expoAssetId - ); + return createIconSetFromIcoMoon(config, Font.style(expoFontName).fontFamily, expoAssetId); } diff --git a/website/src/App.js b/website/src/App.js index 527e055..0491e05 100644 --- a/website/src/App.js +++ b/website/src/App.js @@ -59,10 +59,7 @@ class App extends Component { render() { const { searchText } = this.state; const data = IconsArray.filter(icon => { - return ( - icon.name.includes(searchText) || - icon.family.toLowerCase().includes(searchText) - ); + return icon.name.includes(searchText) || icon.family.toLowerCase().includes(searchText); }); return ( diff --git a/website/src/Icon.js b/website/src/Icon.js index 3bfaf36..c997aca 100644 --- a/website/src/Icon.js +++ b/website/src/Icon.js @@ -4,9 +4,7 @@ import { IconFamilies } from './IconConstants'; export default class Icon extends Component { render() { return ( - + {String.fromCharCode(IconFamilies[this.props.family][this.props.name])} ); diff --git a/website/src/IconList.js b/website/src/IconList.js index 547ea62..e25a336 100644 --- a/website/src/IconList.js +++ b/website/src/IconList.js @@ -6,14 +6,15 @@ export default class IconList extends React.Component { render() { return ( - {({ height, width }) => + {({ height, width }) => ( } + /> + )} ); } @@ -42,15 +43,11 @@ export default class IconList extends React.Component {
-

- {name} -

+

{name}

-

- {family} -

+

{family}