Details
-
Epic
-
Status: Closed
-
Minor
-
Resolution: Completed
-
None
-
None
-
To Do
Description
In we created a smallish number of lint suppressions — that is, we marked some possible problems in the code as "warnings" rather than "errors" — in order to enable us to turn on linting in CI.LPS-97079
The full list of modules containing suppressions is here: https://gist.github.com/wincent/0279c6be9340ca398c4d3f9e227ce17e
And the full list of "errors" that are turned into "warnings" by the suppressions is here: https://gist.github.com/wincent/fa8d1acf9ac44eebacdd9e19930d9df2
The goal of this epic is to remove all existing suppressions so we can rely on our linting safety net moving forward.
What kind of code changes may be necessary?
- "for..of loops are not allowed: no-for-of-loops/no-for-of-loops": rewrite the code without the "for..of" construct.
- "Empty block statement: no-empty": put something in the block statement, even if it just a comment.
- "Unnecessary escape character: no-useless-escape": remove the escape.
- "'global' is not defined: no-undef": analyze to determine whether "global" can be safely added to the list of globals in this region.
- "'navigationStartX' is constant: no-const-assign": change "const" to "let" once you've determined the code is correct.
- "'options' is assigned a value but never used: no-unused-vars": mark unused parameters with a leading underscore (eg. "_options") or remove them if appropriate.
- "'Modal' is defined but never used: no-unused-vars": analyze to determine whether an import is being included for its side-effect rather than the value it returns; if it is, don't assign the value; otherwise, delete the import.