Fixed linting errors (#832)
* Fixes #831 - fixed linting errors * forgot to remove a few lines
This commit is contained in:
Родитель
3c337c663d
Коммит
45b62a9870
|
@ -1,6 +1,5 @@
|
|||
import React, { Component } from 'react';
|
||||
import ReactTags from 'react-tag-autocomplete';
|
||||
import Service from '../../../js/service';
|
||||
import { DELIMITERS } from './tag-delimiters';
|
||||
|
||||
/**
|
||||
|
@ -66,13 +65,13 @@ export default class AutoCompleteInput extends Component {
|
|||
|
||||
handleAddition(field) {
|
||||
if (field.name) {
|
||||
field.name = field.name.trim()
|
||||
field.name = field.name.trim();
|
||||
}
|
||||
const data = [].concat(this.state.data, this.fixLettercase(field));
|
||||
this.update(data);
|
||||
}
|
||||
|
||||
handleInputChange(input) {
|
||||
handleInputChange() {
|
||||
// does nothing in the superclass
|
||||
}
|
||||
|
||||
|
@ -105,15 +104,15 @@ export default class AutoCompleteInput extends Component {
|
|||
}).filter(suggestion => !!suggestion);
|
||||
}
|
||||
|
||||
handleBlur(e) {
|
||||
handleBlur() {
|
||||
let input = this.reactTags.state.query.trim();
|
||||
if (input) {
|
||||
this.handlePendingInput(input);
|
||||
this.reactTags.setState({ query: '' });
|
||||
this.reactTags.setState({ query: `` });
|
||||
}
|
||||
}
|
||||
|
||||
handlePendingInput(input) {
|
||||
handlePendingInput() {
|
||||
// does nothing in the superclass
|
||||
}
|
||||
|
||||
|
@ -125,7 +124,7 @@ export default class AutoCompleteInput extends Component {
|
|||
* @param input string or term object
|
||||
*/
|
||||
save(input) {
|
||||
if (typeof input === 'string') {
|
||||
if (typeof input === `string`) {
|
||||
input = { name: input };
|
||||
}
|
||||
this.handleAddition(input);
|
||||
|
@ -143,9 +142,9 @@ export default class AutoCompleteInput extends Component {
|
|||
*/
|
||||
render(props={}) {
|
||||
let placeholder = props.placeholder || `Add new tag`;
|
||||
return <div onBlur={e => this.handleBlur(e)} ref={e => this.div=e} tabIndex={0}>
|
||||
return <div onBlur={e => this.handleBlur(e)} ref={e => { this.div = e; }} tabIndex={0}>
|
||||
<ReactTags
|
||||
ref={e => this.reactTags=e}
|
||||
ref={e => { this.reactTags = e; }}
|
||||
tags={this.state.data}
|
||||
suggestions={this.getFilteredSuggestions()}
|
||||
allowNew={true}
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
import React, { Component } from 'react';
|
||||
import ReactTags from 'react-tag-autocomplete';
|
||||
import Service from '../../../js/service';
|
||||
import AutoCompleteInput from './auto-complete-input';
|
||||
|
||||
const PROFILE_PREFIX = '👤 ';
|
||||
const PROFILE_PREFIX = `👤 `;
|
||||
|
||||
export default class Creators extends AutoCompleteInput {
|
||||
/**
|
||||
|
@ -63,7 +61,7 @@ export default class Creators extends AutoCompleteInput {
|
|||
* clicked away as a creator-by-name for this entry.
|
||||
*/
|
||||
handlePendingInput(input) {
|
||||
this.save(input)
|
||||
this.save(input);
|
||||
}
|
||||
|
||||
render() {
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
import React, { Component } from 'react';
|
||||
import ReactTags from 'react-tag-autocomplete';
|
||||
import React from 'react';
|
||||
import { Link } from 'react-router';
|
||||
import IssuesField from '../../../components/form-fields/issues.jsx';
|
||||
import validator from './validator';
|
||||
import Service from '../../../js/service';
|
||||
import Creators from './creators';
|
||||
import Tags from './tags';
|
||||
|
||||
|
@ -16,8 +14,8 @@ const IssuesLabel = function() {
|
|||
|
||||
module.exports = {
|
||||
published_by_creator: {
|
||||
type: 'checkbox',
|
||||
label: 'Yes',
|
||||
type: `checkbox`,
|
||||
label: `Yes`,
|
||||
fieldClassname: `published-by-creator`,
|
||||
guideText: `Are you one of the creators?`
|
||||
},
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import React from 'react';
|
||||
import validator from './validator';
|
||||
import HelpTypesField from '../../../components/form-fields/help-types.jsx';
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import React, { Component } from 'react';
|
||||
import ReactTags from 'react-tag-autocomplete';
|
||||
import Service from '../../../js/service';
|
||||
import AutoCompleteInput from './auto-complete-input';
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче