Autofix ESLint problems

This commit is contained in:
Kyle Shockey
2017-03-22 20:40:05 -07:00
parent 664e44d3d9
commit f195d01184
11 changed files with 35 additions and 35 deletions

View File

@@ -1,6 +1,6 @@
import React, { PropTypes } from "react"
import ImPropTypes from "react-immutable-proptypes"
import { fromJS } from 'immutable'
import { fromJS } from "immutable"
const noop = ()=>{}

View File

@@ -10,7 +10,7 @@ export default class Models extends Component {
render(){
let { specSelectors, getComponent, layoutSelectors, layoutActions } = this.props
let definitions = specSelectors.definitions()
let showModels = layoutSelectors.isShown('models', true)
let showModels = layoutSelectors.isShown("models", true)
const Model = getComponent("model")
const Collapse = getComponent("Collapse")
@@ -18,7 +18,7 @@ export default class Models extends Component {
if (!definitions.size) return null
return <section className={ showModels ? "models is-open" : "models"}>
<h4 onClick={() => layoutActions.show('models', !showModels)}>
<h4 onClick={() => layoutActions.show("models", !showModels)}>
<span>Models</span>
<svg width="20" height="20">
<use xlinkHref="#large-arrow" />

View File

@@ -31,7 +31,7 @@ export default class OnlineValidatorBadge extends React.Component {
return null
}
return (<span style={{ float: "right"}}>
return (<span style={{ float: "right"}}>
<a target="_blank" href={`${ this.state.validatorUrl }/debug?url=${ this.state.url }`}>
<img alt="Online validator badge" src={`${ this.state.validatorUrl }?url=${ this.state.url }`} />
</a>

View File

@@ -1,5 +1,5 @@
import React, { PropTypes } from "react"
import { fromJS } from 'immutable'
import { fromJS } from "immutable"
import { getSampleSchema } from "core/utils"
const getExampleComponent = ( sampleResponse, examples, HighlightCode ) => {

View File

@@ -79,7 +79,7 @@ module.exports = function SwaggerUI(opts) {
if(!queryConfig.url && typeof mergedConfig.spec === "object" && Object.keys(mergedConfig.spec).length) {
system.specActions.updateUrl("")
system.specActions.updateLoadingStatus("success");
system.specActions.updateLoadingStatus("success")
system.specActions.updateSpec(JSON.stringify(mergedConfig.spec))
} else if(system.specActions.download && mergedConfig.url) {
system.specActions.updateUrl(mergedConfig.url)

View File

@@ -57,14 +57,14 @@ export default class SplitPaneMode extends React.Component {
const mode = layoutSelectors.whatMode(MODE_KEY)
const left = mode === MODE_RIGHT ? <noscript/> : children[0]
const right = mode === MODE_LEFT ? <noscript/> : children[1]
const size = this.sizeFromMode(mode, '50%')
const size = this.sizeFromMode(mode, "50%")
return (
<SplitPane
disabledClass={''}
ref={'splitPane'}
disabledClass={""}
ref={"splitPane"}
split='vertical'
defaultSize={'50%'}
defaultSize={"50%"}
primary="second"
minSize={0}
size={size}

View File

@@ -539,7 +539,7 @@ export const getSampleSchema = (schema, contentType="", config={}) => {
let match = schema.$$ref.match(/\S*\/(\S+)$/)
schema.xml.name = match[1]
} else if (schema.type || schema.items || schema.properties || schema.additionalProperties) {
return '<?xml version="1.0" encoding="UTF-8"?>\n<!-- XML example cannot be generated -->'
return "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!-- XML example cannot be generated -->"
} else {
return null
}
@@ -555,13 +555,13 @@ export const parseSeach = () => {
let search = window.location.search
if ( search != "" ) {
let params = search.substr(1).split("&");
let params = search.substr(1).split("&")
for (let i in params) {
i = params[i].split("=");
map[decodeURIComponent(i[0])] = decodeURIComponent(i[1]);
i = params[i].split("=")
map[decodeURIComponent(i[0])] = decodeURIComponent(i[1])
}
}
return map;
return map
}

View File

@@ -1,4 +1,4 @@
import Topbar from './topbar.jsx'
import Topbar from "./topbar.jsx"
export default function () {
return {

View File

@@ -1,5 +1,5 @@
import StandaloneLayout from './layout'
import '../style/main.scss'
import StandaloneLayout from "./layout"
import "../style/main.scss"
import TopbarPlugin from "plugins/topbar"

View File

@@ -1,4 +1,4 @@
import React, { PropTypes } from 'react'
import React, { PropTypes } from "react"
export default class StandaloneLayout extends React.Component {