mirror of
https://github.com/elyby/accounts-frontend.git
synced 2024-12-27 23:40:28 +05:30
#305: fix the rest of linting warnings
This commit is contained in:
parent
70dd7dcbfb
commit
506b2db6ce
@ -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 ? (
|
||||
<div>
|
||||
<div className={styles.successBackground}></div>
|
||||
<div className={styles.successBackground} />
|
||||
<div className={styles.greenTitle}>
|
||||
<Message {...messages.authForAppSuccessful} values={{
|
||||
appName: (<span className={styles.appName}>{appName}</span>)
|
||||
@ -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 {
|
||||
</div>
|
||||
) : (
|
||||
<div>
|
||||
<div className={styles.failBackground}></div>
|
||||
<div className={styles.failBackground} />
|
||||
<div className={styles.redTitle}>
|
||||
<Message {...messages.authForAppFailed} values={{
|
||||
appName: (<span className={styles.appName}>{appName}</span>)
|
||||
@ -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
|
||||
}
|
||||
|
@ -1,3 +1,4 @@
|
||||
import React from 'react';
|
||||
import { Input } from 'components/ui/form';
|
||||
import BaseAuthBody from 'components/auth/BaseAuthBody';
|
||||
|
||||
|
@ -15,11 +15,11 @@ import messages from './contactForm.intl.json';
|
||||
|
||||
const CONTACT_CATEGORIES = [
|
||||
// TODO: сюда позже проставить реальные id категорий с backend
|
||||
<Message {...messages.cannotAccessMyAccount} />,
|
||||
<Message {...messages.foundBugOnSite} />,
|
||||
<Message {...messages.improvementsSuggestion} />,
|
||||
<Message {...messages.integrationQuestion} />,
|
||||
<Message {...messages.other} />
|
||||
<Message key="m1" {...messages.cannotAccessMyAccount} />,
|
||||
<Message key="m2" {...messages.foundBugOnSite} />,
|
||||
<Message key="m3" {...messages.improvementsSuggestion} />,
|
||||
<Message key="m4" {...messages.integrationQuestion} />,
|
||||
<Message key="m5" {...messages.other} />
|
||||
];
|
||||
|
||||
export class ContactForm extends Component {
|
||||
|
@ -1,3 +1,4 @@
|
||||
import React from 'react';
|
||||
import expect from 'unexpected';
|
||||
import sinon from 'sinon';
|
||||
import { shallow, mount } from 'enzyme';
|
||||
|
@ -88,7 +88,11 @@ export default class ChangePassword extends Component {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Button color="green" block label={messages.changePasswordButton} type="submit" />
|
||||
<Button color="green"
|
||||
block
|
||||
label={messages.changePasswordButton}
|
||||
type="submit"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</Form>
|
||||
|
@ -1,3 +1,4 @@
|
||||
import React from 'react';
|
||||
import expect from 'unexpected';
|
||||
import sinon from 'sinon';
|
||||
|
||||
|
@ -69,7 +69,11 @@ export default class ChangeUsername extends Component {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Button color="green" block label={messages.changeUsernameButton} type="submit" />
|
||||
<Button color="green"
|
||||
block
|
||||
label={messages.changeUsernameButton}
|
||||
type="submit"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</Form>
|
||||
|
@ -39,7 +39,11 @@ export default class Checkbox extends FormInputComponent {
|
||||
return (
|
||||
<div className={classNames(styles[`${color}CheckboxRow`], styles[`${skin}CheckboxRow`])}>
|
||||
<label className={styles.checkboxContainer}>
|
||||
<input ref={this.setEl} className={styles.checkboxInput} type="checkbox" {...props} />
|
||||
<input ref={this.setEl}
|
||||
className={styles.checkboxInput}
|
||||
type="checkbox"
|
||||
{...props}
|
||||
/>
|
||||
<div className={styles.checkbox} />
|
||||
{label}
|
||||
</label>
|
||||
|
@ -38,6 +38,7 @@ describe('<PopupStack />', () => {
|
||||
popups: [
|
||||
{
|
||||
Popup: (props = {}) => {
|
||||
// eslint-disable-next-line
|
||||
expect(props.onClose, 'to be a', 'function');
|
||||
|
||||
return <DummyPopup {...expectedProps} />;
|
||||
|
Loading…
Reference in New Issue
Block a user