-
Notifications
You must be signed in to change notification settings - Fork 2.1k
chore(linting): implement ESLint flat config compatibility for `eslin… #8606
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
Conversation
…t-plugin-turbo` - Add "flat/recommended" config to `eslint-plugin-turbo` - Add `meta` property to plugin - Update README.md accordingly with information on using flat config - Add tests for flat config in `__tests__/cwdFlat.test.ts`
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 6 Skipped Deployments
|
@jeremy-code is attempting to deploy a commit to the Vercel Team on Vercel. A member of the Team first needs to authorize it. |
Previous PR was #8054, @anthonyshew |
Really appreciate this! Do you have a repo I could test this out in? I haven't gotten to try out Flat Config yet. |
@jeremy-code We'd love to get this merged! Are you able to fix up the conflicts so we can try this out with a canary release? |
@anthonyshew Sorry, I didn't realize y'all were blocked on me. I have fixed any conflicts. Let me know if there's any issues. I ran the test suite again and saw no errors. |
Removed dependencies detected. Learn more about Socket for GitHub ↗︎ 🚮 Removed packages: npm/@types/eslint@8.4.6 |
@jeremy-code No worries. I went on parental leave so I wasn't able to come back and review sooner - and I neglected to let anyone know to come review this one. Totally my fault! I'm trying this out now in a However, I'm not sure that I'm configuring things right. I haven't had a chance to work with the new ESLint configuration format, so it might be silently failing. Do you have an example repo where I can hand test this? |
Oh so that's what you meant by example repo -- I thought you just meant the ESLint config file. The above is a quick and (very) dirty proof of concept to show it works with the the environmental variable rule. The corresponding repo is here: jeremy-code/turborepo-test. If you're wondering why it's not underlining in VSCode, you have to enable "eslint.useFlatConfig" to true or have the ENV variable "ESLINT_USE_FLAT_CONFIG" for the ESLint extension. EDIT: I made some changes to try to make it a bit cleaner than it was previously. The corresponding repo is here: jeremy-code/turborepo-test. Here's a more thorough testing of it: The ENV variables error or don't error correctly with the exception of process.env.TEST_ENV_IN_DOT_ENV (I think this is a recent change so not sure whether this is expected?). Also, apps/docs uses the flat config and doesn't error. |
I'm getting |
Did you run pnpm run build beforehand (or more specifically tsup in
packages/eslint-plugin-turbo)? I just straight up copied-pasted all the
code necessary for the ESLint plugin just for a quick sanity check.
…On Tue, Nov 12, 2024 at 9:10 AM Anthony Shew ***@***.***> wrote:
I'm getting Error: Cannot find package
'/Users/anthonyshew/projects/debugs/turborepo-test/packages/eslint-config/node_modules/eslint-plugin-turbo/package.json'
imported from
/Users/anthonyshew/projects/debugs/turborepo-test/packages/eslint-config/index.mjs
in that repo. Do you know why that is?
—
Reply to this email directly, view it on GitHub
<#8606 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKKBKOXZQOJMA4OQRYPS44T2AIY6RAVCNFSM6AAAAABJ5CJDAGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINZRGEYTEOBTGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Oops, I thought I had done that but apparently not. This looks great! |
Sorry about my commits above. I messed up history and am getting back on track. |
Nono I am pretty certain it's my fault I thought (hoped?) I fixed these merge issues since the original commit was a bit of time ago. Let me see if I can make a new PR with a different branch |
…t-plugin-turbo` (#9426) ### Description - Add "flat/recommended" config to `eslint-plugin-turbo` - Add `meta` property to plugin - Update README.md accordingly with information on using flat config - Add tests for flat config in `__tests__/cwdFlat.test.ts` ### Testing Instructions Run the following command: ```shell pnpm run test --filter=eslint-plugin-turbo ``` See #8606 Co-authored-by: Anthony Shew <anthony.shew@vercel.com>
Description
eslint-plugin-turbo
meta
property to plugin__tests__/cwdFlat.test.ts
Testing Instructions
Run the following command:
pnpm run test --filter=eslint-plugin-turbo