-
Notifications
You must be signed in to change notification settings - Fork 30
Fix linting #9
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
Open
yeeplusplus
wants to merge
22
commits into
lucidworks:dev
Choose a base branch
from
yeeplusplus:fix-linting
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Fix linting #9
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The "white" and "quotmark" rules have been deprecated in newer versions of JSHint. It is now recommended to use ESLint for enforcing style conventions. The 1.0.0 version of JSHint no longer tests for these rules.
JSHint complains when a variable or function is used before it is defined. This change tells JSHint to ignore specific instances of this behavior.
There are many instances in this file where a variable or function is defined after it is used. Rather than tell JSHint explicitly each time, it is simpler to ignore all latedefs in the whole file. This also avoids having to refactor the entire file to fix this type of linting error. Such a refactor introduces an unnecessary regression risk.
Tell JSHint that the angular object is defined elsewhere. This will suppress linting errors related to an undefined angular variable.
The field variable is defined multiple times in the same scope. This change replaces the multiple definitions with one near the top of the scope.
The query variable is definied multiple times in the same scope. This change replaces the multiple definitions with one near the top of the scope.
The unitFullString variable is defined multiple times in the same scope. This change replaces the multiple definitions with one near the top of the scope.
Function declarations should not be in blocks; they're function-scoped.
This suppresses the JSHint error related to the variables being used out of scope.
This is to comply with the style guide.
The clientResp variable is defined multiple times in the same scope. This change replaces the multiple definitions with one near the top of the scope.
The variables i, facetArray, and facetObject were declared in multiple locations in the same scope.
JSHint complains if lines are too long, so this change refactors those long lines into several shorter ones. This also simplifies the logic, making it easier to reason about.
The buckets variable is defined multiple times in the same scope. This change replaces the multiple definitions with one near the top of the scope.
Function declarations should not be in blocks; they're function-scoped.
Object short notation is an ES6 feature.
JSHint complains about the 'val' variable being used before it is declared. This change simply moves the getX() function below the declaration of 'val' to suppress this error.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #8