Skip to content

Commit e844e79

Browse files
committed
prettier
1 parent 83d0d2e commit e844e79

File tree

8 files changed

+24
-21
lines changed

8 files changed

+24
-21
lines changed

spec/dummy/client/app/packs/server-bundle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// import statement added by react_on_rails:generate_packs rake task
2-
import "./../generated/server-bundle-generated.js" // eslint-disable-line import/extensions
2+
import './../generated/server-bundle-generated.js'; // eslint-disable-line import/extensions
33
// Shows the mapping from the exported object to the name used by the server rendering.
44
import ReactOnRails from 'react-on-rails';
55
// Example of server rendering with no React

spec/dummy/client/app/startup/ContextFunctionReturnInvalidJSX.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ const ContextFunctionReturnInvalidJSX = (props, railsContext) => (
1414

1515
ContextFunctionReturnInvalidJSX.propTypes = {
1616
helloWorldData: PropTypes.shape({
17-
name: PropTypes.string,
18-
}).isRequired,
19-
}
17+
name: PropTypes.string,
18+
}).isRequired,
19+
};
2020

2121
/* Wrapping in a function would be correct in this case, since two params
2222
are passed to the registered function:

spec/dummy/client/app/startup/HelloWorldHooks.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ function HelloWorldHooks(props) {
1919

2020
HelloWorldHooks.propTypes = {
2121
helloWorldData: PropTypes.shape({
22-
name: PropTypes.string.isRequired,
23-
}).isRequired,
24-
}
22+
name: PropTypes.string.isRequired,
23+
}).isRequired,
24+
};
2525

2626
export default HelloWorldHooks;

spec/dummy/client/app/startup/HelloWorldHooksContext.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import PropTypes from 'prop-types';
55
import css from '../components/HelloWorld.module.scss';
66
import RailsContext from '../components/RailsContext';
77

8-
// You could pass props here or use the closure
8+
// You could pass props here or use the closure
99
const HelloWorldHooksContext = (props, railsContext) => {
1010
const Result = () => {
1111
const [name, setName] = useState(props.helloWorldData.name);
@@ -24,8 +24,8 @@ const HelloWorldHooksContext = (props, railsContext) => {
2424

2525
Result.propTypes = {
2626
helloWorldData: PropTypes.shape({
27-
name: PropTypes.string,
28-
}).isRequired,
27+
name: PropTypes.string,
28+
}).isRequired,
2929
};
3030

3131
return Result;

spec/dummy/client/app/startup/HelloWorldProps.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ function HelloWorldProps(props) {
2727

2828
HelloWorldProps.propTypes = {
2929
helloWorldData: PropTypes.shape({
30-
name: PropTypes.string,
31-
}).isRequired,
30+
name: PropTypes.string,
31+
}).isRequired,
3232
modificationTarget: PropTypes.string.isRequired,
33-
}
33+
};
3434

3535
export default HelloWorldProps;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import HelloWorldReScript from '../components/HelloWorldReScript.res.js'; // eslint-disable-line import/no-unresolved
1+
import HelloWorldReScript from '../components/HelloWorldReScript.res.js'; // eslint-disable-line import/no-unresolved
22

33
export default HelloWorldReScript;

spec/dummy/client/app/startup/RouterApp.server.jsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ import { StaticRouter } from 'react-router-dom';
33

44
import routes from '../routes/routes';
55

6-
export default (props, railsContext) => () => (
7-
<StaticRouter location={railsContext.location} {...props}>
8-
{routes}
9-
</StaticRouter>
10-
);
6+
export default (props, railsContext) => () =>
7+
(
8+
<StaticRouter location={railsContext.location} {...props}>
9+
{routes}
10+
</StaticRouter>
11+
);

spec/dummy/config/webpack/serverWebpackConfig.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ const configureServer = () => {
2828
// replace file-loader with null-loader
2929
serverWebpackConfig.module.rules.forEach((loader) => {
3030
if (loader.use && loader.use.filter) {
31-
loader.use = loader.use.filter( // eslint-disable-line no-param-reassign
31+
// eslint-disable-next-line no-param-reassign
32+
loader.use = loader.use.filter(
3233
(item) => !(typeof item === 'string' && item.match(/mini-css-extract-plugin/)),
3334
);
3435
}
@@ -69,7 +70,8 @@ const configureServer = () => {
6970
rules.forEach((rule) => {
7071
if (Array.isArray(rule.use)) {
7172
// remove the mini-css-extract-plugin and style-loader
72-
rule.use = rule.use.filter((item) => { // eslint-disable-line no-param-reassign
73+
// eslint-disable-next-line no-param-reassign
74+
rule.use = rule.use.filter((item) => {
7375
let testValue;
7476
if (typeof item === 'string') {
7577
testValue = item;

0 commit comments

Comments
 (0)