Skip to content

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