diff --git a/src/index.ts b/src/index.ts index f7b9e2575..30ca3db16 100755 --- a/src/index.ts +++ b/src/index.ts @@ -481,9 +481,7 @@ function setAuthorName(author: string) { prog .command('test') - .describe( - 'Run jest test runner. Passes through all flags directly to Jest' - ) + .describe('Run jest test runner. Passes through all flags directly to Jest') .action(async (opts: { config?: string }) => { // Do this as the first thing so that any code reading it knows the right env. process.env.BABEL_ENV = 'test'; diff --git a/website/components/video.js b/website/components/video.js index 5fcbfe91d..9b4b65ade 100644 --- a/website/components/video.js +++ b/website/components/video.js @@ -1,52 +1,52 @@ -import { useRef, useCallback, useEffect } from 'react' -import { useInView } from 'react-intersection-observer' -import 'intersection-observer' +import React, { useRef, useCallback, useEffect } from 'react'; +import { useInView } from 'react-intersection-observer'; +import 'intersection-observer'; export default ({ src, caption, ratio }) => { const [inViewRef, inView] = useInView({ threshold: 1, - }) - const videoRef = useRef() + }); + const videoRef = useRef(); const setRefs = useCallback( - (node) => { + node => { // Ref's from useRef needs to have the node assigned to `current` - videoRef.current = node + videoRef.current = node; // Callback refs, like the one from `useInView`, is a function that takes the node as an argument - inViewRef(node) + inViewRef(node); if (node) { - node.addEventListener('click', function () { + node.addEventListener('click', function() { if (this.paused) { - this.play() + this.play(); } else { - this.pause() + this.pause(); } - }) + }); } }, [inViewRef] - ) + ); useEffect(() => { if (!videoRef || !videoRef.current) { - return + return; } if (inView) { - videoRef.current.play() + videoRef.current.play(); } else { - videoRef.current.pause() + videoRef.current.pause(); } - }, [inView]) + }, [inView]); return (
-
+
{caption &&
{caption}
}
- ) -} + ); +}; diff --git a/website/nextra.config.js b/website/nextra.config.js index a0f69edca..9febdeee4 100644 --- a/website/nextra.config.js +++ b/website/nextra.config.js @@ -1,3 +1,4 @@ +import React from 'react'; import { Logo } from 'components/logo'; export default { @@ -67,7 +68,7 @@ export default { A Jared Palmer Project @@ -80,7 +81,7 @@ export default { filepath } target="_blank" - rel="noopener" + rel="noopener noreferrer" > Edit this page on GitHub diff --git a/website/pages/_app.js b/website/pages/_app.js index 391b3ab1a..1c0291bd5 100644 --- a/website/pages/_app.js +++ b/website/pages/_app.js @@ -1,5 +1,6 @@ -import '.nextra/styles.css' -import GoogleFonts from 'next-google-fonts' +import React from 'react'; +import '.nextra/styles.css'; +import GoogleFonts from 'next-google-fonts'; export default function Nextra({ Component, pageProps }) { return ( @@ -10,5 +11,5 @@ export default function Nextra({ Component, pageProps }) { /> - ) + ); } diff --git a/website/pages/_document.js b/website/pages/_document.js index 19e669faa..f46b5a21e 100644 --- a/website/pages/_document.js +++ b/website/pages/_document.js @@ -1,6 +1,6 @@ -import React from 'react' -import Document, { Html, Head, Main, NextScript } from 'next/document' -import { SkipNavLink } from '@reach/skip-nav' +import React from 'react'; +import Document, { Html, Head, Main, NextScript } from 'next/document'; +import { SkipNavLink } from '@reach/skip-nav'; class MyDocument extends Document { render() { @@ -18,8 +18,8 @@ class MyDocument extends Document { /> - ) + ); } } -export default MyDocument +export default MyDocument; diff --git a/website/postcss.config.js b/website/postcss.config.js index 764198d70..7129bb14f 100644 --- a/website/postcss.config.js +++ b/website/postcss.config.js @@ -1,3 +1,3 @@ module.exports = { - plugins: ['tailwindcss', 'postcss-preset-env'] -} \ No newline at end of file + plugins: ['tailwindcss', 'postcss-preset-env'], +}; diff --git a/website/tailwind.config.js b/website/tailwind.config.js index 2f61355f0..ba37a8b3b 100644 --- a/website/tailwind.config.js +++ b/website/tailwind.config.js @@ -1,5 +1,11 @@ module.exports = { - purge: ['./components/**/*.js', './pages/**/*.md', './pages/**/*.mdx', './.nextra/**/*.js', './nextra.config.js'], + purge: [ + './components/**/*.js', + './pages/**/*.md', + './pages/**/*.mdx', + './.nextra/**/*.js', + './nextra.config.js', + ], theme: { screens: { sm: '640px', @@ -11,7 +17,7 @@ module.exports = { display: ['inter', 'sans-serif'], }, letterSpacing: { - tight: '-0.015em' - } - } -} + tight: '-0.015em', + }, + }, +};