What is the name of the language used for Cloud Firestore security rules?

前端 未结 3 528
感动是毒
感动是毒 2021-02-08 03:21

I would like to know the name of the syntax used for the Cloud Firestore security rules as described at https://firebase.google.com/docs/firestore/security/get-started?authuser=

3条回答
  •  离开以前
    2021-02-08 04:09

    For IntelliJ IDEs, I found the Set File Type Associations immensely useful for adding syntax highlighting to the .rules file.

    You don't need to create an IDE plugin. Just check some boxes, mention some keywords. I chose this:

    Tab 2: true, false

    Tab 3: !==,==,&&,||

    Tab 4: !,(,)

    The result is a rather pleasant, imho:

    What it does not provide is collapsing of rules, scoping of functions (autocomplete), or anything else that needs syntax awareness. But it seems way better than no syntax highlight, at all.

    Edit: Unfortunately, in order to provide a tab/spaces policy for .rules files, "you have to develop your own language plugin." (source) It seems there's still need for a proper language plugin. :(

提交回复
热议问题