Skip to content

Commit

Permalink
Expand tslint schema for member-ordering, no-consecutive-blank-lines,…
Browse files Browse the repository at this point in the history
… and no-inferrable-types. Fixes SchemaStore#249
  • Loading branch information
rikoe committed Dec 1, 2016
1 parent d1c4941 commit 84b4baa
Showing 1 changed file with 78 additions and 21 deletions.
99 changes: 78 additions & 21 deletions src/schemas/json/tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,51 @@
"member-ordering": {
"description": "Enforces chosen member ordering",
"type": "array",
"items": {
"type": [ "object", "boolean", "string" ]
}
"items": [
{
"type": "boolean"
},
{
"type": "object",
"properties": {
"order": {
"oneOf": [
{
"type": "string",
"enum": [
"fields-first",
"statics-first",
"instance-sandwich"
]
},
{
"type": "array",
"items": {
"type": "string",
"enum": [
"public-static-field",
"public-static-method",
"protected-static-field",
"protected-static-method",
"private-static-field",
"private-static-method",
"public-instance-field",
"protected-instance-field",
"private-instance-field",
"constructor",
"public-instance-method",
"protected-instance-method",
"private-instance-method"
]
},
"maxLength": 13
}
]
}
},
"additionalProperties": false
}
]
},
"new-parens": {
"description": "Requires parentheses when invoking a constructor via the `new` keyword",
Expand Down Expand Up @@ -222,10 +264,18 @@
},
"no-consecutive-blank-lines": {
"description": "Disallows one or more blank lines in a row",
"type": "array",
"items": {
"type": [ "boolean", "integer" ]
}
"oneOf": [
{
"type": "boolean"
},
{
"type": "array",
"items": {
"type": [ "boolean", "integer" ]
}
}

]
},
"no-console": {
"description": "Disallows access to the specified functions on console",
Expand Down Expand Up @@ -286,10 +336,17 @@
},
"no-inferrable-types": {
"description": "Disallows explicit type declarations for variables or parameters initialized to a number, string, or boolean",
"type": "array",
"items": {
"enum": [ true, false, "ignore-params" ]
}
"oneOf": [
{
"type": "boolean"
},
{
"type": "array",
"items": {
"enum": [ true, false, "ignore-params" ]
}
}
]
},
"no-internal-module": {
"description": "Disallows internal module, use namespace instead",
Expand Down Expand Up @@ -440,10 +497,10 @@
},
"semicolon": {
"description": "Enforces semicolons at the end of every statement",
"type": "array",
"items": {
"enum": [ true, false, "always", "never"]
}
"type": "array",
"items": {
"enum": [ true, false, "always", "never"]
}
},
"switch-default": {
"description": "Enforces a default case in switch statements",
Expand All @@ -469,14 +526,14 @@
"type": "array",
"items": {
"enum": [
true,
true,
false,
"call-signature",
"parameter",
"arrow-parameter",
"property-declaration",
"variable-declaration",
"member-variable-declaration"
"parameter",
"arrow-parameter",
"property-declaration",
"variable-declaration",
"member-variable-declaration"
]
}
},
Expand Down

0 comments on commit 84b4baa

Please sign in to comment.