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


    • Type: Task
    • Status: Closed
    • Priority: Minor
    • Resolution: Inactive
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:


      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.




            • Assignee:
              brian.chan Brian Chan
              greg.hurrell Greg Hurrell
              Engineering Assignee:
              Greg Hurrell
              Recent user:
              Tomas Polesovsky (topolik)
              Participants of an Issue:
            • Votes:
              0 Vote for this issue
              0 Start watching this issue


              • Created:


                Version Package