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

Update eslint config to extend more default rules #1035

Merged
merged 2 commits into from
May 30, 2018
Merged

Conversation

klingerf
Copy link
Member

In this branch, I'm enabling more eslint rules for our react code by extending the airbnb and promise presets. I've overridden some of the rules that don't work very well with our setup, and I've converted some of our existing warn rules to error, so that we'll start failing builds when the rules are broken.

Fixes #1004.

@klingerf klingerf self-assigned this May 29, 2018
Copy link
Contributor

@grampelberg grampelberg left a comment

Choose a reason for hiding this comment

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

Looks like a great improvement. I'm definitely on board.

I don't think it should be part of this PR, but it would be nice to move the social icons into imports so that we don't have raw SVG sitting around in code.

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
Unfortunately, using _.pick to pull attributes out of the component
state isn't recognized as using those attributes by the
react/no-unused-state eslint rule. More info here:

jsx-eslint/eslint-plugin-react#1626

Rather than disable the rule entirely, I'm removing the one instance
where we were picking attributes from state.

Signed-off-by: Kevin Lingerfelt <kl@buoyant.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants