Google cloud firestore 如何使用prettier之类的工具格式化firestore.rules文件?

Google cloud firestore 如何使用prettier之类的工具格式化firestore.rules文件?,google-cloud-firestore,firebase-security,Google Cloud Firestore,Firebase Security,例如,我有以下规则: function isValidTimestamp(timestampValue){return request.time==timestampValue;} match /users/{userID}{allow get: if resource.auth != null;allow create:if isValidTimeStamp(request.resource.data.createdAt)} 我想要这样的东西: function isVal

例如,我有以下规则:

    function isValidTimestamp(timestampValue){return request.time==timestampValue;}

    match /users/{userID}{allow get: if resource.auth != null;allow create:if isValidTimeStamp(request.resource.data.createdAt)}
我想要这样的东西:

function isValidTimestamp(timestampValue){  
  return request.time == timestampValue;
}

match /users/{userID} {
  allow get: if resource.auth != null; 
  allow create: if isValidTimeStamp(request.resource.data.createdAt);
}

是否可以对该文件进行lint/格式化?

不幸的是,目前还没有一种软件能够像Prettier那样格式化Firestore规则的结构。正如在Github上的这段对话中提到的,讨论如何改进Prettier以格式化Firebase规则(包括Firestore规则)似乎是不可能的,但目前看来,这确实是不可能的。(我真的希望它也能起作用,这会非常有帮助)

让我知道,如果信息澄清你