Skip to content
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

Configurable eslint-loader #6973

Closed
wants to merge 2 commits into from
Closed

Configurable eslint-loader #6973

wants to merge 2 commits into from

Conversation

caub
Copy link

@caub caub commented May 3, 2019

This a very simple, and backward compatible PR to allow to a custom .eslintrc to be used

ignore: false,
useEslintrc: false,
quiet: !!process.env.RS_ESLINT_QUIET,
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

configurable quiet as well, for example when upgrading an old project, you can have thousands of warnings temporarily

extends: [require.resolve('eslint-config-react-app')],
},
useEslintrc: !!process.env.RS_ESLINTRC,
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RS_ESLINTRC is the main point of this PR, when this env var is defined, baseConfig is not used, and a local .eslintrc is used

packages/react-scripts/scripts/start.js Outdated Show resolved Hide resolved
@FezVrasta
Copy link
Contributor

What's the point of adding this behind a env variable? Couldn't we simply detect the existence of an eslintrc file and automatically enable it?

@ianschmitz
Copy link
Contributor

Before merging something like this in we will have to look into what options we have for extending our typescript-eslint config.

/cc @mrmckeb

.gitignore Outdated Show resolved Hide resolved
@caub
Copy link
Author

caub commented May 19, 2019

@FezVrasta I first tried to keep backward compatibility, but your idea looks better, I pushed a commit for this

@mrmckeb
Copy link
Contributor

mrmckeb commented May 21, 2019

Hi @caub, we've been discussing this PR - do you think it would cover most of your needs?
#7036

@caub
Copy link
Author

caub commented May 21, 2019

@mrmckeb Thanks, yes it does

@mrmckeb
Copy link
Contributor

mrmckeb commented May 23, 2019

I'm closing this off for now in favour of the PR discussed, and am definitely open to extending that to support more ESLint formats in the near future.

Thanks for your work here.

@mrmckeb mrmckeb closed this May 23, 2019
@lock lock bot locked and limited conversation to collaborators May 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants