Skip to content
This repository has been archived by the owner on Oct 26, 2023. It is now read-only.

Update #3

Merged
merged 9 commits into from
Jul 15, 2018
Merged

Update #3

merged 9 commits into from
Jul 15, 2018

Conversation

nd0ut
Copy link
Member

@nd0ut nd0ut commented Jul 10, 2018

Changed rules:

  • Throw error when using ==
  • Do not throw error when reassign variables like: acc, res, req, e.
  • Allow 'x', 'y', 'e', 'i', 'j' variable names
  • Increase max-nested-callbacks from 2 to 3
  • Increase max-params from 3 to 4
  • Increase max-statements from 10 to 12
  • Allow inline comments because It is sometimes faster and more obvious to put comments immediately following code (c) eslint docs
  • Allow ++ in for loops
  • Indent 2 spaces inside switch-case
  • Throw error when using undefined variables

Added react rules from https://github.com/uploadcare/webclient-frontend

@Zmoki @bautrukevich
Do you have any suggestions that should be added to this PR? I mean can you remember any rules that you would like to enable, disable or change?

@nd0ut nd0ut requested review from Zmoki and bautrukevich July 10, 2018 15:02
@bautrukevich
Copy link

If we can I want to change the rule for switch and add tabulation for case as normal.

@bautrukevich
Copy link

And one more thing: "Allow 'x', 'y', 'e', 'i', 'j' variable names" — may be keep only x, y, i? I think we don't need a lot of this short variables.

@bautrukevich
Copy link

e — it's for event? j – for iteration? we don't have and maybe don't need to have more than 1 iterator in 1 file.

@nd0ut
Copy link
Member Author

nd0ut commented Jul 13, 2018

@bautrukevich yep, e for event, i,j for iteration. I would also add a,b or even disable this rule at all as airbnb did.

@nd0ut nd0ut merged commit 916bba5 into master Jul 15, 2018
@nd0ut nd0ut deleted the update branch July 15, 2018 19:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants