'How to set storage rules so I can run my Firebase storage emulator?

When I run firebase emulators:start I have this error

Error: Cannot start the Storage emulator without rules file specified In firebase.json

Before installing Storage emulator, I can set the rule for Firestore like this

{
  "firestore": {
    "rules": "./functions/firestore.rules"
  },
  "functions": {
    "predeploy": [
      "npm --prefix \"$RESOURCE_DIR\" run lint",
      "npm --prefix \"$RESOURCE_DIR\" run build"
    ]
  },
  "emulators": {
    "auth": {
      "port": 9099
    },
    "functions": {
      "port": 5001
    },
    "firestore": {
      "port": 8080
    },
    "storage": {
      "port": 9199
    },
    "ui": {
      "enabled": true
    }
  }
}

I believe I have to set the rule for storage in here. But I don't know how. I can't find the docs for this



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source