Skip to content

Commit

Permalink
🚨 Fix silly linter
Browse files Browse the repository at this point in the history
  • Loading branch information
bradystroud committed Oct 1, 2024
1 parent ee7dab1 commit 6f9572b
Show file tree
Hide file tree
Showing 12 changed files with 54 additions and 22 deletions.
10 changes: 0 additions & 10 deletions .eslintrc

This file was deleted.

1 change: 1 addition & 0 deletions components/blocks/best-parmi.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Container } from "../util/container";
import { Section } from "../util/section";
import { Template } from "tinacms";

// eslint-disable-next-line @typescript-eslint/no-unused-vars
export const BestParmi = ({ data, parentField }) => {
return (
<Section>
Expand Down
2 changes: 1 addition & 1 deletion components/layout/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const Layout = ({ data = layoutData, children }) => {
{children}
</div>
<Footer
// eslint-disable-next-line @typescript-eslint/no-explicit-any
data={data?.footer}
/>
</div>
Expand Down
40 changes: 40 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import tsParser from "@typescript-eslint/parser";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
});

export default [
{
ignores: [
"**/node_modules",
"**/dist",
"tina/__generated__",
"**/```",
".next",
],
},
...compat.extends(
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
),
{
plugins: {
"@typescript-eslint": typescriptEslint,
},

languageOptions: {
parser: tsParser,
},
},
];
1 change: 1 addition & 0 deletions graphql.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// eslint-disable-next-line no-undef
module.exports = {
projects: {
app: {
Expand Down
1 change: 1 addition & 0 deletions next-sitemap.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/** @type {import('next-sitemap').IConfig} */

// eslint-disable-next-line no-undef
module.exports = {
siteUrl: "https://parmipicks.com/",
changefreq: "daily",
Expand Down
1 change: 1 addition & 0 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// eslint-disable-next-line no-undef
module.exports = {
i18n: {
locales: ["en"],
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"start": "tinacms build && next start",
"export": "npm run build && next export",
"postbuild": "next-sitemap --config next-sitemap.config.js",
"lint": "eslint . --ext .ts,.tsx"
"lint": "eslint ."
},
"devDependencies": {
"@svgr/webpack": "^8.0.1",
Expand Down Expand Up @@ -41,4 +41,4 @@
"resolutions": {
"final-form": "4.20.1"
}
}
}
8 changes: 3 additions & 5 deletions pages/[filename].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ import { useTina } from "tinacms/dist/react";
import { Layout } from "../components/layout";
import { client } from "../tina/__generated__/client";
import { InferGetStaticPropsType } from "next";
import Link from "next/link";
import Head from "next/head";
import { Section } from "../components/util/section";

export default function HomePage(
props: InferGetStaticPropsType<typeof getStaticProps>
Expand All @@ -15,10 +13,10 @@ export default function HomePage(
variables: props.variables,
data: props.data,
});
const bestParmi = props.topParmi.node;
const bestParmiReview = bestParmi.id.split(".")[0];
// const bestParmi = props.topParmi.node;
// const bestParmiReview = bestParmi.id.split(".")[0];

const bestParmiReviewUrl = bestParmiReview.replace("content", "");
// const bestParmiReviewUrl = bestParmiReview.replace("content", "");
return (
// eslint-disable-next-line @typescript-eslint/no-explicit-any
<Layout data={data.global as any}>
Expand Down
1 change: 1 addition & 0 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// eslint-disable-next-line no-undef
module.exports = {
plugins: {
"postcss-import": {},
Expand Down
2 changes: 2 additions & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable no-undef */
/* eslint-disable @typescript-eslint/no-require-imports */
const colors = require("tailwindcss/colors");
const defaultTheme = require("tailwindcss/defaultTheme");

Expand Down
5 changes: 1 addition & 4 deletions tina/config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ import { defineConfig } from "tinacms";
import { contentBlockSchema } from "../components/blocks/content";
import { featureBlockSchema } from "../components/blocks/features";
import { heroBlockSchema } from "../components/blocks/hero";
import {
BestParmi,
bestParmiBlockSchema,
} from "../components/blocks/best-parmi";
import { bestParmiBlockSchema } from "../components/blocks/best-parmi";

const config = defineConfig({
clientId: process.env.NEXT_PUBLIC_TINA_CLIENT_ID!,
Expand Down

0 comments on commit 6f9572b

Please sign in to comment.