Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/config-luauconfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ return {
linterrors = true,
typeerrors = true,
globals = {"expect"},
globaldefinitions = "./embed.d.luau",
aliases = {
src = "./src"
}
Expand Down Expand Up @@ -81,6 +82,7 @@ type LuauConfig = {
linterrors: boolean?,
typeerrors: boolean?,
globals: { string }?,
globaldefinitions: string?,
aliases: { [string]: string }?,
}

Expand Down
4 changes: 3 additions & 1 deletion docs/config-luaurc.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ applied. When multiple files are used, the file closer to the .lua file override
- `"lintErrors"`: a boolean that controls whether lint issues are reported as errors or warnings (off by default)
- `"typeErrors"`: a boolean that controls whether type issues are reported as errors or warnings (on by default)
- `"globals"`: extra global values; points to an array of strings where each string names a global that the type checker and linter must assume is valid and of type `any`
- `"globalDefinitions"`: string path to a local filename. This is a file in the same luau-like language embedded inside `Analysis/src/EmbeddedBuiltinDefinitions.cpp`, and provides additional global definitions to the typechecker and linter.

Example of a valid .luaurc file:

Expand All @@ -34,7 +35,8 @@ Example of a valid .luaurc file:
"languageMode": "nonstrict",
"lint": { "*": true, "LocalUnused": false },
"lintErrors": true,
"globals": ["expect"] // TestEZ
"globals": ["expect"], // TestEZ
"globalDefinitions" = "./embed.d.luau"
}
```

Expand Down