Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-97686

Deal with lint suppressions in frontend-image-editor

    Details

      Description

      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.

      Basically, we downgraded "errors" to "warnings" in these 35 modules. The full list of warnings can be seen here.

      This ticket is specifically for dealing with the suppressions in the frontend-js/frontend-js-web module, and the steps are:

      1. Run "yarn checkFormat" inside the module to see the warnings.
      2. Make code changes necessary to remove the suppression comments which all start with the word "eslint".
      3. Re-run "yarn checkFormat" to confirm that the warnings are now gone.
      4. 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.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Packages

                  Version Package
                  7.2.X