Skip to content

Conversation

@yeeplusplus
Copy link

Closes #8

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant