-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
2 changed files
with
110 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
{ | ||
"$id": "https://json.schemastore.org/luaurc.json", | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"additionalProperties": false, | ||
"type": "object", | ||
"properties": { | ||
"languageMode": { | ||
"title": "Type checking mode", | ||
"description": "A option that will affect which errors will be detected.", | ||
"default": "nonstrict", | ||
"examples": [ | ||
"strict" | ||
], | ||
"type": "string", | ||
"enum": ["strict", "nonstrict", "nocheck"] | ||
}, | ||
"lintErrors": { | ||
"title": "Report lint errors", | ||
"description": "A boolean that controls whether lint issues are reported as errors or warnings.", | ||
"default": "false", | ||
"examples": [ | ||
"true" | ||
], | ||
"type": "boolean" | ||
}, | ||
"typeErrors": { | ||
"title": "Report type errors", | ||
"description": "A boolean that controls whether type issues are reported as errors or warnings.", | ||
"default": "true", | ||
"examples": [ | ||
"false" | ||
], | ||
"type": "boolean" | ||
}, | ||
"globals": { | ||
"title": "Extra global values", | ||
"description": "An array of strings where each string names a global that the type checker and linter must assume is valid and of type any.", | ||
"examples": [ | ||
[ "describe", "it", "expect" ], | ||
[ "warn" ] | ||
], | ||
"type": "array", | ||
"items": { "type": "string", "pattern": "^[a-zA-Z_]\\w*" } | ||
}, | ||
"aliases": { | ||
"title": "Require path aliases", | ||
"description": "The path is resolved by first checking if the first word is an alias defined in a .luaurc file. If so, we perform a string substitution.", | ||
"examples": [ | ||
{ "Roact": "C:/LuauModules/Roact-v1.4.2" }, | ||
{ "@lib": "packages/lib" } | ||
], | ||
"type": "object", | ||
"additionalProperties": false, | ||
"patternProperties": { | ||
"^(?!\\.{1,2}$)(?!.*\\/)[a-zA-Z0-9\\-\\._]+$": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"lint": { | ||
"title": "Lints to enable", | ||
"description": "Points to an object that maps string literals that correspond to the names of linting rules (see https://luau-lang.org/lint), or \"*\" that means \"all rules\", to a boolean (to enable/disable the lint)", | ||
"examples": [ | ||
{ "*": false, "FormatString": true }, | ||
{ "LocalShadow": false } | ||
], | ||
"$comment": "source: https://github.com/luau-lang/luau/blob/master/Config/include/Luau/LinterConfig.h", | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"*": { "type": "boolean" }, | ||
"UnknownGlobal": { "type": "boolean" }, | ||
"DeprecatedGlobal": { "type": "boolean" }, | ||
"GlobalUsedAsLocal": { "type": "boolean" }, | ||
"LocalShadow": { "type": "boolean" }, | ||
"SameLineStatement": { "type": "boolean" }, | ||
"MultiLineStatement": { "type": "boolean" }, | ||
"LocalUnused": { "type": "boolean" }, | ||
"FunctionUnused": { "type": "boolean" }, | ||
"ImportUnused": { "type": "boolean" }, | ||
"BuiltinGlobalWrite": { "type": "boolean" }, | ||
"PlaceholderRead": { "type": "boolean" }, | ||
"UnreachableCode": { "type": "boolean" }, | ||
"UnknownType": { "type": "boolean" }, | ||
"ForRange": { "type": "boolean" }, | ||
"UnbalancedAssignment": { "type": "boolean" }, | ||
"ImplicitReturn": { "type": "boolean" }, | ||
"DuplicateLocal": { "type": "boolean" }, | ||
"FormatString": { "type": "boolean" }, | ||
"TableLiteral": { "type": "boolean" }, | ||
"UninitializedLocal": { "type": "boolean" }, | ||
"DuplicateFunction": { "type": "boolean" }, | ||
"DeprecatedApi": { "type": "boolean" }, | ||
"TableOperations": { "type": "boolean" }, | ||
"DuplicateCondition": { "type": "boolean" }, | ||
"MisleadingAndOr": { "type": "boolean" }, | ||
"CommentDirective": { "type": "boolean" }, | ||
"IntegerParsing": { "type": "boolean" }, | ||
"ComparisonPrecedence": { "type": "boolean" }, | ||
"RedundantNativeAttribute": { "type": "boolean" } | ||
} | ||
} | ||
} | ||
} |