Update formatter and linter

This commit is contained in:
Nicolas Gallagher
2017-06-09 12:59:39 -07:00
parent 1f25ef82ae
commit fc86c876e0
33 changed files with 178 additions and 211 deletions
+2 -3
View File
@@ -3,7 +3,7 @@ import React from 'react';
import View from '../View/aphrodite';
import { StyleSheet } from 'aphrodite';
const Box = ({ color, fixed = false, layout = 'column', outer = false, ...other }) => (
const Box = ({ color, fixed = false, layout = 'column', outer = false, ...other }) =>
<View
{...other}
style={[
@@ -12,8 +12,7 @@ const Box = ({ color, fixed = false, layout = 'column', outer = false, ...other
layout === 'row' && styles.row,
outer && styles.outer
]}
/>
);
/>;
const styles = StyleSheet.create({
outer: {
+2 -3
View File
@@ -4,7 +4,7 @@ import React from 'react';
import View from '../View/css-modules';
import styles from './styles.css';
const Box = ({ color, fixed = false, layout = 'column', outer = false, ...other }) => (
const Box = ({ color, fixed = false, layout = 'column', outer = false, ...other }) =>
<View
{...other}
className={classnames(styles[`color${color}`], {
@@ -12,7 +12,6 @@ const Box = ({ color, fixed = false, layout = 'column', outer = false, ...other
[styles.outer]: outer,
[styles.row]: layout === 'row'
})}
/>
);
/>;
module.exports = Box;
+2 -3
View File
@@ -2,7 +2,7 @@
import React from 'react';
import View from '../View/glamor';
const Box = ({ color, fixed = false, layout = 'column', outer = false, ...other }) => (
const Box = ({ color, fixed = false, layout = 'column', outer = false, ...other }) =>
<View
{...other}
style={[
@@ -11,8 +11,7 @@ const Box = ({ color, fixed = false, layout = 'column', outer = false, ...other
layout === 'row' && styles.row,
outer && styles.outer
]}
/>
);
/>;
const styles = {
outer: {
+2 -3
View File
@@ -4,7 +4,7 @@ import injectSheet from 'react-jss';
import React from 'react';
import View from '../View/jss';
const Box = ({ classes, color, fixed = false, layout = 'column', outer = false, ...other }) => (
const Box = ({ classes, color, fixed = false, layout = 'column', outer = false, ...other }) =>
<View
{...other}
className={classnames({
@@ -13,8 +13,7 @@ const Box = ({ classes, color, fixed = false, layout = 'column', outer = false,
[classes.row]: layout === 'row',
[classes.outer]: outer
})}
/>
);
/>;
const styles = {
outer: {
+2 -3
View File
@@ -3,7 +3,7 @@ import React from 'react';
import StyleSheet from 'react-native/apis/StyleSheet';
import View from '../View/react-native-stylesheet';
const Box = ({ color, fixed = false, layout = 'column', outer = false, ...other }) => (
const Box = ({ color, fixed = false, layout = 'column', outer = false, ...other }) =>
<View
{...other}
style={[
@@ -12,8 +12,7 @@ const Box = ({ color, fixed = false, layout = 'column', outer = false, ...other
layout === 'row' && styles.row,
outer && styles.outer
]}
/>
);
/>;
const styles = StyleSheet.create({
outer: {
+2 -3
View File
@@ -2,7 +2,7 @@
import React from 'react';
import { StyleSheet, View } from 'react-native';
const Box = ({ color, fixed = false, layout = 'column', outer = false, ...other }) => (
const Box = ({ color, fixed = false, layout = 'column', outer = false, ...other }) =>
<View
{...other}
style={[
@@ -11,8 +11,7 @@ const Box = ({ color, fixed = false, layout = 'column', outer = false, ...other
layout === 'row' && styles.row,
outer && styles.outer
]}
/>
);
/>;
const styles = StyleSheet.create({
outer: {
+2 -3
View File
@@ -2,7 +2,7 @@
import React from 'react';
import { Styles, View } from 'reactxp';
const Box = ({ color, fixed = false, layout = 'column', outer = false, ...other }) => (
const Box = ({ color, fixed = false, layout = 'column', outer = false, ...other }) =>
<View
{...other}
style={[
@@ -11,8 +11,7 @@ const Box = ({ color, fixed = false, layout = 'column', outer = false, ...other
layout === 'row' && styles.row,
outer && styles.outer
]}
/>
);
/>;
const styles = {
outer: Styles.createViewStyle({
+2 -3
View File
@@ -3,7 +3,7 @@ import { injectStylePrefixed } from 'styletron-utils';
import React from 'react';
import View, { styletron } from '../View/styletron';
const Box = ({ color, fixed = false, layout = 'column', outer = false, ...other }) => (
const Box = ({ color, fixed = false, layout = 'column', outer = false, ...other }) =>
<View
{...other}
style={[
@@ -12,8 +12,7 @@ const Box = ({ color, fixed = false, layout = 'column', outer = false, ...other
layout === 'row' && styles.row,
outer && styles.outer
]}
/>
);
/>;
const styles = {
outer: injectStylePrefixed(styletron, {
@@ -17,7 +17,7 @@ class DeepTree extends Component {
<Box color={id % 3} components={components} layout={depth % 2 === 0 ? 'column' : 'row'} outer>
{depth === 0 && <Box color={id % 3 + 3} components={components} fixed />}
{depth !== 0 &&
Array.from({ length: breadth }).map((el, i) => (
Array.from({ length: breadth }).map((el, i) =>
<DeepTree
breadth={breadth}
components={components}
@@ -26,7 +26,7 @@ class DeepTree extends Component {
key={i}
wrap={wrap}
/>
))}
)}
</Box>
);
for (let i = 0; i < wrap; i++) {
@@ -24,7 +24,7 @@ export default class TweetActionsBar extends PureComponent {
/* eslint-disable react/jsx-handler-names */
return (
<View style={[styles.root, style]}>
{actions.map((action, i) => (
{actions.map((action, i) =>
<TweetAction
accessibilityLabel={actions.label}
count={action.count}
@@ -34,7 +34,7 @@ export default class TweetActionsBar extends PureComponent {
onPress={action.onPress}
style={styles.action}
/>
))}
)}
</View>
);
}
+2 -2
View File
@@ -17,9 +17,9 @@ class TweetText extends React.Component {
return (
<AppText {...other} lang={lang} numberOfLines={numberOfLines}>
{textParts.map((part, i) => (
{textParts.map((part, i) =>
<TweetTextPart displayMode={displayMode} key={i} part={part} />
))}
)}
</AppText>
);
}
@@ -5,14 +5,13 @@ import theme from '../theme';
const createTextEntity = ({ part }) => <Text>{`${part.prefix}${part.text}`}</Text>;
const createTwemojiEntity = ({ part }) => (
const createTwemojiEntity = ({ part }) =>
<Image
accessibilityLabel={part.text}
draggable={false}
source={{ uri: part.emoji }}
style={styles.twemoji}
/>
);
/>;
// @mention, #hashtag, $cashtag
const createSymbolEntity = ({ displayMode, part }) => {
+3 -2
View File
@@ -25,8 +25,9 @@ const fontSize = {
module.exports = {
colors,
fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", sans-serif, ' +
'"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"', // emoji fonts
fontFamily:
'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", sans-serif, ' +
'"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"', // emoji fonts
fontSize,
lineHeight: 1.3125,
spaceX: 0.6,