Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix lint errors in the mobile branch #12990

Merged
merged 4 commits into from
Dec 19, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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