Skip to content

Commit 426f8b0

Browse files
committed
[auto] style: Update style using prettier (upgrade prettier from 1.19.1 to 2.5.1)
1 parent 87479b9 commit 426f8b0

File tree

256 files changed

+560
-545
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

256 files changed

+560
-545
lines changed

cloudflare-workers/_static-site/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { getAssetFromKV } from "@cloudflare/kv-asset-handler";
22

3-
addEventListener("fetch", event => {
3+
addEventListener("fetch", (event) => {
44
try {
55
event.respondWith(handleEvent(event));
66
} catch (e) {
@@ -15,7 +15,7 @@ async function handleEvent(event) {
1515
} catch (e) {
1616
try {
1717
let notFoundResponse = await getAssetFromKV(event, {
18-
mapRequestToAsset: req =>
18+
mapRequestToAsset: (req) =>
1919
new Request(`${new URL(req.url).origin}/404/index.html`, req)
2020
});
2121
return new Response(notFoundResponse.body, {
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from "react";
22
import Page from "@app/course-landing/components/Page";
33

4-
const Index = props => <Page site={props.site} />;
4+
const Index = (props) => <Page site={props.site} />;
55

66
export default Index;

packages/bootstrap-theme/layouts/Layout.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ import React from "react";
22
// Imported CSS
33
// import "bootstrap-css-only/css/bootstrap.min.css";
44

5-
export default props => {
5+
export default (props) => {
66
return <div>{props.children}</div>;
77
};

packages/bootstrap-theme/next-config/next.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const CopyPlugin = require("copy-webpack-plugin");
22

33
module.exports = {
44
trailingSlash: true,
5-
webpack: function(config) {
5+
webpack: function (config) {
66
config.plugins.push(
77
new CopyPlugin([
88
{

packages/bootstrap-web/components/Footer.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from "react";
22
import Former2 from "@app/common/components/Former2";
33
import site from "@app/sika-kaplan.com/config";
44

5-
const Footer = props => (
5+
const Footer = (props) => (
66
<div>
77
<div className="footer mt-4">
88
<div className="container pt-4 pb-4">

packages/bootstrap-web/components/Header.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from "react";
22

3-
const Header = props => (
3+
const Header = (props) => (
44
<div>
55
<div className="bar-header">
66
<div className="container">

packages/bootstrap-web/components/MainBar.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from "react";
22

3-
const MainBar = props => (
3+
const MainBar = (props) => (
44
<div>
55
<div className="bar-grey">
66
<div className="container pt-4 pb-4">

packages/bootstrap-web/components/Navbar.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from "react";
22
import Link from "next/link";
33

4-
const Navbar = props => (
4+
const Navbar = (props) => (
55
<div>
66
<div className="container-fluid">
77
<div className="container pt-2 pb-2">

packages/bootstrap-web/layouts/Layout.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from "react";
22
import { Layout as ThemeLayout } from "@app/bootstrap-theme/layouts/Layout";
33

4-
let Layout = props => (
4+
let Layout = (props) => (
55
<ThemeLayout>
66
<div className="container">
77
<h1>Simple Bootrstap Web</h1>

packages/cal-api.sika.io/generator.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ const doc = yaml.safeLoad(
66
fs.readFileSync("../data/training/sessions.yml", "utf8")
77
);
88

9-
const loadYAMLDate = dd_mm_yyyy =>
9+
const loadYAMLDate = (dd_mm_yyyy) =>
1010
dd_mm_yyyy
1111
.split(".")
1212
.reverse()
13-
.map(x => (x.length == 1 ? `0${x}` : x))
13+
.map((x) => (x.length == 1 ? `0${x}` : x))
1414
.join("");
1515

16-
const parseDate = dateString => {
16+
const parseDate = (dateString) => {
1717
var year = dateString.substring(0, 4);
1818
var month = dateString.substring(4, 6);
1919
var day = dateString.substring(6, 8);
@@ -24,7 +24,7 @@ const parseDate = dateString => {
2424

2525
function getCal() {
2626
let events = [];
27-
doc.map(event => {
27+
doc.map((event) => {
2828
if (!event.active) return;
2929

3030
let d = parseDate(loadYAMLDate(event.date_from));

packages/ccc.oxs.cz/components/Links.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from "react";
22

3-
export default props => {
3+
export default (props) => {
44
return props.links.map((link, i) => {
55
let name = link[0];
66
let url = link[1];

packages/ccc.oxs.cz/layouts/Layout.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from "react";
22
import Layout from "@app/bootstrap-theme/layouts/Layout";
33

4-
export default props => (
4+
export default (props) => (
55
<Layout>
66
<div className="container">
77
<p>

packages/common/components/AddToGoogleCalendar.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from "react";
22
import styled from "styled-components";
33

4-
const parseDate = dateString => {
4+
const parseDate = (dateString) => {
55
var year = dateString.substring(0, 4);
66
var month = dateString.substring(4, 6);
77
var day = dateString.substring(6, 8);
@@ -22,7 +22,7 @@ function formatDate(date) {
2222
return [year, month, day].join("");
2323
}
2424

25-
const AddToGoogleCalendar = props => {
25+
const AddToGoogleCalendar = (props) => {
2626
let name = props.name;
2727
let from = props.from;
2828

packages/common/components/AustraliaOnFireBar/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import Link from "next/link";
55

66
import bar from "./bar2.jpg";
77

8-
let AustraliaFiresBar = props => {
8+
let AustraliaFiresBar = (props) => {
99
const [hideBar, setHideBar] = useCookie("AustraliaFiresBarhideBar");
1010

1111
let post_link = props.local_link

packages/common/components/CoronaBar/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import Link from "next/link";
66
import bar from "./coronavirus3.jpg";
77
import close from "./close.svg";
88

9-
let KoronaBar = props => {
9+
let KoronaBar = (props) => {
1010
const [hideBar, setHideBar] = useCookie("CoronaBarHide");
1111

1212
let lang = props.lang || "cs";

packages/common/components/Gauges.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from "react";
22

3-
const Gauges = props => (
3+
const Gauges = (props) => (
44
<script
55
type="text/javascript"
66
dangerouslySetInnerHTML={{

packages/common/components/GoogleAnalytics.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from "react";
22

3-
const GoogleAnalytics = props => (
3+
const GoogleAnalytics = (props) => (
44
<script
55
type="text/javascript"
66
dangerouslySetInnerHTML={{

packages/common/components/Markdown.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ function LinkRenderer(props) {
2525
);
2626
}
2727

28-
const ReactComponent = props => <>{props.children}</>;
29-
const TwitterComponent = props => (
28+
const ReactComponent = (props) => <>{props.children}</>;
29+
const TwitterComponent = (props) => (
3030
<TwitterTweetEmbed
3131
tweetId={props.tweet_id}
3232
options={{ conversation: "none" }}
3333
/>
3434
);
3535

36-
const ReactRenderer = props => {
36+
const ReactRenderer = (props) => {
3737
return (
3838
<JsxParser
3939
jsx={props.value}
@@ -45,7 +45,7 @@ const ReactRenderer = props => {
4545
);
4646
};
4747

48-
let Markdown = props => {
48+
let Markdown = (props) => {
4949
return (
5050
<ReactMarkdown
5151
source={props.source}

packages/common/components/Translate.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from "react";
2-
const Translate = props => {
2+
const Translate = (props) => {
33
return <>{props[props.lang] || (props.default && props[props.default])}</>;
44
};
55

packages/common/forms/Field.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from "react";
22
import { Form } from "react-bootstrap";
33

4-
const Field = props => {
4+
const Field = (props) => {
55
let name = props.name;
66
let as = props.as;
77
let label = props.label;

packages/common/google_tag_manager/GoogleTagManager.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from "react";
22

3-
const GoogleTagManager = props => (
3+
const GoogleTagManager = (props) => (
44
<>
55
<script
66
async

packages/common/google_tag_manager/lib.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ export const event = ({ action, category, label, value }) => {
1717
});
1818
};
1919

20-
export const init = gtm_id => {
21-
Router.events.on("routeChangeComplete", url => pageview(gtm_id, url));
20+
export const init = (gtm_id) => {
21+
Router.events.on("routeChangeComplete", (url) => pageview(gtm_id, url));
2222
};

packages/course-landing/components/Alert.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ const style = {
55
border: "3px solid red"
66
};
77

8-
const Alert = props => <div style={style}>{props.children}</div>;
8+
const Alert = (props) => <div style={style}>{props.children}</div>;
99

1010
export default Alert;

packages/course-landing/components/Bar.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from "react";
22

3-
const Bar = props => (
3+
const Bar = (props) => (
44
<div>
55
<div className="container-fluid header-container">
66
<div className="header mt-0">

packages/course-landing/components/ButtonOutline.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Link from "next/link";
22

3-
const ButtonOutline = props => (
3+
const ButtonOutline = (props) => (
44
<>
55
<Link href={props.btnUrl}>
66
<a className="btn btn-large mybutton-outline m-1">{props.children}</a>

packages/course-landing/components/Footer.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ let style = {
66
margin: "0"
77
};
88

9-
const Footer = props => (
9+
const Footer = (props) => (
1010
<div>
1111
<div className="container-fluid bg">
1212
<div className="container">

packages/course-landing/components/Header.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from "react";
22
import Link from "next/link";
33

4-
const Header = props => (
4+
const Header = (props) => (
55
<div>
66
<div className="container-fluid header-container">
77
<div className="header mt-0">

packages/course-landing/components/HeaderLink.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from "react";
22
import Link from "next/link";
33

4-
const HeaderLink = props => (
4+
const HeaderLink = (props) => (
55
<Link href={props.url}>
66
<a className="btn mybutton mb-2 mr-3">{props.children}</a>
77
</Link>

packages/course-landing/components/MyClients.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import ceska_pojistovna from "./MyClients/ceska_pojistovna.jpg";
88

99
import Translate from "@app/common/components/Translate";
1010

11-
const MyClients = props => (
11+
const MyClients = (props) => (
1212
<div>
1313
<div className={props.noBorder ? "p-3 mb-4" : "card p-3 mb-4"}>
1414
<h3>

packages/course-landing/components/Page.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import ondrejsika from "@app/data/pictures/ondrejsika.jpg";
1919
import courses_file from "@app/data/training/courses.yml";
2020
import StaticDB from "@app/common/staticdb";
2121

22-
const Page = props => {
22+
const Page = (props) => {
2323
let site = props.site;
2424
let lang = props.site.lang;
2525
let location = props.site.location;

packages/course-landing/components/References.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from "react";
22

3-
const References = props => (
3+
const References = (props) => (
44
<>
55
<p>{props.reference}</p>
66
<div className="row">

packages/course-landing/components/TextFrame.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from "react";
22

3-
const TextFrame = props => (
3+
const TextFrame = (props) => (
44
<div className="card p-3 mb-4">{props.children}</div>
55
);
66

packages/course-landing/components/TextFrameWithImage.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from "react";
22

3-
const TextFrameWithImage = props => (
3+
const TextFrameWithImage = (props) => (
44
<div className="card p-3 mb-4">
55
<h3>{props.header}</h3>
66
<div className="d-flex row">

packages/course-landing/components/ThreeCol.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from "react";
22

3-
const ThreeCol = props => (
3+
const ThreeCol = (props) => (
44
<div className="container-flex mb-4">
55
<div className="card p-3">
66
<h3>{props.header}</h3>

packages/course-landing/components/TwitterRecommendations.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function get_by_id(id) {
1212
return db.get()[0];
1313
}
1414

15-
let TwitterRecommendations = props => {
15+
let TwitterRecommendations = (props) => {
1616
let rec1 = props.ids[0];
1717
let rec2 = props.ids[1];
1818
let rec3 = props.ids[2];

packages/course-landing/components/TwoCol.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from "react";
22

3-
const TwoCol = props => (
3+
const TwoCol = (props) => (
44
<div className="d-flex flex-row row pt-3">
55
<div className="col-lg-6 col-md-6 col-sm-12 karta1">
66
<div className="pr-5">{props.col1}</div>

packages/course-landing/next-config/next.config.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
module.exports = {
22
trailingSlash: true,
3-
exportPathMap: function() {
3+
exportPathMap: function () {
44
return {
55
"/": { page: "/" }
66
};
7-
},
7+
}
88
};
99

1010
const withTM = require("next-transpile-modules")([
1111
"@app/ondrejsika-theme",
1212
"@app/common",
1313
"@app/course-landing",
14-
"@app/data",
14+
"@app/data"
1515
]);
1616
module.exports = withTM(module.exports);
1717

packages/gitlab-ci.cz/pages/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from "react";
22
import Page from "@app/course-landing/components/Page";
33

4-
const Index = props => <Page site={props.site} />;
4+
const Index = (props) => <Page site={props.site} />;
55

66
export default Index;

packages/knuth-theme/components/Header.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from "react";
22
import Link from "next/link";
33

4-
let Header = props => {
4+
let Header = (props) => {
55
let site_name = props.site_name;
66
let menu_links = props.menu_links;
77
return (

0 commit comments

Comments
 (0)