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

Require curly brackets around if statements #2505

Merged
merged 3 commits into from
Nov 25, 2020
Merged

Conversation

mariusandra
Copy link
Collaborator

Changes

This might be a controversial change... :)

  • Adds curly: error to .eslintrc
  • Runs eslint --fix + prettier on all code

I find it much easier to read the code if all if statements use curly brackets.

Compare:

Screenshot 2020-11-25 at 11 27 22

vs:

Screenshot 2020-11-25 at 11 27 24

Checklist

  • All querysets/queries filter by Organization, by Team, and by User
  • Django backend tests
  • Jest frontend tests
  • Cypress end-to-end tests

@timgl timgl temporarily deployed to posthog-curly-brackets-awnnefn November 25, 2020 10:29 Inactive
@mariusandra mariusandra temporarily deployed to posthog-curly-brackets-awnnefn November 25, 2020 16:17 Inactive
@mariusandra mariusandra merged commit 23f129e into master Nov 25, 2020
@mariusandra mariusandra deleted the curly-brackets branch November 25, 2020 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants