Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Bug(repo): yarn lint-fix in this repository doesn't work on the eslint-plugin package #8733

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

Open
4 tasks done
abrahamguo opened this issue Mar 19, 2024 · 1 comment
Open
4 tasks done
Labels
accepting prs Go ahead, send a pull request that resolves this issue bug Something isn't working repo maintenance things to do with maintenance of the repo, and not with code/docs

Comments

@abrahamguo
Copy link
Contributor

abrahamguo commented Mar 19, 2024

Before You File a Bug Report Please Confirm You Have Done The Following...

  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest version of the packages.
  • I have searched for related issues and found none that matched my issue.
  • I have read the FAQ and my problem is not listed.

Issue Description

In this repo's package.json => scripts, it has

"lint-fix": "yarn lint --fix",
"lint": "npx nx lint eslint-plugin --skip-nx-cache && npx nx run-many --target=lint --parallel --exclude eslint-plugin"

Running yarn lint-fix does not work for the eslint-plugin package (the first half of the command), but it works for any other package (the second half of the command).
Changing the first half of the command to be npx nx run eslint-plugin:lint --skip-nx-cache does not resolve the issue.

Reproduction Repository Link

https://github.com/typescript-eslint/typescript-eslint

Repro Steps

  1. clone the repo
  2. yarn
  3. add if (Math.random()) console.log(); to packages/eslint-plugin/src/index.ts
  4. yarn lint-fix should add curly braces to the if, and report the console.log. Instead, it reports both errors and fixes neither.
  5. Adding this code to src/index.ts in any other package works properly.

Versions

Latest main

@abrahamguo abrahamguo added bug Something isn't working triage Waiting for team members to take a look labels Mar 19, 2024
@abrahamguo abrahamguo changed the title Bug(repo): yarn lint-fix doesn't work on the eslint-plugin package Bug(repo): yarn lint-fix in this repository doesn't work on the eslint-plugin package Mar 19, 2024
@JoshuaKGoldberg JoshuaKGoldberg added repo maintenance things to do with maintenance of the repo, and not with code/docs accepting prs Go ahead, send a pull request that resolves this issue and removed triage Waiting for team members to take a look labels Mar 25, 2024
@abarghoud
Copy link

Hello, I would like to contribute to solving this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepting prs Go ahead, send a pull request that resolves this issue bug Something isn't working repo maintenance things to do with maintenance of the repo, and not with code/docs
Projects
None yet
3 participants