Editor setup
Bree's type checker is Luau's own, so any editor that runs luau-lsp shows the same type errors as bree check while you type. It needs two things: Bree's globals, and the plain Luau environment instead of Roblox's.
Bree's globals
bree init writes rules/bree.d.luau, which declares what Bree adds to Luau: int and invalid for rules, and test and expect for tests. Bree skips files ending in .d.luau, so it is safe in the rules directory. Commit it, and run bree init again after upgrading Bree to refresh it.
VS Code
Install the Luau Language Server extension and add to .vscode/settings.json:
{
"luau-lsp.platform.type": "standard",
"luau-lsp.types.definitionFiles": {
"bree": "rules/bree.d.luau"
}
}platform.type defaults to roblox, which adds Roblox's globals; standard leaves plain Luau. definitionFiles maps a name to a definitions file.
Other editors, and CI
luau-lsp's command line takes the same two settings, which is also how to check that the setup works:
$ luau-lsp analyze --platform standard --definitions @bree=rules/bree.d.luau rules/free_shipping.luau rules/free_shipping.test.luau
[INFO] Loading definitions file: @bree - rules/bree.d.luauIt exits 0 and prints nothing else when there are no problems. In other editors, pass the same two settings through the editor's luau-lsp configuration.
Strict mode
Bree checks every file in strict mode, whether or not it says so. luau-lsp follows the file: keep --!strict as the first line of each rule, module and test, as bree init does, so the editor checks the same way.
What the editor cannot know
The editor checks types. It does not run tests, and it does not apply Bree's own rules on top of Luau's: that a rule exports both Input and Output, that they use only types with a JSON meaning, that rule names are snake_case. bree check does all of that, so run it before you commit, or let the build do it.
Checked with luau-lsp 1.70.1.