Skip to content

Commit

Permalink
meta: fix linter warnings (#220)
Browse files Browse the repository at this point in the history
  • Loading branch information
aduh95 authored Apr 9, 2024
1 parent 021574d commit 6730fbe
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 38 deletions.
2 changes: 1 addition & 1 deletion docs/uppy-core.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ Metadata can also be added from a `<form>` element on your page, through the

:::

<a id="onBeforeFileAdded" />
<i id="onBeforeFileAdded" />

#### `onBeforeFileAdded(file, files)`

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"clear": "docusaurus clear",
"deploy": "docusaurus deploy",
"dev": "docusaurus start",
"lint:js": "eslint . --cache",
"lint:js": "eslint . --cache --max-warnings=0",
"lint:md": "run-s --continue-on-error remark:md remark:mdx",
"lint": "run-s --continue-on-error lint:js lint:md format:check-diff",
"prepare": "husky install",
Expand Down
3 changes: 2 additions & 1 deletion src/components/HomepageFeatures/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';
import clsx from 'clsx';
import Heading from '@theme/Heading';
import styles from './styles.module.css';

type FeatureItem = {
Expand Down Expand Up @@ -48,7 +49,7 @@ function Feature({ title, Svg, description }: FeatureItem) {
<Svg className={styles.featureSvg} role="img" />
</div>
<div className="text--center padding-horiz--md">
<h3>{title}</h3>
<Heading as="h3">{title}</Heading>
<p>{description}</p>
</div>
</div>
Expand Down
3 changes: 2 additions & 1 deletion src/components/QuickStartLinks/QuickStartLinks.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
import Heading from '@theme/Heading';
import Link from '@docusaurus/Link';

import styles from './styles.module.css';
Expand All @@ -18,7 +19,7 @@ export const QuickStartLinks = (props: Props) => {
{props.items.map((item) => (
<Link to={item.link}>
<div className={styles.item}>
<h2>{item.name}</h2>
<Heading as="h2">{item.name}</Heading>
<p>{item.description}</p>
</div>
</Link>
Expand Down
15 changes: 8 additions & 7 deletions src/pages/examples.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import '@uppy/webcam/dist/style.min.css';
import '@uppy/url/dist/style.min.css';

import styles from './examples.module.css';
import Heading from '@theme/Heading';
import Link from '@docusaurus/Link';

const restrictions = {
Expand Down Expand Up @@ -278,19 +279,19 @@ function Page() {
return (
<Layout>
<main className={styles.main}>
<h1>Examples</h1>
<Heading as="h1">Examples</Heading>

<div className={styles.header}>
<h2>Dashboard</h2>
<Heading as="h2">Dashboard</Heading>
<p>
<Link to="/docs/dashboard">Docs</Link>{' '}
<a
<Link
target="_blank"
rel="noopener"
href="https://codesandbox.io/s/uppy-dashboard-xpxuhd"
>
CodeSandbox
</a>
</Link>
</p>
</div>
<p>
Expand All @@ -303,7 +304,7 @@ function Page() {
{options.map((section) => {
return (
<div key={section.heading}>
<h3>{section.heading}</h3>
<Heading as="h3">{section.heading}</Heading>
<div
wrapper-for={section.heading}
className={styles['options-wrapper']}
Expand Down Expand Up @@ -372,13 +373,13 @@ function Page() {
</section>
<Admonition type="note">
Checkout our{' '}
<a
<Link
href="https://github.com/transloadit/uppy/tree/main/examples"
target="_blank"
rel="noopener"
>
GitHub examples
</a>{' '}
</Link>{' '}
folder for many more examples.
</Admonition>
</main>
Expand Down
34 changes: 20 additions & 14 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { useState, Fragment } from 'react';
import Layout from '@theme/Layout';
import Heading from '@theme/Heading';
import Link from '@docusaurus/Link';
import Dashboard from '@uppy/react/lib/Dashboard';
import Uppy from '@uppy/core';
Expand Down Expand Up @@ -154,7 +155,9 @@ export default function Home(): JSX.Element {
return (
<Layout description="Description will go into a meta tag in <head />">
<header className={styles.header}>
<h1>Sleek, modular open source JavaScript file uploader</h1>
<Heading as="h1">
Sleek, modular open source JavaScript file uploader
</Heading>

<p>
Uppy fetches files locally and from remote places like Dropbox or
Expand All @@ -171,13 +174,13 @@ export default function Home(): JSX.Element {
<p>“Top 10 tools of the year”</p>
</blockquote>
<figcaption>
<a
<Link
href="https://stackshare.io/posts/top-developer-tools-2017"
rel="noopener"
target="_blank"
>
Stackshare
</a>
</Link>
</figcaption>
</figure>

Expand All @@ -186,13 +189,13 @@ export default function Home(): JSX.Element {
<p>“The best product launches”</p>
</blockquote>
<figcaption>
<a
<Link
href="https://books.producthunt.com/bestof2017"
rel="noopener"
target="_blank"
>
Product Hunt
</a>
</Link>
</figcaption>
</figure>

Expand All @@ -201,22 +204,22 @@ export default function Home(): JSX.Element {
<p>“Soooo useful”</p>
</blockquote>
<figcaption>
<a
<Link
href="https://twitter.com/smashingmag/status/1097870169043546112"
rel="noopener"
target="_blank"
>
Smashing Magazine
</a>
</Link>
</figcaption>
</figure>
</header>

<main className={styles.main}>
<section className={styles['section-dashboard']}>
<h2>
<Heading as="h2">
The all you need Dashboard — powerful, responsive, and pluggable.
</h2>
</Heading>
<p>
Add files from remote sources, edit images, generate thumbnails, and
more.
Expand Down Expand Up @@ -293,7 +296,9 @@ export default function Home(): JSX.Element {
</div>
))}
</div>
<h2>Bring in the files from the cloud with Companion.</h2>
<Heading as="h2">
Bring in the files from the cloud with Companion.
</Heading>
<p>
Companion is a hosted, standalone, or middleware server to{' '}
<strong>
Expand All @@ -313,7 +318,7 @@ export default function Home(): JSX.Element {

<section className={styles['section-stack']}>
<div>
<h2>Integrate Uppy into your existing stack.</h2>
<Heading as="h2">Integrate Uppy into your existing stack.</Heading>
<p>
Uppy can seamlessly integrate in your existing stack. Plug the pup
in the framework of your choosing.
Expand Down Expand Up @@ -352,15 +357,16 @@ export default function Home(): JSX.Element {
</section>

<section className={styles['section-much-more']}>
<h2>And much more</h2>
<Heading as="h2">And much more</Heading>
<ul>
<li>
<span>
<IconUpload />
</span>
<span>
Large uploads survive network hiccups thanks to resumable file
uploads via the open <a href="https://tus.io/">Tus</a> standard
uploads via the open <Link href="https://tus.io/">Tus</Link>{' '}
standard
</span>
</li>
<li>
Expand All @@ -369,7 +375,7 @@ export default function Home(): JSX.Element {
</span>
<span>
Works great with the file encoding and processing backend from{' '}
<a href="https://transloadit.com/">Transloadit</a>.
<Link href="https://transloadit.com/">Transloadit</Link>.
</span>
</li>
<li>
Expand Down
13 changes: 7 additions & 6 deletions src/theme/BlogPostItem/Footer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import clsx from 'clsx';
import { useBlogPost } from '@docusaurus/theme-common/internal';
import EditThisPage from '@theme/EditThisPage';
import TagsListInline from '@theme/TagsListInline';
import Link from '@docusaurus/Link';
import ReadMoreLink from '@theme/BlogPostItem/Footer/ReadMoreLink';
import styles from './styles.module.css';

Expand Down Expand Up @@ -32,31 +33,31 @@ export default function BlogPostItemFooter() {
{isBlogPostPage && (
<ul className={styles.footer}>
<li>
<a
<Link
target="_blank"
rel="noopener"
href="https://twitter.com/uppy_io"
>
Twitter
</a>
</Link>
</li>
<li>
<a
<Link
target="_blank"
rel="noopener"
href="https://uppy.io/blog/atom.xml"
>
RSS feed
</a>
</Link>
</li>
<li>
<a
<Link
target="_blank"
rel="noopener"
href="https://github.com/transloadit/uppy"
>
GitHub
</a>
</Link>
</li>
</ul>
)}
Expand Down
15 changes: 8 additions & 7 deletions src/theme/Footer/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
import Link from '@docusaurus/Link';

import styles from './index.module.css';

Expand All @@ -15,23 +16,23 @@ function Footer() {
</p>
<p>
Released under the{' '}
<a
<Link
href="http://opensource.org/licenses/MIT"
rel="noreferrer noopener"
target="_blank"
>
MIT License
</a>{' '}
<a href="/privacy-policy/">Privacy Policy</a>{' '}
<a href="https://github.com/transloadit/uppy/blob/main/.github/CONTRIBUTING.md">
</Link>{' '}
<Link href="/privacy-policy/">Privacy Policy</Link>{' '}
<Link href="https://github.com/transloadit/uppy/blob/main/.github/CONTRIBUTING.md">
Contributing
</a>
</Link>
</p>
<p>
© 2023{' '}
<a href="https://transloadit.com" target="_blank">
<Link href="https://transloadit.com" target="_blank">
Transloadit
</a>
</Link>
</p>
</footer>
);
Expand Down

0 comments on commit 6730fbe

Please sign in to comment.