anboralabs / intellij-firebase-highlighter

A Syntax Highlighter for Firebase Rules.
https://plugins.jetbrains.com/plugin/15189-firebase-rules
MIT License
27 stars 6 forks source link

Bug: plugin incorrect requires semicolons #115

Closed webbertakken closed 1 year ago

webbertakken commented 1 year ago

Consider the following correct syntax of firebase storage rules:

image

The plugin marks it as incorrect because it's picky about having semicolons.

image

How to reproduce:

Open the editor on Windows 11, WebStorm 2023.1, Plugin 2023.4.1 and paste the following in a file called storage.rules.

rules_version = '2';
service firebase.storage {
  match /b/{bucket}/o {
    match /{allPaths=**} {
      allow read, write: if false
    }

    match /users/{userId}/songs/{songId}/parts/{partId} {
      allow read: if userId == request.auth.uid
      allow write: if userId == request.auth.uid
        && request.resource.size < 8 * 1024 * 1024
        && request.resource.contentType.matches('audio/.*')
    }
  }
}
dalgarins commented 1 year ago

Issue cloned to https://github.com/anboralabs/intellij-firebase/issues/56

dalgarins commented 1 year ago
Screenshot 2023-04-28 at 5 47 20 PM

thanks the fix will be available on next version: 2023.4.2

dalgarins commented 1 year ago

@webbertakken the update is available.

webbertakken commented 1 year ago

Thank you very much! Will test it ASAP.

webbertakken commented 1 year ago

I can confirm that this now works as expected.