Skip to content

Commit

Permalink
Fix eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
xotahal committed Oct 5, 2016
1 parent a3af001 commit 9c4daa4
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 17 deletions.
1 change: 1 addition & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"react/jsx-indent": [2, 4],
"react/jsx-indent-props": [2, 4],
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }],
"react/no-unused-prop-types": 0,
},
"globals": {
"after": false,
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@
"color": "^0.11.3",
"lodash.merge": "^4.0.0",
"react-native-material-design-styles": "^0.2.6",
"react-native-vector-icons": "^2.0.3"
"react-native-vector-icons": "^2.0.3",
"react": "15.3.1",
"react-native": "^0.34.0"
},
"devDependencies": {
"babel-core": "^6.14.0",
Expand All @@ -42,7 +44,7 @@
"babel-preset-es2015": "^6.14.0",
"babel-preset-react-native": "^1.9.0",
"eslint": "^3.6.1",
"eslint-config-airbnb": "^11.1.0",
"eslint-config-airbnb": "^12.0.0",
"eslint-plugin-import": "^1.15.0",
"eslint-plugin-jsx-a11y": "^2.2.0",
"eslint-plugin-react": "^6.3.0",
Expand Down
1 change: 0 additions & 1 deletion src/ActionButton/ActionButton.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import Icon from '../Icon';
import IconToggle from '../IconToggle';
import RippleFeedback from '../RippleFeedback';
import getPlatformElevation from '../styles/getPlatformElevation';
import Container from '../Container';

const propTypes = {
/**
Expand Down
2 changes: 1 addition & 1 deletion src/Avatar/Avatar.react.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { Component, PropTypes } from 'react';
import { View, Image, Text, StyleSheet } from 'react-native';
import Container from '../Container';
import Icon from '../Icon';
import React, { Component, PropTypes } from 'react';

const propTypes = {
/**
Expand Down
2 changes: 1 addition & 1 deletion src/Dialog/DialogDefaultActions.react.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { Component, PropTypes } from 'react';
import { View } from 'react-native';
import Button from '../Button';
import React, { Component, PropTypes } from 'react';

const propTypes = {
actions: PropTypes.array.isRequired,
Expand Down
2 changes: 1 addition & 1 deletion src/Drawer/Header.react.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { Component, PropTypes } from 'react';
import { View, Image, StyleSheet } from 'react-native';
import HeaderAccount from './HeaderAccount.react';
import React, { Component, PropTypes } from 'react';

const propTypes = {
image: PropTypes.shape({ type: PropTypes.oneOf([Image]) }),
Expand Down
6 changes: 3 additions & 3 deletions src/IconToggle/IconToggle.react.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { View, Animated, StyleSheet, Platform } from 'react-native';
import React, { Component, PropTypes } from 'react';

import Color from 'color';
import { ELEVATION_ZINDEX } from '../styles/getPlatformElevation';
import Icon from '../Icon';
import Color from 'color';

const propTypes = {
color: PropTypes.string,
Expand Down Expand Up @@ -151,7 +151,7 @@ class IconToggle extends Component {
// normalize
percent = Math.max(percent, 0);
percent = Math.min(percent, 100);
percent = percent / 100;
percent /= 100;

if (!size) {
return null;
Expand All @@ -169,7 +169,7 @@ class IconToggle extends Component {
top: ((1 - percent) * size) / 2,
width: percent * size,
height: percent * size,
borderRadius: percent * size / 2,
borderRadius: (percent * size) / 2,
transform: [{ scale: scaleValue }],
opacity: opacityValue,
backgroundColor: color.hexString(),
Expand Down
5 changes: 3 additions & 2 deletions src/ListItem/ListItem.react.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import React, { Component, PropTypes } from 'react';
import {
StyleSheet,
View,
Text,
TouchableWithoutFeedback,
} from 'react-native';

import Divider from '../Divider';
import Icon from '../Icon';
import IconToggle from '../IconToggle';
import RippleFeedback from '../RippleFeedback';
import React, { Component, PropTypes } from 'react';

const propTypes = {
// generally
Expand Down Expand Up @@ -327,7 +328,7 @@ class ListItem extends Component {

return <Divider />;
}
renderContent = (styles) => (
renderContent = styles => (
<View style={styles.contentViewContainer}>
{this.renderLeftElement(styles)}
{this.renderCenterElement(styles)}
Expand Down
3 changes: 1 addition & 2 deletions src/RadioButton/RadioButton.react.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import Checkbox from '../Checkbox';
import React, { Component, PropTypes } from 'react';

import Checkbox from '../Checkbox';

const propTypes = {
label: PropTypes.string,
Expand Down
6 changes: 3 additions & 3 deletions src/Toolbar/Toolbar.react.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import React, { Component, PropTypes } from 'react';
import {
Animated,
findNodeHandle,
Expand All @@ -11,7 +12,6 @@ import {
import Icon from '../Icon';
import IconToggle from '../IconToggle';
import isFunction from '../utils/isFunction';
import React, { Component, PropTypes } from 'react';

const UIManager = NativeModules.UIManager;

Expand Down Expand Up @@ -210,7 +210,7 @@ class Toolbar extends Component {
const { onRightElementPress } = this.props;

UIManager.showPopupMenu(
findNodeHandle(this.refs.menu),
findNodeHandle(this.menu),
labels,
() => {},
(result, index) => {
Expand Down Expand Up @@ -435,7 +435,7 @@ class Toolbar extends Component {
onPress={() => this.onMenuPressed(rightElement.menu.labels)}
>
<Icon
ref="menu"
ref={(c) => { this.menu = c; }}
name="more-vert"
size={spacing.iconSize}
color={flattenRightElement.color}
Expand Down
2 changes: 1 addition & 1 deletion src/styles/themes/light.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import Color from 'color';
import {
blue500,
red500,
white,
black,
} from '../colors';

import Color from 'color';
import spacing from '../spacing';
import typography from '../typography';

Expand Down

0 comments on commit 9c4daa4

Please sign in to comment.