This repository has been archived by the owner on Aug 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathconfig.ts
68 lines (66 loc) · 1.92 KB
/
config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
export const config = {
"enableSemanticRules": {
"type": "boolean",
"title": "Enable semantic rules",
"description": "Allow passing a TypeScript program object to the linter. May negatively affect performance. See this page for details: https://palantir.github.io/tslint/usage/type-checking/",
"default": false,
"order": 1
},
"rulesDirectory": {
"type": "string",
"title": "Custom rules directory (absolute path)",
"default": "",
"order": 2
},
"fixOnSave": {
"title": "Fix errors on save",
"description": "Have tslint attempt to fix some errors automatically when saving the file.",
"type": "boolean",
"default": false,
"order": 3
},
"ignoreTypings": {
"type": "boolean",
"title": "Ignore typings files (.d.ts)",
"default": false,
"order": 4
},
"useLocalTslint": {
"type": "boolean",
"title": "Try to use the project's local tslint package, if it exists",
"default": true,
"order": 5
},
"useGlobalTslint": {
"type": "boolean",
"title": "Use the global tslint install",
"description": "If enabled, the global tslint installation will be used as a fallback, instead of the version packaged with linter-tslint.",
"default": false,
"order": 6
},
"globalNodePath": {
"type": "string",
"title": "Global node installation path",
"description": "The location of your global npm install. (Will default to `npm get prefix`.)",
"default": "",
"order": 7
}
}
export interface ConfigSchema {
enableSemanticRules: boolean,
rulesDirectory: string | null,
fixOnSave: boolean,
ignoreTypings: boolean,
useLocalTslint: boolean,
useGlobalTslint: boolean,
globalNodePath: string | null,
}
export const defaultConfig = Object.freeze({
enableSemanticRules: false,
rulesDirectory: "",
fixOnSave: false,
ignoreTypings: false,
useLocalTslint: true,
useGlobalTslint: false,
globalNodePath: "",
} as const)