Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-108275

Qmlformat issue with js objects keys

    XMLWordPrintable

Details

    • 115916f21 (dev), aa603e154 (6.6)

    Description

      The following code:

      import QtQuick 2
      
      Rectangle {
          property int a: {
              let b = {
                  name: "Arthur",
                  age: 14
              };
          }
      }
      

      is converted to:

      import QtQuick 2
      
      Rectangle {
          property int a: {
              let b = {
                  "name": "Arthur",
                  "age": 14
              };
          }
      }
      

      The issue is that the js object keys are escaped, ideally according to various js code style guide this should only be escaped when needed. See https://eslint.org/docs/latest/rules/quote-props

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qtqmlteam Qt Qml Team User
            carl Carl Schwan
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes