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

Adds no-redeclare to our rules #21

Merged
merged 1 commit into from Jul 9, 2015
Merged

Adds no-redeclare to our rules #21

merged 1 commit into from Jul 9, 2015

Conversation

dominicbarnes
Copy link
Contributor

When we deployed the app, a bug I introduced in segmentio/app@e3fa8a1886cb17e8a3765d70c215b42591729c0d prevented the page from loading for all users. We needed to rollback, and I introduced a fix segmentio/app@7fb59a0602d55d8095c249d583fab6ddd75a975d that has fixed the issue.

The problem was that I accidentally created a conflicting variable in the global scope for that module. (var up top, function way later) By adding no-redeclare, this will catch that same problem in the future. As noted in eslint/eslint#2953, this has already been fixed in master, so now we just await a new release. In the meantime, adding this rule will still be a good idea as it will catch other similar problems.

When we deployed the app, a bug I introduced in segmentio/app#e3fa8a1886cb17e8a3765d70c215b42591729c0d prevented the page from loading for all users. We needed to rollback, and I introduced a fix segmentio/app#7fb59a0602d55d8095c249d583fab6ddd75a975d that has fixed the issue.

The problem was that I accidentally created a conflicting variable in the global scope for that module. (`var` up top, `function` way later) By adding `no-redeclare`, this will catch that same problem in the future. As noted in eslint/eslint#2953, this has already been fixed in `master`, so now we just await a new release. In the meantime, adding this rule will still be a good idea as it will catch other similar problems.
@ndhoule
Copy link
Contributor

ndhoule commented Jul 9, 2015

haha one of the many reasons I dislike hoisting and function declarations, makes this kind of error so easy 😿

ndhoule pushed a commit that referenced this pull request Jul 9, 2015
Adds no-redeclare to our rules
@ndhoule ndhoule merged commit d4519b6 into master Jul 9, 2015
@ndhoule
Copy link
Contributor

ndhoule commented Jul 9, 2015

@travisjeffery travisjeffery deleted the add/no-redeclare branch July 9, 2015 19:51
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.

None yet

2 participants