AT-based link agregator. Mirror of https://github.com/likeandscribe/frontpage

Remove deprecated tseslint config provider (#293)

* Replace deprecated config provider from tseslint and use Next.js eslint as a plugin

* Update packages/eslint-config/typescript.js

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

authored by

Timothy
Copilot
and committed by
GitHub
b8c3431c 9f52c1dd

+16 -8
+12 -5
packages/eslint-config/next.js
··· 1 - import tseslint from "typescript-eslint"; 1 + import { defineConfig, globalIgnores } from "eslint/config"; 2 2 import typescript from "./typescript.js"; 3 3 import react from "./react.js"; 4 4 import next from "@next/eslint-plugin-next"; 5 - import { globalIgnores } from "eslint/config"; 6 5 7 - export default tseslint.config( 6 + export default defineConfig( 8 7 typescript, 9 8 react, 10 - next.configs.recommended, 11 - next.configs["core-web-vitals"], 9 + { 10 + files: ["**/*.{js,jsx,ts,tsx}"], 11 + plugins: { 12 + "@next/next": next, 13 + }, 14 + rules: { 15 + ...next.configs.recommended.rules, 16 + ...next.configs["core-web-vitals"].rules, 17 + }, 18 + }, 12 19 globalIgnores( 13 20 [".next/", ".vercel/", "node_modules/", "next-env.d.ts"], 14 21 "monorepo-next-config-ignores",
+2 -2
packages/eslint-config/react.js
··· 1 - import tseslint from "typescript-eslint"; 1 + import { defineConfig } from "eslint/config"; 2 2 import jsxA11y from "eslint-plugin-jsx-a11y"; 3 3 import reactHooks from "eslint-plugin-react-hooks"; 4 4 import react from "eslint-plugin-react"; 5 5 import { version as reactVersion } from "react"; 6 6 7 - export default tseslint.config( 7 + export default defineConfig( 8 8 // @ts-expect-error 9 9 reactHooks.configs["recommended-latest"], 10 10 // @ts-expect-error
+2 -1
packages/eslint-config/typescript.js
··· 1 + import { defineConfig } from "eslint/config"; 1 2 import eslint from "@eslint/js"; 2 3 import tseslint from "typescript-eslint"; 3 4 import turboRepo from "eslint-config-turbo/flat"; 4 5 5 - export default tseslint.config( 6 + export default defineConfig( 6 7 eslint.configs.recommended, 7 8 tseslint.configs.recommendedTypeChecked, 8 9 turboRepo,