Skip to content

Disable eslint rules that can conflict with prettier #1421

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

Merged

Conversation

IvanGoncharov
Copy link
Member

Continuation of 40f73fd
Rules was disabled using this tool:
https://github.com/prettier/eslint-config-prettier#cli-helper-tool

@IvanGoncharov
Copy link
Member Author

"flowtype/space-before-type-colon": [2, "never"],
"flowtype/space-before-generic-bracket": [2, "never"],
"flowtype/union-intersection-spacing": [2, "always"],
"flowtype/space-after-type-colon": 0,
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we get the same result if we just remove these lines completely? If so, it makes it a lot easier to parse the file, so let's delete them all.

If instead they default to 1, then yeah this is the way to go.

Copy link
Member Author

Choose a reason for hiding this comment

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

@mjmahone It's useful to keep them as the reference for adding new rules.
I plan to add a bunch of new rules added in the past couple years and without having explicitly disabled ones it will make this task very hard.
Ideally, we need to check for new rules on every eslint update so I think we need to keep zeros.
And this was done previously for other rules: 40f73fd

I plan to cleanup eslint config more in a separate PR and swith to off, warn and error instead of 0,1 and 2.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds good! Thanks for the context.

@mjmahone mjmahone merged commit 508760e into graphql:master Jul 16, 2018
@IvanGoncharov IvanGoncharov deleted the eslintPreventConflictsWithPrettier branch July 18, 2018 15:02
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.

3 participants