diff --git a/src/components/auth/finish/Finish.js b/src/components/auth/finish/Finish.js
index ab79273..11d920e 100644
--- a/src/components/auth/finish/Finish.js
+++ b/src/components/auth/finish/Finish.js
@@ -16,6 +16,7 @@ class Finish extends Component {
static propTypes = {
appName: PropTypes.string.isRequired,
code: PropTypes.string.isRequired,
+ state: PropTypes.string.isRequired,
displayCode: PropTypes.bool,
success: PropTypes.bool
};
@@ -28,8 +29,8 @@ class Finish extends Component {
const {appName, code, state, displayCode, success} = this.props;
const {isCopySupported} = this.state;
const authData = JSON.stringify({
- auth_code: code,
- state: state
+ auth_code: code, // eslint-disable-line
+ state
});
history.pushState(null, null, `#${authData}`);
@@ -40,7 +41,7 @@ class Finish extends Component {
{success ? (
-
+
{appName})
@@ -59,7 +60,7 @@ class Finish extends Component {
color="green"
small
label={messages.copy}
- onClick={this.handleCopyClick}
+ onClick={this.onCopyClick}
/>
) : (
''
@@ -73,7 +74,7 @@ class Finish extends Component {
) : (
-
+
{appName})
@@ -88,7 +89,7 @@ class Finish extends Component {
);
}
- handleCopyClick = (event) => {
+ onCopyClick = (event) => {
event.preventDefault();
// http://stackoverflow.com/a/987376/5184751
@@ -104,7 +105,7 @@ class Finish extends Component {
// TODO: было бы ещё неплохо сделать какую-то анимацию, вроде "Скопировано",
// ибо сейчас после клика как-то неубедительно, скопировалось оно или нет
- console.log('Copying text command was ' + (successful ? 'successful' : 'unsuccessful'));
+ console.log('Copying text command was %s', successful ? 'successful' : 'unsuccessful');
} catch (err) {
// not critical
}
diff --git a/src/components/auth/login/LoginBody.js b/src/components/auth/login/LoginBody.js
index c6b1171..2a679d8 100644
--- a/src/components/auth/login/LoginBody.js
+++ b/src/components/auth/login/LoginBody.js
@@ -1,3 +1,4 @@
+import React from 'react';
import { Input } from 'components/ui/form';
import BaseAuthBody from 'components/auth/BaseAuthBody';
diff --git a/src/components/contact/ContactForm.js b/src/components/contact/ContactForm.js
index cb49e43..4135f57 100644
--- a/src/components/contact/ContactForm.js
+++ b/src/components/contact/ContactForm.js
@@ -15,11 +15,11 @@ import messages from './contactForm.intl.json';
const CONTACT_CATEGORIES = [
// TODO: сюда позже проставить реальные id категорий с backend
- ,
- ,
- ,
- ,
-
+ ,
+ ,
+ ,
+ ,
+
];
export class ContactForm extends Component {
diff --git a/src/components/contact/ContactForm.test.js b/src/components/contact/ContactForm.test.js
index 92874f2..9178e58 100644
--- a/src/components/contact/ContactForm.test.js
+++ b/src/components/contact/ContactForm.test.js
@@ -1,3 +1,4 @@
+import React from 'react';
import expect from 'unexpected';
import sinon from 'sinon';
import { shallow, mount } from 'enzyme';
diff --git a/src/components/profile/changePassword/ChangePassword.js b/src/components/profile/changePassword/ChangePassword.js
index 7192355..22f7a97 100644
--- a/src/components/profile/changePassword/ChangePassword.js
+++ b/src/components/profile/changePassword/ChangePassword.js
@@ -88,7 +88,11 @@ export default class ChangePassword extends Component {
-
+
diff --git a/src/components/profile/changePassword/ChangePassword.test.js b/src/components/profile/changePassword/ChangePassword.test.js
index 2c68985..bca4198 100644
--- a/src/components/profile/changePassword/ChangePassword.test.js
+++ b/src/components/profile/changePassword/ChangePassword.test.js
@@ -1,3 +1,4 @@
+import React from 'react';
import expect from 'unexpected';
import sinon from 'sinon';
diff --git a/src/components/profile/changeUsername/ChangeUsername.js b/src/components/profile/changeUsername/ChangeUsername.js
index ba2d368..7ce2a56 100644
--- a/src/components/profile/changeUsername/ChangeUsername.js
+++ b/src/components/profile/changeUsername/ChangeUsername.js
@@ -69,7 +69,11 @@ export default class ChangeUsername extends Component {
-
+
diff --git a/src/components/ui/form/Checkbox.js b/src/components/ui/form/Checkbox.js
index 5ebddd7..36ed59b 100644
--- a/src/components/ui/form/Checkbox.js
+++ b/src/components/ui/form/Checkbox.js
@@ -39,7 +39,11 @@ export default class Checkbox extends FormInputComponent {
return (