style: lint

This commit is contained in:
Sérgio Ramos 2017-09-07 16:29:41 +01:00
parent 9df5afc607
commit 19b1176435
17 changed files with 46 additions and 53 deletions

View File

@ -4,12 +4,7 @@ import styled from 'styled-components';
import remcalc from 'remcalc';
import { EEditor } from './editors';
import {
FormGroup,
Input,
Button,
Card
} from 'joyent-ui-toolkit';
import { FormGroup, Input, Button, Card } from 'joyent-ui-toolkit';
const FilenameContainer = styled.span`
display: flex;

View File

@ -1,4 +1,7 @@
import React from 'react';
import { Row, Col } from 'react-styled-flexboxgrid';
import remcalc from 'remcalc';
import {
FormMeta,
Button,
@ -7,9 +10,6 @@ import {
Small,
FormGroup
} from 'joyent-ui-toolkit';
import { Row, Col } from 'react-styled-flexboxgrid';
import remcalc from 'remcalc';
import { Field } from 'redux-form';
const ButtonsRow = Row.extend`margin: ${remcalc(29)} 0 ${remcalc(60)} 0;`;

View File

@ -20,12 +20,7 @@ import DeploymentGroupConfigQuery from '@graphql/DeploymentGroupConfig.gql';
import { client } from '@state/store';
import { ErrorMessage } from '@components/messaging';
import {
Environment,
Name,
Review,
Manifest
} from '@components/manifest';
import { Environment, Name, Review, Manifest } from '@components/manifest';
const INTERPOLATE_REGEX = /\$([_a-z][_a-z0-9]*)/gi;
@ -405,7 +400,11 @@ class DeploymentGroupEditOrCreate extends Component {
const { dataCenter } = this.props;
return (
<NameForm dataCenter={dataCenter} onSubmit={this.handleNameSubmit} onCancel={this.handleCancel} />
<NameForm
dataCenter={dataCenter}
onSubmit={this.handleNameSubmit}
onCancel={this.handleCancel}
/>
);
}

View File

@ -177,7 +177,8 @@ const processServicesForTopology = services => {
// metricsData should prob be an array rather than an object
const processInstancesMetrics = instances =>
forceArray(instances).reduce((metrics, instance) => {
instance.metrics && instance.metrics.forEach(instanceMetrics => {
instance.metrics &&
instance.metrics.forEach(instanceMetrics => {
metrics[instanceMetrics.name] = forceArray(
metrics[instanceMetrics.name]
).concat([instanceMetrics]);

View File

@ -9,7 +9,6 @@ import { Store, files } from '../../mocks';
import { Files } from '@components/manifest';
it('renders <Files /> without throwing', () => {
const tree = renderer
.create(

View File

@ -40,7 +40,7 @@ it('renders <Manifest /> without throwing', () => {
loading
/>
</Store>
)
);
const tree = renderer.getRenderOutput();
expect(tree).toMatchSnapshot();
});
@ -55,7 +55,7 @@ it('renders <Manifest /> without throwing', () => {
onCancel={() => {}}
/>
</Store>
)
);
const tree = renderer.getRenderOutput();
expect(tree).toMatchSnapshot();
});

View File

@ -9,7 +9,6 @@ import 'jest-styled-components';
import { ServicesTopology } from '@containers/services/topology.js';
import { Router, Store, services } from '../../mocks';
it('renders <ServicesTopology /> without throwing', () => {
const tree = renderer
.create(

View File

@ -8,7 +8,6 @@ const buildArray = require('build-array');
const forceArray = require('force-array');
const lfind = require('lodash.find');
const findIndex = require('lodash.findindex');
const flatten = require('lodash.flatten');
const uniq = require('lodash.uniq');
const yaml = require('js-yaml');
const hasha = require('hasha');

View File

@ -1,2 +1,3 @@
.nyc_output
coverage
dist

View File

@ -1,2 +1,3 @@
.nyc_output
coverage
dist

View File

@ -1,7 +1,7 @@
import { Subscriber } from 'react-broadcast';
import Baseline from '../baseline';
import typography from '../typography';
import is, { isNot } from 'styled-is';
import { isNot } from 'styled-is';
import remcalc from 'remcalc';
import styled from 'styled-components';
import PropTypes from 'prop-types';

View File

@ -2,7 +2,7 @@ import React from 'react';
import { Broadcast, Subscriber } from 'react-broadcast';
import remcalc from 'remcalc';
import PropTypes from 'prop-types';
import is, { isNot } from 'styled-is';
import { isNot } from 'styled-is';
import Baseline from '../baseline';
import Card from './card';

View File

@ -3,7 +3,7 @@ import styled from 'styled-components';
import Baseline from '../baseline';
import typography from '../typography';
import remcalc from 'remcalc';
import is, { isNot } from 'styled-is';
import is from 'styled-is';
import PropTypes from 'prop-types';
import Title from './title';
import React from 'react';

View File

@ -3,7 +3,7 @@ import isString from 'lodash.isstring';
import typography from '../typography';
import Baseline from '../baseline';
import remcalc from 'remcalc';
import is, { isNot } from 'styled-is';
import is from 'styled-is';
import styled from 'styled-components';
import PropTypes from 'prop-types';
import React from 'react';

View File

@ -1,7 +1,6 @@
import { Subscriber } from 'react-broadcast';
import is from 'styled-is';
import Baseline from '../baseline';
import breakpoints from '../breakpoints';
import Label from '../label';
import PropTypes from 'prop-types';
import React from 'react';

View File

@ -92,8 +92,7 @@ class Tooltip extends Component {
left = 'auto',
bottom = 'auto',
right = 'auto',
secondary,
...rest
secondary
} = this.props;
if (typeof top === 'number') {

View File

@ -6,7 +6,7 @@ import Baseline from '../../baseline';
import InstancesIcon from './icon-instances.svg';
import { Point } from '../prop-types';
import { GraphText } from './shapes';
import { HealthyIcon, UnhealthyIcon } from '../../icons';
import { HealthyIcon } from '../../icons';
const StyledInstancesIcon = styled(InstancesIcon)`
fill: ${props => props.theme.white};
@ -61,7 +61,8 @@ const GraphNodeInfo = ({ data, pos }) => {
const healthy = (
<HealthyIcon
healthy={
instancesHealthy && instancesHealthy.total === instancesHealthy.healthy ? (
instancesHealthy &&
instancesHealthy.total === instancesHealthy.healthy ? (
'HEALTHY'
) : (
'UNHEALTHY'