Skip to content

Commit

Permalink
Fix lint errors in the mobile branch (#12990)
Browse files Browse the repository at this point in the history
* Revert changes to lib/load.php

* Fix lint errors in More

* Fix lint error for PlainText

* Fix lint error in RichText
  • Loading branch information
Tug authored Dec 19, 2018
1 parent 6557564 commit f061815
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
5 changes: 4 additions & 1 deletion lib/load.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@
if ( ! function_exists( 'render_block_core_categories' ) ) {
require dirname( __FILE__ ) . '/../packages/block-library/src/categories/index.php';
}
if ( ! function_exists( 'render_block_core_latest_comments' ) ) {
// Currently merged in core as `gutenberg_render_block_core_latest_comments`,
// expected to change soon.
if ( ! function_exists( 'render_block_core_latest_comments' )
&& ! function_exists( 'gutenberg_render_block_core_latest_comments' ) ) {
require dirname( __FILE__ ) . '/../packages/block-library/src/latest-comments/index.php';
}
if ( ! function_exists( 'render_block_core_latest_posts' ) ) {
Expand Down
8 changes: 4 additions & 4 deletions packages/block-library/src/more/edit.native.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* External dependencies
*/
import { View, Text } from 'react-native';
import { View } from 'react-native';

/**
* WordPress dependencies
Expand Down Expand Up @@ -48,7 +48,7 @@ export default class MoreEdit extends Component {
}

renderLine() {
return <View style={ styles[ 'block-library-more__line' ] } />
return <View style={ styles[ 'block-library-more__line' ] } />;
}

renderText() {
Expand All @@ -71,12 +71,12 @@ export default class MoreEdit extends Component {
onBlur={ onBlur }
/>
</View>
)
);
}

render() {
return (
<View style={ styles[ 'block-library-more__container' ]}>
<View style={ styles[ 'block-library-more__container' ] }>
{ this.renderLine() }
{ this.renderText() }
{ this.renderLine() }
Expand Down
5 changes: 4 additions & 1 deletion packages/editor/src/components/plain-text/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ import { Component } from '@wordpress/element';
import styles from './style.scss';

export default class PlainText extends Component {
isIOS: boolean = Platform.OS === 'ios';
constructor() {
super( ...arguments );
this.isIOS = Platform.OS === 'ios';
}

componentDidMount() {
// if isSelected is true, we should request the focus on this TextInput
Expand Down
3 changes: 1 addition & 2 deletions packages/editor/src/components/rich-text/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,9 @@ export function getFormatValue( formatName ) {
}

export class RichText extends Component {
isIOS: boolean = Platform.OS === 'ios';

constructor() {
super( ...arguments );
this.isIOS = Platform.OS === 'ios';
this.onChange = this.onChange.bind( this );
this.onEnter = this.onEnter.bind( this );
this.onBackspace = this.onBackspace.bind( this );
Expand Down

0 comments on commit f061815

Please sign in to comment.