update prettier config

This commit is contained in:
Dawid Wysokiński 2021-01-04 18:12:05 +01:00
parent 970b8cf033
commit 06f247a5c7
9 changed files with 52 additions and 51 deletions

View File

@ -1,4 +1,5 @@
{
"arrowParens": "avoid",
"semi": true
"semi": true,
"singleQuote": true
}

View File

@ -1 +1 @@
import "@kichiyaki/roboto";
import '@kichiyaki/roboto';

View File

@ -1,16 +1,16 @@
const baseUrl = "tribalwarshelp.com";
const siteUrl = "https://" + baseUrl;
const apiUrl = "https://api." + baseUrl;
const baseUrl = 'tribalwarshelp.com';
const siteUrl = 'https://' + baseUrl;
const apiUrl = 'https://api.' + baseUrl;
module.exports = {
siteMetadata: {
title: `TWHelp`,
description: `Tools for the popular online game TribalWars.`,
dcbotUrl: "https://dcbot." + baseUrl,
dcbotUrl: 'https://dcbot.' + baseUrl,
apiUrl,
author: "Dawid Wysokiński",
contactUrl: "http://dawid-wysokinski.pl/#contact",
scriptsUrl: "https://github.com/tribalwarshelp/scripts",
author: 'Dawid Wysokiński',
contactUrl: 'http://dawid-wysokinski.pl/#contact',
scriptsUrl: 'https://github.com/tribalwarshelp/scripts',
siteUrl,
baseUrl,
},
@ -45,29 +45,29 @@ module.exports = {
},
`gatsby-plugin-sitemap`,
{
resolve: "gatsby-plugin-robots-txt",
resolve: 'gatsby-plugin-robots-txt',
options: {
host: siteUrl,
sitemap: siteUrl + "/sitemap.xml",
sitemap: siteUrl + '/sitemap.xml',
env: {
development: {
policy: [{ userAgent: "*", disallow: ["/"] }],
policy: [{ userAgent: '*', disallow: ['/'] }],
},
production: {
policy: [{ userAgent: "*", allow: "/" }],
policy: [{ userAgent: '*', allow: '/' }],
},
},
},
},
{
resolve: "gatsby-source-graphql",
resolve: 'gatsby-source-graphql',
options: {
// This type will contain remote schema Query type
typeName: "twhelp",
typeName: 'twhelp',
// This is the field under which it's accessible
fieldName: "twhelp",
fieldName: 'twhelp',
// URL to query from
url: apiUrl + "/graphql",
url: apiUrl + '/graphql',
},
},
],

View File

@ -1,6 +1,6 @@
import React from "react";
import { Link as GatsbyLink } from "gatsby";
import { Link as MUILink } from "@material-ui/core";
import React from 'react';
import { Link as GatsbyLink } from 'gatsby';
import { Link as MUILink } from '@material-ui/core';
function Link({ href, to, ...rest }) {
if (to) {

View File

@ -5,11 +5,11 @@
* See: https://www.gatsbyjs.org/docs/use-static-query/
*/
import React from "react";
import PropTypes from "prop-types";
import { Helmet } from "react-helmet";
import { useStaticQuery, graphql } from "gatsby";
import seoBG from "@images/seo-bg.png";
import React from 'react';
import PropTypes from 'prop-types';
import { Helmet } from 'react-helmet';
import { useStaticQuery, graphql } from 'gatsby';
import seoBG from '@images/seo-bg.png';
function SEO({ description, lang, meta, title, pathname }) {
const { site } = useStaticQuery(

View File

@ -1,8 +1,8 @@
import { createMuiTheme, responsiveFontSizes } from "@material-ui/core/styles";
import { createMuiTheme, responsiveFontSizes } from '@material-ui/core/styles';
const theme = createMuiTheme({
palette: {
type: "dark",
type: 'dark',
},
});

View File

@ -1,8 +1,8 @@
import React from "react";
import React from 'react';
import { Typography, Box, Container } from "@material-ui/core";
import { Link } from "gatsby-theme-material-ui";
import SEO from "../components/SEO";
import { Typography, Box, Container } from '@material-ui/core';
import { Link } from 'gatsby-theme-material-ui';
import SEO from '../components/SEO';
const NotFoundPage = ({ location }) => (
<Box

View File

@ -1,10 +1,10 @@
import React from "react";
import { useStaticQuery, graphql } from "gatsby";
import React from 'react';
import { useStaticQuery, graphql } from 'gatsby';
import { makeStyles } from "@material-ui/core/styles";
import { Typography, Button, Box, Container } from "@material-ui/core";
import SEO from "../components/SEO";
import Link from "../components/Link";
import { makeStyles } from '@material-ui/core/styles';
import { Typography, Button, Box, Container } from '@material-ui/core';
import SEO from '../components/SEO';
import Link from '../components/Link';
const LinkButton = ({ children, href, to }) => {
return (
@ -19,16 +19,16 @@ const LinkButton = ({ children, href, to }) => {
const useStyles = makeStyles(theme => ({
nav: {
marginBottom: theme.spacing(3),
display: "flex",
flexDirection: "row",
flexWrap: "wrap",
alignItems: "center",
justifyContent: "center",
"& > *": {
display: 'flex',
flexDirection: 'row',
flexWrap: 'wrap',
alignItems: 'center',
justifyContent: 'center',
'& > *': {
padding: theme.spacing(0.5),
},
[theme.breakpoints.down("xs")]: {
flexDirection: "column",
[theme.breakpoints.down('xs')]: {
flexDirection: 'column',
},
},
}));
@ -79,7 +79,7 @@ const IndexPage = ({ location }) => {
<LinkButton href={siteMetadata.dcbotUrl}>Discord Bot</LinkButton>
</div>
<div>
<LinkButton to={"/supported-versions"}>
<LinkButton to={'/supported-versions'}>
Stat tracking website
</LinkButton>
</div>

View File

@ -1,5 +1,5 @@
import React from "react";
import { useStaticQuery, graphql } from "gatsby";
import React from 'react';
import { useStaticQuery, graphql } from 'gatsby';
import {
Box,
@ -8,9 +8,9 @@ import {
Grid,
Container,
Typography,
} from "@material-ui/core";
import Link from "../components/Link";
import SEO from "../components/SEO";
} from '@material-ui/core';
import Link from '../components/Link';
import SEO from '../components/SEO';
const buildURLToVersionPage = (baseUrl, code) => {
return `https://${code}.${baseUrl}`;