Affects Version/s: None
Fix Version/s: None
Component/s: Frontend Infrastructure
As explained in https://issues.liferay.com/browse/LPS-97406 we will be creating tickets for the removal of lint suppressions that we added in
LPS-97079. This is a sample ticket to serve as an example of what they could look like.
This ticket is specifically for dealing with the suppressions in the frontend-js/frontend-js-web module, and the steps are:
- Run "yarn checkFormat" inside the module to see the warnings.
- Make code changes necessary to remove the suppression comments which all start with the word "eslint".
- Re-run "yarn checkFormat" to confirm that the warnings are now gone.
- Run tests and do manual QA of your module to confirm that you haven't broken everything.
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.