-
Notifications
You must be signed in to change notification settings - Fork 37
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
supprt eslint 9 #108
Comments
There is a package to help use plugins that aren't configured to work with ESLint v9 found here. But because the rules in the style guides themselves are deeply nested, I've been unable to get them to work with any confidence that they are being applied. Hopefully this will help someone else have more luck |
if vercel/style-guide wants to keep eslint-plugin-jsx-a11y, we need it to support v9 too. jsx-eslint/eslint-plugin-jsx-a11y#978 there might be other dependencies like that. I haven't checked passed this one |
@andy-checkd did you manage to make any progress with the
But I am getting the same erro with and without using |
I was able to get it to work using the // eslint.config.js
// @ts-check
import js from "@eslint/js";
import ts from "typescript-eslint";
import prettier from 'eslint-config-prettier';
import { FlatCompat } from "@eslint/eslintrc";
import vercelNext from '@vercel/style-guide/eslint/next';
const compat = new FlatCompat();
export default ts.config(
js.configs.recommended,
...ts.configs.recommended,
...compat.config(vercelNext), // <--
prettier,
); Please note that I did not extensively test this. This is a minimal example I found to work in my mono-repo (scaffolded via turborepo). For reference, I used these package versions (knowing they have peer dep issues):
|
This worked for server:lint |
server:lint | Oops! Something went wrong! :(
server:lint |
server:lint | ESLint: 9.9.0
server:lint |
server:lint | ConfigError: Config (unnamed): Key "plugins": Cannot redefine plugin "@typescript-eslint".
server:lint | at rethrowConfigError (/Users/yamcodes/code/graphql-playground/node_modules/@eslint/config-array/dist/cjs/index.cjs:303:8)
server:lint | at /Users/yamcodes/code/graphql-playground/node_modules/@eslint/config-array/dist/cjs/index.cjs:1098:5
server:lint | at Array.reduce (<anonymous>)
server:lint | at FlatConfigArray.getConfigWithStatus (/Users/yamcodes/code/graphql-playground/node_modules/@eslint/config-array/dist/cjs/index.cjs:1091:43)
server:lint | at FlatConfigArray.getConfig (/Users/yamcodes/code/graphql-playground/node_modules/@eslint/config-array/dist/cjs/index.cjs:1120:15)
server:lint | at /Users/yamcodes/code/graphql-playground/node_modules/eslint/lib/eslint/eslint-helpers.js:346:56
server:lint | at Array.reduce (<anonymous>)
server:lint | at /Users/yamcodes/code/graphql-playground/node_modules/eslint/lib/eslint/eslint-helpers.js:333:36
server:lint | at /Users/yamcodes/code/graphql-playground/node_modules/eslint/lib/eslint/eslint-helpers.js:296:32
server:lint | at Object.isAppliedFilter (/Users/yamcodes/code/graphql-playground/node_modules/@nodelib/fs.walk/out/readers/common.js:12:31)
▪▪▪▪ server:lint (961ms, a32fada6)
Error: task_runner::run_failed
× Task server:lint failed to run.
╰─▶ Process eslint failed: exit code 2 Edit: |
hi @yamcodes I tried your suggestion, but didn't work for me
I am getting
Did you encouter this by any chance? |
Hey @trixobird , I've managed to fix my errors using this structure:
|
Hi again, thank you for your answer. I was able to make the lint working with your suggestions, but it does not seem to honor the vercel configs. consol.log is allowed, and so as kebab files names |
Any news on this issue? |
Next.js now supports v9: vercel/next.js#71218 I hope that an update will land here before Next.js v15 comes out. |
I've submitted a PR for this, hopefully we'll have this available soon. |
Hi, I am getting a lot of depedency warnings now that eslint has released 9. Do you have plans to support this in the near future? Is there way to use this style-guide in the new flat hierarchy of eslint that has no extends any more?
The text was updated successfully, but these errors were encountered: