Skip to content

Commit

Permalink
[auto] style: Update style using prettier (upgrade prettier from 1.19…
Browse files Browse the repository at this point in the history
….1 to 2.5.1)
  • Loading branch information
ondrejsika committed Feb 15, 2022
1 parent 87479b9 commit 426f8b0
Show file tree
Hide file tree
Showing 256 changed files with 560 additions and 545 deletions.
4 changes: 2 additions & 2 deletions cloudflare-workers/_static-site/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { getAssetFromKV } from "@cloudflare/kv-asset-handler";

addEventListener("fetch", event => {
addEventListener("fetch", (event) => {
try {
event.respondWith(handleEvent(event));
} catch (e) {
Expand All @@ -15,7 +15,7 @@ async function handleEvent(event) {
} catch (e) {
try {
let notFoundResponse = await getAssetFromKV(event, {
mapRequestToAsset: req =>
mapRequestToAsset: (req) =>
new Request(`${new URL(req.url).origin}/404/index.html`, req)
});
return new Response(notFoundResponse.body, {
Expand Down
2 changes: 1 addition & 1 deletion packages/ansible-skoleni.cz/pages/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";
import Page from "@app/course-landing/components/Page";

const Index = props => <Page site={props.site} />;
const Index = (props) => <Page site={props.site} />;

export default Index;
2 changes: 1 addition & 1 deletion packages/bootstrap-theme/layouts/Layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ import React from "react";
// Imported CSS
// import "bootstrap-css-only/css/bootstrap.min.css";

export default props => {
export default (props) => {
return <div>{props.children}</div>;
};
2 changes: 1 addition & 1 deletion packages/bootstrap-theme/next-config/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const CopyPlugin = require("copy-webpack-plugin");

module.exports = {
trailingSlash: true,
webpack: function(config) {
webpack: function (config) {
config.plugins.push(
new CopyPlugin([
{
Expand Down
2 changes: 1 addition & 1 deletion packages/bootstrap-web/components/Footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from "react";
import Former2 from "@app/common/components/Former2";
import site from "@app/sika-kaplan.com/config";

const Footer = props => (
const Footer = (props) => (
<div>
<div className="footer mt-4">
<div className="container pt-4 pb-4">
Expand Down
2 changes: 1 addition & 1 deletion packages/bootstrap-web/components/Header.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";

const Header = props => (
const Header = (props) => (
<div>
<div className="bar-header">
<div className="container">
Expand Down
2 changes: 1 addition & 1 deletion packages/bootstrap-web/components/MainBar.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";

const MainBar = props => (
const MainBar = (props) => (
<div>
<div className="bar-grey">
<div className="container pt-4 pb-4">
Expand Down
2 changes: 1 addition & 1 deletion packages/bootstrap-web/components/Navbar.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import Link from "next/link";

const Navbar = props => (
const Navbar = (props) => (
<div>
<div className="container-fluid">
<div className="container pt-2 pb-2">
Expand Down
2 changes: 1 addition & 1 deletion packages/bootstrap-web/layouts/Layout.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import { Layout as ThemeLayout } from "@app/bootstrap-theme/layouts/Layout";

let Layout = props => (
let Layout = (props) => (
<ThemeLayout>
<div className="container">
<h1>Simple Bootrstap Web</h1>
Expand Down
8 changes: 4 additions & 4 deletions packages/cal-api.sika.io/generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ const doc = yaml.safeLoad(
fs.readFileSync("../data/training/sessions.yml", "utf8")
);

const loadYAMLDate = dd_mm_yyyy =>
const loadYAMLDate = (dd_mm_yyyy) =>
dd_mm_yyyy
.split(".")
.reverse()
.map(x => (x.length == 1 ? `0${x}` : x))
.map((x) => (x.length == 1 ? `0${x}` : x))
.join("");

const parseDate = dateString => {
const parseDate = (dateString) => {
var year = dateString.substring(0, 4);
var month = dateString.substring(4, 6);
var day = dateString.substring(6, 8);
Expand All @@ -24,7 +24,7 @@ const parseDate = dateString => {

function getCal() {
let events = [];
doc.map(event => {
doc.map((event) => {
if (!event.active) return;

let d = parseDate(loadYAMLDate(event.date_from));
Expand Down
2 changes: 1 addition & 1 deletion packages/ccc.oxs.cz/components/Links.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";

export default props => {
export default (props) => {
return props.links.map((link, i) => {
let name = link[0];
let url = link[1];
Expand Down
2 changes: 1 addition & 1 deletion packages/ccc.oxs.cz/layouts/Layout.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import Layout from "@app/bootstrap-theme/layouts/Layout";

export default props => (
export default (props) => (
<Layout>
<div className="container">
<p>
Expand Down
4 changes: 2 additions & 2 deletions packages/common/components/AddToGoogleCalendar.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import styled from "styled-components";

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

const AddToGoogleCalendar = props => {
const AddToGoogleCalendar = (props) => {
let name = props.name;
let from = props.from;

Expand Down
2 changes: 1 addition & 1 deletion packages/common/components/AustraliaOnFireBar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Link from "next/link";

import bar from "./bar2.jpg";

let AustraliaFiresBar = props => {
let AustraliaFiresBar = (props) => {
const [hideBar, setHideBar] = useCookie("AustraliaFiresBarhideBar");

let post_link = props.local_link
Expand Down
2 changes: 1 addition & 1 deletion packages/common/components/CoronaBar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Link from "next/link";
import bar from "./coronavirus3.jpg";
import close from "./close.svg";

let KoronaBar = props => {
let KoronaBar = (props) => {
const [hideBar, setHideBar] = useCookie("CoronaBarHide");

let lang = props.lang || "cs";
Expand Down
2 changes: 1 addition & 1 deletion packages/common/components/Gauges.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";

const Gauges = props => (
const Gauges = (props) => (
<script
type="text/javascript"
dangerouslySetInnerHTML={{
Expand Down
2 changes: 1 addition & 1 deletion packages/common/components/GoogleAnalytics.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";

const GoogleAnalytics = props => (
const GoogleAnalytics = (props) => (
<script
type="text/javascript"
dangerouslySetInnerHTML={{
Expand Down
8 changes: 4 additions & 4 deletions packages/common/components/Markdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ function LinkRenderer(props) {
);
}

const ReactComponent = props => <>{props.children}</>;
const TwitterComponent = props => (
const ReactComponent = (props) => <>{props.children}</>;
const TwitterComponent = (props) => (
<TwitterTweetEmbed
tweetId={props.tweet_id}
options={{ conversation: "none" }}
/>
);

const ReactRenderer = props => {
const ReactRenderer = (props) => {
return (
<JsxParser
jsx={props.value}
Expand All @@ -45,7 +45,7 @@ const ReactRenderer = props => {
);
};

let Markdown = props => {
let Markdown = (props) => {
return (
<ReactMarkdown
source={props.source}
Expand Down
2 changes: 1 addition & 1 deletion packages/common/components/Translate.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
const Translate = props => {
const Translate = (props) => {
return <>{props[props.lang] || (props.default && props[props.default])}</>;
};

Expand Down
2 changes: 1 addition & 1 deletion packages/common/forms/Field.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import { Form } from "react-bootstrap";

const Field = props => {
const Field = (props) => {
let name = props.name;
let as = props.as;
let label = props.label;
Expand Down
2 changes: 1 addition & 1 deletion packages/common/google_tag_manager/GoogleTagManager.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";

const GoogleTagManager = props => (
const GoogleTagManager = (props) => (
<>
<script
async
Expand Down
4 changes: 2 additions & 2 deletions packages/common/google_tag_manager/lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ export const event = ({ action, category, label, value }) => {
});
};

export const init = gtm_id => {
Router.events.on("routeChangeComplete", url => pageview(gtm_id, url));
export const init = (gtm_id) => {
Router.events.on("routeChangeComplete", (url) => pageview(gtm_id, url));
};
2 changes: 1 addition & 1 deletion packages/course-landing/components/Alert.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ const style = {
border: "3px solid red"
};

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

export default Alert;
2 changes: 1 addition & 1 deletion packages/course-landing/components/Bar.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";

const Bar = props => (
const Bar = (props) => (
<div>
<div className="container-fluid header-container">
<div className="header mt-0">
Expand Down
2 changes: 1 addition & 1 deletion packages/course-landing/components/ButtonOutline.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Link from "next/link";

const ButtonOutline = props => (
const ButtonOutline = (props) => (
<>
<Link href={props.btnUrl}>
<a className="btn btn-large mybutton-outline m-1">{props.children}</a>
Expand Down
2 changes: 1 addition & 1 deletion packages/course-landing/components/Footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ let style = {
margin: "0"
};

const Footer = props => (
const Footer = (props) => (
<div>
<div className="container-fluid bg">
<div className="container">
Expand Down
2 changes: 1 addition & 1 deletion packages/course-landing/components/Header.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import Link from "next/link";

const Header = props => (
const Header = (props) => (
<div>
<div className="container-fluid header-container">
<div className="header mt-0">
Expand Down
2 changes: 1 addition & 1 deletion packages/course-landing/components/HeaderLink.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import Link from "next/link";

const HeaderLink = props => (
const HeaderLink = (props) => (
<Link href={props.url}>
<a className="btn mybutton mb-2 mr-3">{props.children}</a>
</Link>
Expand Down
2 changes: 1 addition & 1 deletion packages/course-landing/components/MyClients.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import ceska_pojistovna from "./MyClients/ceska_pojistovna.jpg";

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

const MyClients = props => (
const MyClients = (props) => (
<div>
<div className={props.noBorder ? "p-3 mb-4" : "card p-3 mb-4"}>
<h3>
Expand Down
2 changes: 1 addition & 1 deletion packages/course-landing/components/Page.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import ondrejsika from "@app/data/pictures/ondrejsika.jpg";
import courses_file from "@app/data/training/courses.yml";
import StaticDB from "@app/common/staticdb";

const Page = props => {
const Page = (props) => {
let site = props.site;
let lang = props.site.lang;
let location = props.site.location;
Expand Down
2 changes: 1 addition & 1 deletion packages/course-landing/components/References.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";

const References = props => (
const References = (props) => (
<>
<p>{props.reference}</p>
<div className="row">
Expand Down
2 changes: 1 addition & 1 deletion packages/course-landing/components/TextFrame.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";

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

Expand Down
2 changes: 1 addition & 1 deletion packages/course-landing/components/TextFrameWithImage.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";

const TextFrameWithImage = props => (
const TextFrameWithImage = (props) => (
<div className="card p-3 mb-4">
<h3>{props.header}</h3>
<div className="d-flex row">
Expand Down
2 changes: 1 addition & 1 deletion packages/course-landing/components/ThreeCol.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";

const ThreeCol = props => (
const ThreeCol = (props) => (
<div className="container-flex mb-4">
<div className="card p-3">
<h3>{props.header}</h3>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function get_by_id(id) {
return db.get()[0];
}

let TwitterRecommendations = props => {
let TwitterRecommendations = (props) => {
let rec1 = props.ids[0];
let rec2 = props.ids[1];
let rec3 = props.ids[2];
Expand Down
2 changes: 1 addition & 1 deletion packages/course-landing/components/TwoCol.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";

const TwoCol = props => (
const TwoCol = (props) => (
<div className="d-flex flex-row row pt-3">
<div className="col-lg-6 col-md-6 col-sm-12 karta1">
<div className="pr-5">{props.col1}</div>
Expand Down
6 changes: 3 additions & 3 deletions packages/course-landing/next-config/next.config.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
module.exports = {
trailingSlash: true,
exportPathMap: function() {
exportPathMap: function () {
return {
"/": { page: "/" }
};
},
}
};

const withTM = require("next-transpile-modules")([
"@app/ondrejsika-theme",
"@app/common",
"@app/course-landing",
"@app/data",
"@app/data"
]);
module.exports = withTM(module.exports);

Expand Down
2 changes: 1 addition & 1 deletion packages/gitlab-ci.cz/pages/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";
import Page from "@app/course-landing/components/Page";

const Index = props => <Page site={props.site} />;
const Index = (props) => <Page site={props.site} />;

export default Index;
2 changes: 1 addition & 1 deletion packages/knuth-theme/components/Header.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import Link from "next/link";

let Header = props => {
let Header = (props) => {
let site_name = props.site_name;
let menu_links = props.menu_links;
return (
Expand Down
Loading

0 comments on commit 426f8b0

Please sign in to comment.