Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maintenance(www): Get eslint to work on www again #24133

Merged
merged 5 commits into from
May 18, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add rule explanation
  • Loading branch information
tesseralis committed May 16, 2020
commit c9fff6cc1a946d14cd279256f465a6046323aaa6
3 changes: 3 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ module.exports = {
{
files: ["www/**/*"],
rules: {
// We need to import React to use the Fragment shorthand (`<>`).
// When we use theme-ui's JSX pragma, it lists React as an unused var
// even though it's still needed.
"no-unused-vars": ["error", { varsIgnorePattern: "React" }],
},
},
Expand Down
2 changes: 1 addition & 1 deletion www/src/components/localized-link.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react"
import { Link } from "gatsby"
import { useLocale } from "./i18n-contextt"
import { useLocale } from "./i18n-context"
import { localizedPath } from "../utils/i18n"

// Use the globally available context to choose the right path
Expand Down
2 changes: 1 addition & 1 deletion www/src/components/search-form/__tests__/search-form.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react"
import { render, waitFor, fireEvent } from "@testing-library/react"
import { ThemeProvider } from "theme-ui"
import { I18nProvider } from "../../i18n-contextt"
import { I18nProvider } from "../../i18n-context"

import theme from "../../../gatsby-plugin-theme-ui"
import SearchForm from "../search-form"
Expand Down