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

Apply Prettier formatting overrides in liferay-portal

    Details

      Description

      Quoting from: https://issues.liferay.com/browse/IFI-1203

      There are some code conventions that are broadly used in liferay-portal in Java, such as having line breaks before "else" keywords etc and we'd like to explore the viability of making Prettier's output match those conventions.

      This may be difficult because Prettier is architected as an opinionated formatter (that is, only a minimum of things about its output are actually configurable). As such, we have only heavy-handed options available to us, such as forking the project, injecting a (forked) plugin, monkey-patching at runtime, post-processing etc.

      The goal here is to do some exploratory research to determine which approach is likely to be cheapest and most robust. Once we have that we can evaluate if the juice is worth the squeeze. We'll want to weigh up development cost but also the reduced ability to take advantage of things like editor and IDE integrations which are widespread and all tailored to work with a standard, unmodified copy of Prettier.

      I explored a couple of options in that ticket. I'm creating this one so that I have an LPS I can attach and show what this could look like in liferay-portal.

        Attachments

          Activity

            People

            • Assignee:
              brian.chan Brian Chan
              Reporter:
              greg.hurrell Greg Hurrell
              Engineering Assignee:
              Greg Hurrell
              Recent user:
              Enterprise Release HU
              Participants of an Issue:
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Packages

                Version Package
                7.2.X
                Master