Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected formatting with chained SOQL expression #573

Open
no-stack-dub-sack opened this issue Jun 23, 2022 · 0 comments
Open

Unexpected formatting with chained SOQL expression #573

no-stack-dub-sack opened this issue Jun 23, 2022 · 0 comments

Comments

@no-stack-dub-sack
Copy link
Contributor

If you omit the > 0 here, it formats as expected

# Prettier options (if any):
printWidth: 100

Input:

      Boolean hasFoo = [
        SELECT Id
        FROM Something__c
        WHERE Account__c = :accountId AND Name LIKE '%_FOO'
      ].size() > 0;

Actual output:

      Boolean hasFoo =
        [SELECT Id FROM Something__c WHERE Account__c = :accountId AND Name LIKE '%_FOO'].size() >
        0;

Expected output:

      Boolean hasTrainingUsernames = [
        SELECT Id
        FROM Something__c
        WHERE Account__c = :accountId AND Name LIKE '%_FOO'
      ]
      .size() > 0;

Additional information (please fill this out):

  • OS: Win 10
  • Version: 1.10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant