Skip to content

Commit e1fcbfb

Browse files
committed
Linter error fixes
1 parent 518551a commit e1fcbfb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+80
-130
lines changed

src/core/components/auth/authorize-btn.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default class AuthorizeBtn extends React.Component {
66
}
77

88
onClick =() => {
9-
let { authActions, authSelectors, errActions} = this.props
9+
let { authActions, authSelectors } = this.props
1010
let definitions = authSelectors.definitionsToAuthorize()
1111

1212
authActions.showDefinitions(definitions)

src/core/components/auth/auths.jsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,12 @@ export default class Auths extends React.Component {
4242
}
4343

4444
render() {
45-
let { definitions, getComponent, authSelectors, errSelectors, specSelectors } = this.props
45+
let { definitions, getComponent, authSelectors, errSelectors } = this.props
4646
const ApiKeyAuth = getComponent("apiKeyAuth")
4747
const BasicAuth = getComponent("basicAuth")
4848
const Oauth2 = getComponent("oauth2", true)
4949
const Button = getComponent("Button")
50-
const JumpToPath = getComponent("JumpToPath", true)
5150

52-
let specStr = specSelectors.specStr()
5351
let authorized = authSelectors.authorized()
5452

5553
let authorizedAuth = definitions.filter( (definition, key) => {

src/core/components/auth/oauth2.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ export default class Oauth2 extends React.Component {
1616
authSelectors: PropTypes.object.isRequired,
1717
authActions: PropTypes.object.isRequired,
1818
errSelectors: PropTypes.object.isRequired,
19-
errActions: PropTypes.object.isRequired
19+
errActions: PropTypes.object.isRequired,
20+
getConfigs: PropTypes.function
2021
}
2122

2223
constructor(props, context) {

src/core/components/errors.jsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import React, { PropTypes } from "react"
2-
import Im, { List } from "immutable"
2+
import { List } from "immutable"
33
import Collapse from "react-collapse"
4-
import sortBy from "lodash/sortBy"
54

65
export default class Errors extends React.Component {
76

src/core/components/execute.jsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import React, { Component, PropTypes } from "react"
2-
import { fromJS } from "immutable"
32

43
export default class Execute extends Component {
54

@@ -29,9 +28,6 @@ export default class Execute extends Component {
2928
onChangeProducesWrapper = ( val ) => this.props.specActions.changeProducesValue([this.props.path, this.props.method], val)
3029

3130
render(){
32-
let { getComponent, operation, specActions, path, method } = this.props
33-
const ContentType = getComponent( "contentType" )
34-
3531
return (
3632
<button className="btn execute opblock-control__btn" onClick={ this.onClick }>
3733
Execute

src/core/components/layout-utils.jsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ import React, { PropTypes } from "react"
22
import OriCollapse from "react-collapse"
33
import _Markdown from "react-remarkable"
44

5-
const noop = () => {}
6-
75
function xclass(...args) {
86
return args.filter(a => !!a).join(" ").trim()
97
}
@@ -44,12 +42,14 @@ export class Col extends React.Component {
4442
const {
4543
hide,
4644
keepContents,
47-
48-
mobile, /* we don't want these in the final component, since React now complains. So we extract them */
45+
/* we don't want these in the `rest` object that passes to the final component,
46+
since React now complains. So we extract them */
47+
/* eslint-disable no-unused-vars */
48+
mobile,
4949
tablet,
5050
desktop,
5151
large,
52-
52+
/* eslint-enable no-unused-vars */
5353
...rest
5454
} = this.props
5555

src/core/components/model.jsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import React, { Component, PropTypes } from "react"
22
import ImPropTypes from "react-immutable-proptypes"
3-
import isObject from "lodash/isObject"
43
import { List } from "immutable"
54
const braceOpen = "{"
65
const braceClose = "}"
@@ -128,7 +127,6 @@ class Primitive extends Component {
128127
let format = schema.get("format")
129128
let xml = schema.get("xml")
130129
let enumArray = schema.get("enum")
131-
let description = schema.get("description")
132130
let properties = schema.filter( ( v, key) => ["enum", "type", "format", "$$ref"].indexOf(key) === -1 )
133131
let style = required ? { fontWeight: "bold" } : {}
134132
let propStyle = { color: "#999", fontStyle: "italic" }
@@ -251,9 +249,6 @@ export default class ModelComponent extends Component {
251249
}
252250

253251
render(){
254-
let { name, schema } = this.props
255-
let title = schema.get("title") || name
256-
257252
return <div className="model-box">
258253
<Model { ...this.props } depth={ 1 } expandDepth={ this.props.expandDepth || 0 }/>
259254
</div>

src/core/components/models.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ import React, { Component, PropTypes } from "react"
44
export default class Models extends Component {
55
static propTypes = {
66
getComponent: PropTypes.func,
7-
specSelectors: PropTypes.object
7+
specSelectors: PropTypes.object,
8+
layoutSelectors: PropTypes.object,
9+
layoutActions: PropTypes.object
810
}
911

1012
render(){

src/core/components/online-validator-badge.jsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1-
import React from "react"
1+
import React, { PropTypes } from "react"
22

33
export default class OnlineValidatorBadge extends React.Component {
4+
static propTypes = {
5+
getComponent: PropTypes.func.isRequired,
6+
getConfigs: PropTypes.func.isRequired,
7+
specSelectors: PropTypes.object.isRequired
8+
}
9+
410
constructor(props, context) {
511
super(props, context)
612
let { specSelectors, getConfigs } = props

src/core/components/operation.jsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import React, { PropTypes } from "react"
2-
import { Map, fromJS } from "immutable"
32
import shallowCompare from "react-addons-shallow-compare"
43
import { getList } from "core/utils"
54
import * as CustomPropTypes from "core/proptypes"
@@ -112,9 +111,7 @@ export default class Operation extends React.Component {
112111
specActions,
113112
specSelectors,
114113
authActions,
115-
authSelectors,
116-
layoutSelectors,
117-
layoutActions,
114+
authSelectors
118115
} = this.props
119116

120117
let summary = operation.get("summary")

0 commit comments

Comments
 (0)