Skip to content
This repository was archived by the owner on Nov 16, 2023. It is now read-only.

expose exclude config #27

Merged
merged 1 commit into from
Jan 2, 2019
Merged
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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ You can either configure the TSLint extension using a `tsconfig` or `jsconfig` a

* `tslint.ignoreDefinitionFiles` - Control if TypeScript definition files should be ignored. Default is `true`.

* `tslint.exclude` - A glob or an array of globs. Any file matching these globs will not be linted.

* `tslint.alwaysShowRuleFailuresAsWarnings` - Always show rule failures as warnings, ignoring the severity configuration in the tslint.json configuration.

* `tslint.suppressWhileTypeErrorsPresent` - Suppress tslint errors from being reported while other errors are present.
Expand Down
14 changes: 14 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,20 @@
"type": "boolean",
"description": "Control if TypeScript definition files should be ignored."
},
"tslint.exclude": {
"description": "A glob or an array of globs. Any file matching these globs will not be linted.",
"anyOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"tslint.alwaysShowRuleFailuresAsWarnings": {
"type": "boolean",
"description": "Always show rule failures as warnings, independent of the tslint configuration."
Expand Down
14 changes: 14 additions & 0 deletions schemas/tsconfig.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,20 @@
"default": true,
"description": "Control if TypeScript definition files should be ignored. Default is `true`."
},
"exclude": {
"description": "A glob or an array of globs. Any file matching these globs will not be linted.",
"anyOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"alwaysShowRuleFailuresAsWarnings": {
"type": "boolean",
"default": false,
Expand Down
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ interface SynchronizedConfiguration {
configFile?: string;
suppressWhileTypeErrorsPresent?: boolean;
jsEnable?: boolean;
exclude?: string | string[];
}

export async function activate(context: vscode.ExtensionContext) {
Expand Down Expand Up @@ -49,6 +50,7 @@ function getConfiguration(): SynchronizedConfiguration {
withConfigValue<boolean>(config, 'suppressWhileTypeErrorsPresent', value => { outConfig.suppressWhileTypeErrorsPresent = value; });
withConfigValue<boolean>(config, 'jsEnable', value => { outConfig.jsEnable = value; });
withConfigValue<string>(config, 'configFile', value => { outConfig.configFile = value; });
withConfigValue<string | string[]>(config, 'exclude', value => { outConfig.exclude = value; });

return outConfig;
}
Expand Down