Skip to content

Commit 8647119

Browse files
committed
fix linting errors for CI
1 parent c56f052 commit 8647119

File tree

3 files changed

+22
-15
lines changed

3 files changed

+22
-15
lines changed

client/app/bundles/comments/startup/NavigationBarApp.jsx

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import * as paths from '../constants/paths';
1414
* This is used for the client rendering hook after the page html is rendered.
1515
* React will see that the state is the same and not do anything.
1616
*/
17-
function NavigationBarApp(_props, railsContext) {
17+
function NavigationBarAppFactory(_props, railsContext) {
1818
// This is where we get the existing store.
1919
const { pathname } = railsContext;
2020
let store;
@@ -23,16 +23,20 @@ function NavigationBarApp(_props, railsContext) {
2323
} else if (pathname === paths.NO_ROUTER_PATH) {
2424
store = ReactOnRails.getStore('commentsStore', false);
2525
} else {
26-
return () => <NavigationBar {...{ pathname }} />;
26+
return function NavigationBarApp() {
27+
return <NavigationBar {...{ pathname }} />;
28+
};
2729
}
2830

2931
// eslint interprets the return as a new component definition, which is not the case
3032
// eslint-disable-next-line react/display-name, react/no-unstable-nested-components
31-
return () => (
32-
<Provider store={store}>
33-
<NavigationBarContainer />
34-
</Provider>
35-
);
33+
return function NavigationBarApp() {
34+
return (
35+
<Provider store={store}>
36+
<NavigationBarContainer />
37+
</Provider>
38+
);
39+
};
3640
}
3741

38-
export default NavigationBarApp;
42+
export default NavigationBarAppFactory;

client/app/bundles/comments/startup/ServerRouterApp.jsx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,15 @@ function ServerRouterApp(_props, railsContext) {
2525

2626
// Important that you don't do this if you are redirecting or have an error.
2727
// eslint-disable-next-line react/display-name
28-
return () => (
29-
<Provider store={store}>
30-
<StaticRouter location={location} context={context}>
31-
{routes}
32-
</StaticRouter>
33-
</Provider>
34-
);
28+
return function ServerRouter() {
29+
return (
30+
<Provider store={store}>
31+
<StaticRouter location={location} context={context}>
32+
{routes}
33+
</StaticRouter>
34+
</Provider>
35+
);
36+
};
3537
}
3638

3739
export default ServerRouterApp;

client/app/packs/client-bundle.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import ReactOnRails from 'react-on-rails';
22
import 'bootstrap-loader';
3+
// eslint-disable-next-line import/no-webpack-loader-syntax
34
import 'expose-loader?exposes=$,jQuery!jquery';
45
import 'jquery-ujs';
56

0 commit comments

Comments
 (0)