-
Notifications
You must be signed in to change notification settings - Fork 142
Fixed last 10 lint warnings. #81
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -87,9 +87,9 @@ describe('Evaluator', () => { | |
| currentProjectGetter = [ | ||
| ['projects'], | ||
| ['session', 'currentProjectId'], | ||
| (projects, currentProjectId) => { | ||
| (allProjects, currentProjectId) => { | ||
| currentProjectSpy() | ||
| return projects.get(currentProjectId) | ||
| return allProjects.get(currentProjectId) | ||
| }, | ||
| ] | ||
| currentProjectDescriptionGetter = [ | ||
|
|
@@ -126,7 +126,7 @@ describe('Evaluator', () => { | |
| it('should prevent nested evaluate calls', () => { | ||
| var nestedEvaluateGetter = [ | ||
| currentProjectGetter, | ||
| (projects) => { | ||
| () => { | ||
| return evaluator.evaluate(state, currentProjectDescriptionGetter) | ||
| }, | ||
| ] | ||
|
|
@@ -168,8 +168,8 @@ describe('Evaluator', () => { | |
| var currentProjectGetter = [ | ||
| ['projects'], | ||
| ['session', 'currentProjectId'], | ||
| (projects, currentProjectId) => { | ||
| return projects.get(currentProjectId) | ||
| (allProjects, currentProjectId) => { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Im not really a fan of this rule, we dont write a lot of large JS files with nested closures and sometimes using the same variable name is more correct than a "new" one.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can change rules and fix the respective lint issues in future PRs as we change our minds about styling rules. 👍 |
||
| return allProjects.get(currentProjectId) | ||
| }, | ||
| ] | ||
|
|
||
|
|
@@ -179,7 +179,7 @@ describe('Evaluator', () => { | |
| var result2 = evaluator.evaluate(state, currentProjectGetter) | ||
| expect(result2).toBe(proj1) | ||
| // update state test the `hasStaleValue` codepath | ||
| var state1 = state.update('projects', projects => projects.set(3, proj3)) | ||
| var state1 = state.update('projects', allProjects => allProjects.set(3, proj3)) | ||
|
|
||
| var result3 = evaluator.evaluate(state1, currentProjectGetter) | ||
| expect(result3).toBe(proj1) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since this is part of the tooling you can just use lodash here.