### Summary
`minimatch.escape()` is documented to "Escape all magic characters in a glob pattern, so that it will only ever match literal strings." (README, section `minimatch.escape(pattern, options = {})`). In minimatch 11.0.5 (latest release; `main` is at the `v11.0.5` tag, commit `ea0a4a6`) four classes of input break that contract:
1. A leading `!` is left unescaped. `escape('!secret.txt')` returns `'!secret.txt'`, which is a negated pattern. It matches every path except `secret.txt`, for example `passwd`. This holds in POSIX mode and in `windowsPathsNoEscape` mode.
2. A leading `#` is left unescaped. `escape('#notes.md')` returns `'#notes.md'`, which is a comment pattern. It matches nothing, including `#notes.md`. This holds in both modes.
3. An escaped backslash does not survive brace expansion. For the user text `x\*` (x, backslash, star), `escape()` returns `x\\\*`. Alone, that pattern matches only the literal. When the pattern also contains a brace group, brace-expansion turns `\\` back into a single `\`, so the `*` becomes a live wildcard. The brace group can come from the caller (`escape(u) + '.{js,ts}'`) or, with default options, from the user text itself (`escape('x\\*{,}')`).
4. With `{ windowsPathsNoEscape: true, magicalBraces: true }`, `escape('x{a,b}')` returns `x[{]a,b[}]`. Brace-expansion does not know `[...]` classes and expands it to `x[]a]` and `x[b[]`. The pattern matches `xa` and does not match `x{a,b}`.
The README documents negation and comments f