Linter error fixes
This commit is contained in:
@@ -6,7 +6,7 @@ export default class AuthorizeBtn extends React.Component {
|
||||
}
|
||||
|
||||
onClick =() => {
|
||||
let { authActions, authSelectors, errActions} = this.props
|
||||
let { authActions, authSelectors } = this.props
|
||||
let definitions = authSelectors.definitionsToAuthorize()
|
||||
|
||||
authActions.showDefinitions(definitions)
|
||||
|
||||
@@ -42,14 +42,12 @@ export default class Auths extends React.Component {
|
||||
}
|
||||
|
||||
render() {
|
||||
let { definitions, getComponent, authSelectors, errSelectors, specSelectors } = this.props
|
||||
let { definitions, getComponent, authSelectors, errSelectors } = this.props
|
||||
const ApiKeyAuth = getComponent("apiKeyAuth")
|
||||
const BasicAuth = getComponent("basicAuth")
|
||||
const Oauth2 = getComponent("oauth2", true)
|
||||
const Button = getComponent("Button")
|
||||
const JumpToPath = getComponent("JumpToPath", true)
|
||||
|
||||
let specStr = specSelectors.specStr()
|
||||
let authorized = authSelectors.authorized()
|
||||
|
||||
let authorizedAuth = definitions.filter( (definition, key) => {
|
||||
|
||||
@@ -16,7 +16,8 @@ export default class Oauth2 extends React.Component {
|
||||
authSelectors: PropTypes.object.isRequired,
|
||||
authActions: PropTypes.object.isRequired,
|
||||
errSelectors: PropTypes.object.isRequired,
|
||||
errActions: PropTypes.object.isRequired
|
||||
errActions: PropTypes.object.isRequired,
|
||||
getConfigs: PropTypes.function
|
||||
}
|
||||
|
||||
constructor(props, context) {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import React, { PropTypes } from "react"
|
||||
import Im, { List } from "immutable"
|
||||
import { List } from "immutable"
|
||||
import Collapse from "react-collapse"
|
||||
import sortBy from "lodash/sortBy"
|
||||
|
||||
export default class Errors extends React.Component {
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import React, { Component, PropTypes } from "react"
|
||||
import { fromJS } from "immutable"
|
||||
|
||||
export default class Execute extends Component {
|
||||
|
||||
@@ -29,9 +28,6 @@ export default class Execute extends Component {
|
||||
onChangeProducesWrapper = ( val ) => this.props.specActions.changeProducesValue([this.props.path, this.props.method], val)
|
||||
|
||||
render(){
|
||||
let { getComponent, operation, specActions, path, method } = this.props
|
||||
const ContentType = getComponent( "contentType" )
|
||||
|
||||
return (
|
||||
<button className="btn execute opblock-control__btn" onClick={ this.onClick }>
|
||||
Execute
|
||||
|
||||
@@ -2,8 +2,6 @@ import React, { PropTypes } from "react"
|
||||
import OriCollapse from "react-collapse"
|
||||
import _Markdown from "react-remarkable"
|
||||
|
||||
const noop = () => {}
|
||||
|
||||
function xclass(...args) {
|
||||
return args.filter(a => !!a).join(" ").trim()
|
||||
}
|
||||
@@ -44,12 +42,14 @@ export class Col extends React.Component {
|
||||
const {
|
||||
hide,
|
||||
keepContents,
|
||||
|
||||
mobile, /* we don't want these in the final component, since React now complains. So we extract them */
|
||||
/* we don't want these in the `rest` object that passes to the final component,
|
||||
since React now complains. So we extract them */
|
||||
/* eslint-disable no-unused-vars */
|
||||
mobile,
|
||||
tablet,
|
||||
desktop,
|
||||
large,
|
||||
|
||||
/* eslint-enable no-unused-vars */
|
||||
...rest
|
||||
} = this.props
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import React, { Component, PropTypes } from "react"
|
||||
import ImPropTypes from "react-immutable-proptypes"
|
||||
import isObject from "lodash/isObject"
|
||||
import { List } from "immutable"
|
||||
const braceOpen = "{"
|
||||
const braceClose = "}"
|
||||
@@ -128,7 +127,6 @@ class Primitive extends Component {
|
||||
let format = schema.get("format")
|
||||
let xml = schema.get("xml")
|
||||
let enumArray = schema.get("enum")
|
||||
let description = schema.get("description")
|
||||
let properties = schema.filter( ( v, key) => ["enum", "type", "format", "$$ref"].indexOf(key) === -1 )
|
||||
let style = required ? { fontWeight: "bold" } : {}
|
||||
let propStyle = { color: "#999", fontStyle: "italic" }
|
||||
@@ -251,9 +249,6 @@ export default class ModelComponent extends Component {
|
||||
}
|
||||
|
||||
render(){
|
||||
let { name, schema } = this.props
|
||||
let title = schema.get("title") || name
|
||||
|
||||
return <div className="model-box">
|
||||
<Model { ...this.props } depth={ 1 } expandDepth={ this.props.expandDepth || 0 }/>
|
||||
</div>
|
||||
|
||||
@@ -4,7 +4,9 @@ import React, { Component, PropTypes } from "react"
|
||||
export default class Models extends Component {
|
||||
static propTypes = {
|
||||
getComponent: PropTypes.func,
|
||||
specSelectors: PropTypes.object
|
||||
specSelectors: PropTypes.object,
|
||||
layoutSelectors: PropTypes.object,
|
||||
layoutActions: PropTypes.object
|
||||
}
|
||||
|
||||
render(){
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
import React from "react"
|
||||
import React, { PropTypes } from "react"
|
||||
|
||||
export default class OnlineValidatorBadge extends React.Component {
|
||||
static propTypes = {
|
||||
getComponent: PropTypes.func.isRequired,
|
||||
getConfigs: PropTypes.func.isRequired,
|
||||
specSelectors: PropTypes.object.isRequired
|
||||
}
|
||||
|
||||
constructor(props, context) {
|
||||
super(props, context)
|
||||
let { specSelectors, getConfigs } = props
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import React, { PropTypes } from "react"
|
||||
import { Map, fromJS } from "immutable"
|
||||
import shallowCompare from "react-addons-shallow-compare"
|
||||
import { getList } from "core/utils"
|
||||
import * as CustomPropTypes from "core/proptypes"
|
||||
@@ -112,9 +111,7 @@ export default class Operation extends React.Component {
|
||||
specActions,
|
||||
specSelectors,
|
||||
authActions,
|
||||
authSelectors,
|
||||
layoutSelectors,
|
||||
layoutActions,
|
||||
authSelectors
|
||||
} = this.props
|
||||
|
||||
let summary = operation.get("summary")
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import React, { PropTypes } from "react"
|
||||
import {presets} from "react-motion"
|
||||
|
||||
export default class Operations extends React.Component {
|
||||
|
||||
@@ -33,7 +32,6 @@ export default class Operations extends React.Component {
|
||||
|
||||
const Operation = getComponent("operation")
|
||||
const Collapse = getComponent("Collapse")
|
||||
const Schemes = getComponent("schemes")
|
||||
|
||||
let showSummary = layoutSelectors.showSummary()
|
||||
|
||||
|
||||
@@ -30,7 +30,6 @@ export default class Overview extends React.Component {
|
||||
{
|
||||
taggedOps.map( (tagObj, tag) => {
|
||||
let operations = tagObj.get("operations")
|
||||
let tagDetails = tagObj.get("tagDetails")
|
||||
|
||||
let showTagId = ["overview-tags", tag]
|
||||
let showTag = layoutSelectors.isShown(showTagId, true)
|
||||
@@ -45,7 +44,7 @@ export default class Overview extends React.Component {
|
||||
<Collapse isOpened={showTag} animated>
|
||||
{
|
||||
operations.map( op => {
|
||||
let { path, method, operation, id } = op.toObject() // toObject is shallow
|
||||
let { path, method, id } = op.toObject() // toObject is shallow
|
||||
let showOpIdPrefix = "operations"
|
||||
let showOpId = id
|
||||
let shown = layoutSelectors.isShown([showOpIdPrefix, showOpId])
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { Component, PropTypes } from "react"
|
||||
import shallowCompare from "react-addons-shallow-compare"
|
||||
import { Set, fromJS, List } from "immutable"
|
||||
import { fromJS, List } from "immutable"
|
||||
import { getSampleSchema } from "core/utils"
|
||||
|
||||
const NOOP = Function.prototype
|
||||
@@ -50,7 +50,7 @@ export default class ParamBody extends Component {
|
||||
}
|
||||
|
||||
updateValues = (props) => {
|
||||
let { specSelectors, pathMethod, param, isExecute, consumesValue="", onChangeConsumes } = props
|
||||
let { specSelectors, pathMethod, param, isExecute, consumesValue="" } = props
|
||||
let parameter = specSelectors ? specSelectors.getParameter(pathMethod, param.get("name")) : {}
|
||||
let isXml = /xml/i.test(consumesValue)
|
||||
let paramValue = isXml ? parameter.get("value_xml") : parameter.get("value")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { Component, PropTypes } from "react"
|
||||
import ImPropTypes from "react-immutable-proptypes"
|
||||
import Im, { fromJS } from "immutable"
|
||||
import Im from "immutable"
|
||||
|
||||
// More readable, just iterate over maps, only
|
||||
const eachMap = (iterable, fn) => iterable.valueSeq().filter(Im.Map.isMap).map(fn)
|
||||
@@ -87,7 +87,7 @@ export default class Parameters extends Component {
|
||||
</thead>
|
||||
<tbody>
|
||||
{
|
||||
eachMap(parameters, (parameter, k) => (
|
||||
eachMap(parameters, (parameter) => (
|
||||
<ParameterRow fn={ fn }
|
||||
getComponent={ getComponent }
|
||||
param={ parameter }
|
||||
|
||||
@@ -17,8 +17,6 @@ export default class Schemes extends React.Component {
|
||||
}
|
||||
|
||||
onChange =( e ) => {
|
||||
let { path, method, specActions } = this.props
|
||||
|
||||
this.setScheme( e.target.value )
|
||||
}
|
||||
|
||||
|
||||
@@ -4,11 +4,13 @@ export default class TryItOutButton extends React.Component {
|
||||
|
||||
static propTypes = {
|
||||
onTryoutClick: PropTypes.func,
|
||||
onCancelClick: PropTypes.func,
|
||||
enabled: PropTypes.bool, // Try it out is enabled, ie: the user has access to the form
|
||||
};
|
||||
|
||||
static defaultProps = {
|
||||
onTryoutClick: Function.prototype,
|
||||
onCancelClick: Function.prototype,
|
||||
enabled: false,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user