Skip to content

Commit

Permalink
chore: eslint v9 (#1118)
Browse files Browse the repository at this point in the history
  • Loading branch information
juliusmarminge authored Jan 4, 2025
1 parent eace6bf commit e14e353
Show file tree
Hide file tree
Showing 156 changed files with 5,479 additions and 9,606 deletions.
1 change: 0 additions & 1 deletion .github/replace-workspace-protocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ for (const dep in workspacePkg.peerDependencies) {
}

// Remove unnecessary fields
workspacePkg.eslintConfig = undefined;
workspacePkg.devDependencies = undefined;
workspacePkg.scripts = undefined;

Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/pkg-pr-new.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Publish Test Releases
on: [push, pull_request]

env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}

jobs:
build:
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ expo-env.d.ts
.data
.idea
*.db
*.timestamp_*

# debug
npm-debug.log*
Expand Down
6 changes: 5 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,12 @@
"eslint.workingDirectories": [
"docs",
{ "pattern": "./packages/**" },
{ "pattern": "./examples/**" }
{ "pattern": "./examples/**" },
{ "pattern": "./tooling/**" },
{ "pattern": "./playground/**" },
{ "pattern": "./playground-v6/**" }
],
"eslint.useFlatConfig": true,
"[svelte]": {
"editor.defaultFormatter": "svelte.svelte-vscode"
},
Expand Down
19 changes: 9 additions & 10 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,32 +12,31 @@
"browserslist": "defaults, not ie <= 11",
"dependencies": {
"@algolia/autocomplete-core": "^1.17.4",
"@headlessui/react": "^2.1.8",
"@headlessui/tailwindcss": "^0.2.0",
"@heroicons/react": "^2.1.3",
"@headlessui/react": "^2.2.0",
"@headlessui/tailwindcss": "^0.2.1",
"@heroicons/react": "^2.2.0",
"@mdx-js/loader": "^3.0.1",
"@mdx-js/react": "^3.0.1",
"@next/mdx": "^14.2.11",
"@scalar/api-reference-react": "^0.3.37",
"@next/mdx": "^15.1.3",
"@scalar/api-reference-react": "^0.4.8",
"@shikijs/transformers": "^1.17.5",
"@sindresorhus/slugify": "^2.1.1",
"@tailwindcss/typography": "^0.5.10",
"@types/mdast": "^4.0.4",
"@types/mdx": "^2.0.13",
"@types/node": "^20.14.0",
"@types/node": "^22.10.0",
"@types/react": "18.3.3",
"@types/react-dom": "18.3.0",
"@types/react-highlight-words": "^0.20.0",
"@uploadthing/react": "workspace:*",
"acorn": "^8.12.1",
"autoprefixer": "^10.4.20",
"clsx": "^2.1.0",
"fast-glob": "^3.3.2",
"flexsearch": "^0.7.43",
"framer-motion": "^11.5.4",
"mdast-util-to-string": "^4.0.0",
"mdx-annotations": "^0.1.4",
"next": "14.2.11",
"motion": "^12.0.0-alpha.2",
"next": "15.1.3",
"next-sitemap": "^4.2.3",
"next-themes": "^0.3.0",
"next-view-transitions": "^0.3.0",
Expand All @@ -54,7 +53,7 @@
"shiki": "^1.17.5",
"simple-functional-loader": "^1.2.1",
"tailwindcss": "^3.4.16",
"typescript": "^5.5.2",
"typescript": "5.7.2",
"unified": "^11.0.5",
"unist-util-filter": "^5.0.1",
"unist-util-visit": "^5.0.0",
Expand Down
3 changes: 1 addition & 2 deletions docs/postcss.config.cjs → docs/postcss.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
module.exports = {
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
};
2 changes: 1 addition & 1 deletion docs/src/app/(docs)/client-layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { LogoBlob, LogoText } from "@/components/Logo";
import { Navigation } from "@/components/Navigation";
import { SectionProvider, type Section } from "@/components/SectionProvider";
import { XMarkIcon } from "@heroicons/react/20/solid";
import { motion } from "framer-motion";
import { motion } from "motion/react";
import { Link } from "next-view-transitions";

const PreviewBanner = (props: {
Expand Down
7 changes: 1 addition & 6 deletions docs/src/app/blog/_components/layouts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,7 @@ import {
} from "@/components/SectionProvider";
import { type ArticleWithSlug } from "@/lib/articles";
import { formatDate } from "@/lib/utils";
import {
AnimatePresence,
motion,
useScroll,
useTransform,
} from "framer-motion";
import { AnimatePresence, motion, useScroll, useTransform } from "motion/react";
import { Link, useTransitionRouter } from "next-view-transitions";

function ArrowLeftIcon(props: React.ComponentPropsWithoutRef<"svg">) {
Expand Down
7 changes: 4 additions & 3 deletions docs/src/app/blog/category/[category]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ export async function generateStaticParams() {
return allTags.map((tag) => ({ category: tag }));
}

export default function ArticlesIndex(
export default async function ArticlesIndex(
props: Readonly<{
params: { category: string };
params: Promise<{ category: string }>;
}>,
) {
return <ArticlesPage tag={props.params.category} />;
const { category } = await props.params;
return <ArticlesPage tag={category} />;
}
2 changes: 1 addition & 1 deletion docs/src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { MobileSearch, Search } from "@/components/Search";
import { ThemeToggle } from "@/components/ThemeToggle";
import { socials } from "@/site-config";
import clsx from "clsx";
import { motion, MotionValue, useScroll, useTransform } from "framer-motion";
import { motion, MotionValue, useScroll, useTransform } from "motion/react";
import { Link } from "next-view-transitions";

function TopLevelNavItem({
Expand Down
2 changes: 1 addition & 1 deletion docs/src/components/Heading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useEffect, useRef } from "react";
import { useSectionStore } from "@/components/SectionProvider";
import { Tag, TagColor } from "@/components/Tag";
import { remToPx } from "@/lib/remToPx";
import { useInView } from "framer-motion";
import { useInView } from "motion/react";
import { Link } from "next-view-transitions";

import { AnchorIcon } from "./icons";
Expand Down
2 changes: 1 addition & 1 deletion docs/src/components/MobileNavigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
TransitionChild,
} from "@headlessui/react";
import { Bars2Icon, XMarkIcon } from "@heroicons/react/24/outline";
import { motion } from "framer-motion";
import { motion } from "motion/react";
import { create } from "zustand";

const IsInsideMobileNavigationContext = createContext(false);
Expand Down
2 changes: 1 addition & 1 deletion docs/src/components/Navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Tag } from "@/components/Tag";
import { remToPx } from "@/lib/remToPx";
import { NavGroup, navigation } from "@/site-config";
import clsx from "clsx";
import { AnimatePresence, motion, useIsPresent } from "framer-motion";
import { AnimatePresence, motion, useIsPresent } from "motion/react";
import { Link } from "next-view-transitions";

function useInitialValue<T>(value: T, condition = true) {
Expand Down
2 changes: 1 addition & 1 deletion examples/backend-adapters/client-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@types/react": "18.3.3",
"@types/react-dom": "18.3.0",
"@vitejs/plugin-react-swc": "^3.6.0",
"typescript": "^5.5.2",
"typescript": "5.7.2",
"vite": "^5.4.8"
}
}
2 changes: 1 addition & 1 deletion examples/backend-adapters/client-vanilla/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"uploadthing": "7.4.4"
},
"devDependencies": {
"typescript": "^5.5.2",
"typescript": "5.7.2",
"vite": "^5.4.8"
}
}
2 changes: 1 addition & 1 deletion examples/backend-adapters/client-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"devDependencies": {
"@vitejs/plugin-vue": "^5.0.4",
"typescript": "^5.5.2",
"typescript": "5.7.2",
"vite": "^5.4.8",
"vue-tsc": "^2.0.6"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/backend-adapters/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@playwright/test": "1.49.1",
"@uploadthing/react": "7.1.5",
"concurrently": "^8.2.2",
"typescript": "^5.5.2",
"typescript": "5.7.2",
"uploadthing": "7.4.4"
}
}
2 changes: 1 addition & 1 deletion examples/backend-adapters/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"@types/cors": "^2.8.17",
"@types/express": "^4.17.21",
"tsx": "^4.7.1",
"typescript": "^5.5.2",
"typescript": "5.7.2",
"wrangler": "^3.62.0"
}
}
2 changes: 1 addition & 1 deletion examples/minimal-appdir/next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
8 changes: 4 additions & 4 deletions examples/minimal-appdir/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@
},
"dependencies": {
"@uploadthing/react": "7.1.5",
"next": "14.2.11",
"next": "15.1.3",
"react": "18.3.1",
"react-dom": "18.3.1",
"uploadthing": "7.4.4"
},
"devDependencies": {
"@next/bundle-analyzer": "14.2.3",
"@types/node": "^20.14.0",
"@next/bundle-analyzer": "15.1.3",
"@types/node": "^22.10.0",
"@types/react": "18.3.3",
"@types/react-dom": "18.3.0",
"typescript": "^5.5.2"
"typescript": "5.7.2"
}
}
8 changes: 3 additions & 5 deletions examples/minimal-appdir/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@
"skipLibCheck": true,
"strict": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"module": "Preserve",
"target": "ES2022",
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
Expand All @@ -17,6 +15,6 @@
"~/*": ["./src/*"]
}
},
"include": [".next/types/**/*.ts", "next-env.d.ts", "src", "*.mjs"],
"include": [".next/types/**/*.ts", "next-env.d.ts", "src", "*.js"],
"exclude": ["node_modules"]
}
2 changes: 1 addition & 1 deletion examples/minimal-expo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@
"@babel/runtime": "^7.24.4",
"@types/react": "18.3.3",
"tailwindcss": "^3.4.16",
"typescript": "^5.5.2"
"typescript": "5.7.2"
}
}
2 changes: 1 addition & 1 deletion examples/minimal-nuxt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"dependencies": {
"@uploadthing/nuxt": "7.1.5",
"nuxt": "^3.11.2",
"nuxt": "^3.15.0",
"uploadthing": "7.4.4",
"vue": "^3.4.21",
"vue-router": "^4.3.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/minimal-pagedir/next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.
// see https://nextjs.org/docs/pages/api-reference/config/typescript for more information.
6 changes: 3 additions & 3 deletions examples/minimal-pagedir/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
},
"dependencies": {
"@uploadthing/react": "7.1.5",
"next": "14.2.11",
"next": "15.1.3",
"react": "18.3.1",
"react-dom": "18.3.1",
"uploadthing": "7.4.4"
},
"devDependencies": {
"@types/node": "^20.14.0",
"@types/node": "^22.10.0",
"@types/react": "18.3.3",
"@types/react-dom": "18.3.0",
"typescript": "^5.5.2"
"typescript": "5.7.2"
}
}
8 changes: 3 additions & 5 deletions examples/minimal-pagedir/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@
"skipLibCheck": true,
"strict": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"module": "Preserve",
"target": "ES2022",
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
Expand All @@ -17,6 +15,6 @@
"~/*": ["./src/*"]
}
},
"include": [".next/types/**/*.ts", "next-env.d.ts", "src", "*.mjs"],
"include": [".next/types/**/*.ts", "next-env.d.ts", "src", "*.js"],
"exclude": ["node_modules"]
}
2 changes: 1 addition & 1 deletion examples/minimal-sveltekit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"svelte": "^4.2.12",
"svelte-check": "^3.6.7",
"tslib": "^2.6.2",
"typescript": "^5.5.2",
"typescript": "5.7.2",
"vite": "^5.4.8"
},
"type": "module"
Expand Down
2 changes: 1 addition & 1 deletion examples/minimal-tanstack-start/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
"@types/react": "18.3.3",
"@types/react-dom": "18.3.0",
"@vitejs/plugin-react": "^4.3.2",
"typescript": "^5.5.2"
"typescript": "5.7.2"
}
}
5 changes: 1 addition & 4 deletions examples/profile-picture/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export default tseslint.config(
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/only-throw-error": "off",

"@typescript-eslint/no-unused-vars": [
"error",
Expand All @@ -31,10 +32,6 @@ export default tseslint.config(
"warn",
{ prefer: "type-imports", fixStyle: "separate-type-imports" },
],
"@typescript-eslint/no-misused-promises": [
2,
{ checksVoidReturn: { attributes: false } },
],
"@typescript-eslint/require-await": "off",
},
},
Expand Down
2 changes: 1 addition & 1 deletion examples/profile-picture/next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
Loading

0 comments on commit e14e353

Please sign in to comment.