Skip to content

add lint command to react-scripts #11556

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
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

KurtGokhan
Copy link

@KurtGokhan KurtGokhan commented Oct 17, 2021

This PR adds ability to run eslint with react-scripts lint command. It runs the eslint with the same config as build command. Unlike the previous PR attempts, this one does not accept CLI arguments and is more opinionated just like the build command.

Note: This works with npm, yarn, yarn berry and probably every other package manager.

Related issue: #1217
Related PRs: #2729 #3850 #2625

@KurtGokhan
Copy link
Author

Is there something I can do to make this PR more appealing? @iansu @mrmckeb tagging you because you are reviewers.

@KurtGokhan
Copy link
Author

Removed lint script from package.json as per this comment
Also updated to latest upstream.

Tested a bit more with Yarn PnP. It requires nodeLinker and it gets a bit more complicated when you try to use custom eslint plugins. So it is not perfect. But this PR generally upholds the "one dependency" goal.

@KurtGokhan
Copy link
Author

I discovered that @rushstack/eslint-patch does not work well with yarn workspaces.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants