Skip to content

Commit 940e26d

Browse files
committed
update dependencies & lint
1 parent 635a30a commit 940e26d

16 files changed

Lines changed: 112 additions & 131 deletions

File tree

api/hooks/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
export restrictToOwner from './restrictToOwner';
21
export validateHook from './validateHook';

api/hooks/restrictToOwner.js

Lines changed: 0 additions & 72 deletions
This file was deleted.

api/services/users/hooks.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import { discard, iff, isProvider } from 'feathers-hooks-common';
22
import auth from 'feathers-authentication';
33
import local from 'feathers-authentication-local';
4+
import { restrictToOwner } from 'feathers-authentication-hooks';
45
import errors from 'feathers-errors';
5-
import { validateHook, restrictToOwner } from 'hooks';
6+
import { validateHook } from 'hooks';
67
import { required, email, match, unique } from 'utils/validation';
78

89
const schemaValidator = {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@
173173
"concurrently": "^3.3.0",
174174
"css-loader": "^0.28.0",
175175
"eslint": "^3.15.0",
176-
"eslint-config-airbnb": "^14.1.0",
176+
"eslint-config-airbnb": "^15.0.0",
177177
"eslint-loader": "^1.6.1",
178178
"eslint-plugin-import": "^2.2.0",
179179
"eslint-plugin-jsx-a11y": "^5.0.1",

src/client.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,14 @@ Promise.all([window.__data ? true : isOnline(), getStoredState(offlinePersistCon
5353
const store = createStore(browserHistory, { client, app, restApp }, data, offlinePersistConfig);
5454
const history = syncHistoryWithStore(browserHistory, store);
5555

56-
const renderRouter = props => <ReduxAsyncConnect
57-
{...props}
58-
helpers={{ client, app, restApp }}
59-
filter={item => !item.deferred}
60-
render={applyRouterMiddleware(useScroll())}
61-
/>;
56+
const renderRouter = props => (
57+
<ReduxAsyncConnect
58+
{...props}
59+
helpers={{ client, app, restApp }}
60+
filter={item => !item.deferred}
61+
render={applyRouterMiddleware(useScroll())}
62+
/>
63+
);
6264

6365
const render = routes => {
6466
match({ history, routes }, (error, redirectLocation, renderProps) => {

src/components/GithubButton/GithubButton.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export default class GithubButton extends Component {
2020

2121
return (
2222
<iframe
23+
title={`github-button-${user}-${repo}-${type}`}
2324
src={src}
2425
frameBorder="0"
2526
allowTransparency="true"

src/components/LoginForm/LoginForm.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,16 @@ export default class LoginForm extends Component {
1111
...propTypes
1212
}
1313

14-
renderInput = ({ input, label, type, meta: { touched, error } }) =>
14+
renderInput = ({ input, label, type, meta: { touched, error } }) => (
1515
<div className={`form-group ${error && touched ? 'has-error' : ''}`}>
1616
<label htmlFor={input.name} className="col-sm-2">{label}</label>
1717
<div className="col-sm-10">
1818
<input {...input} type={type} className="form-control" />
1919
{error && touched && <span className="glyphicon glyphicon-remove form-control-feedback"></span>}
2020
{error && touched && <div className="text-danger"><strong>{error}</strong></div>}
2121
</div>
22-
</div>;
22+
</div>
23+
);
2324

2425
render() {
2526
const { handleSubmit, error } = this.props;

src/components/RegisterForm/RegisterForm.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,16 @@ export default class RegisterForm extends Component {
1111
...propTypes
1212
}
1313

14-
renderInput = ({ input, label, type, meta: { touched, error } }) =>
14+
renderInput = ({ input, label, type, meta: { touched, error } }) => (
1515
<div className={`form-group ${error && touched ? 'has-error' : ''}`}>
1616
<label htmlFor={input.name} className="col-sm-2">{label}</label>
1717
<div className="col-sm-10">
1818
<input {...input} type={type} className="form-control" />
1919
{error && touched && <span className="glyphicon glyphicon-remove form-control-feedback"></span>}
2020
{error && touched && <div className="text-danger"><strong>{error}</strong></div>}
2121
</div>
22-
</div>;
22+
</div>
23+
);
2324

2425
render() {
2526
const { handleSubmit, error } = this.props;
@@ -29,8 +30,10 @@ export default class RegisterForm extends Component {
2930
<Field name="email" type="text" component={this.renderInput} label="Email" />
3031
<Field name="password" type="password" component={this.renderInput} label="Password" />
3132
<Field
32-
name="password_confirmation" type="password"
33-
component={this.renderInput} label="Password confirmation"
33+
name="password_confirmation"
34+
type="password"
35+
component={this.renderInput}
36+
label="Password confirmation"
3437
/>
3538
{error && <p className="text-danger"><strong>{error}</strong></p>}
3639
<button className="btn btn-success" type="submit">

src/components/SurveyForm/SurveyForm.js

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class SurveyForm extends Component {
4444
renderInput = ({
4545
input, label, type, showAsyncValidating, className, styles,
4646
meta: { touched, error, dirty, active, visited, asyncValidating }
47-
}) =>
47+
}) => (
4848
<div className={`form-group ${error && touched ? 'has-error' : ''}`}>
4949
<label htmlFor={input.name} className="col-sm-2">{label}</label>
5050
<div className={`col-sm-8 ${styles.inputGroup}`}>
@@ -58,7 +58,8 @@ class SurveyForm extends Component {
5858
{touched && <span className={styles.touched} title="Touched">T</span>}
5959
</div>
6060
</div>
61-
</div>;
61+
</div>
62+
);
6263

6364
render() {
6465
const {
@@ -77,23 +78,39 @@ class SurveyForm extends Component {
7778
<div>
7879
<form className="form-horizontal" onSubmit={handleSubmit}>
7980
<Field
80-
name="name" type="text" component={this.renderInput} label="Full Name"
81-
className="form-control" styles={styles}
81+
name="name"
82+
type="text"
83+
component={this.renderInput}
84+
label="Full Name"
85+
className="form-control"
86+
styles={styles}
8287
/>
8388

8489
<Field
85-
name="email" type="text" component={this.renderInput} label="Email"
86-
className="form-control" styles={styles} asyncValidating={asyncValidating}
90+
name="email"
91+
type="text"
92+
component={this.renderInput}
93+
label="Email"
94+
className="form-control"
95+
styles={styles}
96+
asyncValidating={asyncValidating}
8797
/>
8898

8999
<Field
90-
name="occupation" type="text" component={this.renderInput} label="Occupation"
91-
className="form-control" styles={styles}
100+
name="occupation"
101+
type="text"
102+
component={this.renderInput}
103+
label="Occupation"
104+
className="form-control"
105+
styles={styles}
92106
/>
93107

94108
<Field
95-
name="currentlyEmployed" type="checkbox" component={this.renderInput}
96-
label="Currently Employed?" styles={styles}
109+
name="currentlyEmployed"
110+
type="checkbox"
111+
component={this.renderInput}
112+
label="Currently Employed?"
113+
styles={styles}
97114
/>
98115

99116
<div className="form-group">

src/components/WidgetForm/WidgetForm.js

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,21 @@ export default class WidgetForm extends Component {
2929
values: PropTypes.object.isRequired
3030
};
3131

32-
renderInput = ({ input, className, meta: { touched, error } }) => <div>
33-
<input type="text" className={className} {...input} />
34-
{error && touched && <div className="text-danger">{error}</div>}
35-
</div>;
32+
renderInput = ({ input, className, meta: { touched, error } }) => (
33+
<div>
34+
<input type="text" className={className} {...input} />
35+
{error && touched && <div className="text-danger">{error}</div>}
36+
</div>
37+
);
3638

37-
renderSelect = ({ options, input, className, meta: { touched, error } }) => <div>
38-
<select className={className} {...input}>
39-
{options.map(option => <option value={option} key={option}>{option}</option>)}
40-
</select>
41-
{error && touched && <div className="text-danger">{error}</div>}
42-
</div>;
39+
renderSelect = ({ options, input, className, meta: { touched, error } }) => (
40+
<div>
41+
<select className={className} {...input}>
42+
{options.map(option => <option value={option} key={option}>{option}</option>)}
43+
</select>
44+
{error && touched && <div className="text-danger">{error}</div>}
45+
</div>
46+
);
4347

4448
render() {
4549
const {
@@ -72,13 +76,13 @@ export default class WidgetForm extends Component {
7276
<button
7377
className="btn btn-success"
7478
onClick={handleSubmit(() => save(values)
75-
.catch(err => {
76-
if (typeof err === 'object') {
77-
throw new SubmissionError(err);
78-
}
79-
return Promise.reject(err);
80-
})
81-
)}
79+
.catch(err => {
80+
if (typeof err === 'object') {
81+
throw new SubmissionError(err);
82+
}
83+
return Promise.reject(err);
84+
})
85+
)}
8286
disabled={pristine || invalid || submitting}>
8387
<i className={`fa ${submitting ? 'fa-cog fa-spin' : 'fa-cloud'}`} /> Save
8488
</button>

0 commit comments

Comments
 (0)