This repository has been archived by the owner on Oct 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeno-configuration.ts
251 lines (182 loc) · 8.79 KB
/
deno-configuration.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
/** Represents a Deno configuration. Specified by https://deno.land/x/deno@v1.36.0/cli/schemas/config-file.v1.json?source */
export interface DenoConfiguration {
/** Instructs the TypeScript compiler how to compile .ts files. */
compilerOptions?: {
/** Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */
allowJs?: boolean;
/** Disable error reporting for unreachable code. */
allowUnreachableCode?: boolean;
/** Disable error reporting for unused labels. */
allowUnusedLabels?: boolean;
/** Enable error reporting in type-checked JavaScript files. */
checkJs?: boolean;
/** Differentiate between undefined and not present when type checking */
exactOptionalPropertyTypes?: boolean;
/* Enable experimental support for TC39 stage 2 draft decorators. */
experimentalDecorators?: boolean;
/** Specify what JSX code is generated. */
jsx?: 'preserve' | 'react' | 'react-jsx' | 'react-jsxdev' | 'react-native';
/** Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h' */
jsxFactory?: string;
/** Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
jsxFragmentFactory?: string;
/** Specify module specifier used to import the JSX factory functions when using jsx: 'react-jsx*'. */
jsxImportSource?: string;
/** Make keyof only return strings instead of string, numbers or symbols. Legacy option. */
keyofStringsOnly?: boolean;
/** Specify a set of bundled library declaration files that describe the target runtime environment. */
lib?: string[];
/** Do not truncate error messages. */
noErrorTruncation?: boolean;
/** Enable error reporting for fallthrough cases in switch statements. */
noFallthroughCasesInSwitch?: boolean;
/** Enable error reporting for expressions and declarations with an implied `any` type.. */
noImplicitAny?: boolean;
/** Ensure overriding members in derived classes are marked with an override modifier. */
noImplicitOverride?: boolean;
/** Enable error reporting for codepaths that do not explicitly return in a function. */
noImplicitReturns?: boolean;
/** Enable error reporting when `this` is given the type `any`. */
noImplicitThis?: boolean;
/** Disable adding 'use strict' directives in emitted JavaScript files. */
noImplicitUseStrict?: boolean;
/** Disable strict checking of generic signatures in function types. */
noStrictGenericChecks?: boolean;
/** Enable error reporting when a local variables aren't read. */
noUnusedLocals?: boolean;
/** Raise an error when a function parameter isn't read */
noUnusedParameters?: boolean;
/** Add `undefined` to a type when accessed using an index. */
noUncheckedIndexedAccess?: boolean;
/** Enable all strict type checking options. */
strict?: boolean;
/** Check that the arguments for `bind`, `call`, and `apply` methods match the original function. */
strictBindCallApply?: boolean;
/** When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
strictFunctionTypes?: boolean;
/** Check for class properties that are declared but not set in the constructor. */
strictPropertyInitialization?: boolean;
/** When type checking, take into account `null` and `undefined`. */
strictNullChecks?: boolean;
/** Disable reporting of excess property errors during the creation of object literals. */
suppressExcessPropertyErrors?: boolean;
/** Suppress `noImplicitAny` errors when indexing objects that lack index signatures. */
suppressImplicitAnyIndexErrors?: boolean;
};
/** The location of an import map to be used when resolving modules. If an import map is specified as an `--importmap` flag or using "imports" and "scopes" properties, they will override this value. */
importMap?: string;
/** A map of specifiers to their remapped specifiers. */
imports?: {
/** The key is the specifier or partial specifier to match, with a value that represents the target specifier. */
[k: string]: string;
};
/** Define a scope which remaps a specifier in only a specified scope */
scopes?: {
/** A definition of a scoped remapping. */
[k: string]: {
/** The key is the specifier or partial specifier to match within the referring scope, with a value that represents the target specifier. */
[k: string]: string;
};
};
/** List of files, directories or globs that will be ignored by all other configurations. Requires Deno 1.34 or later. */
exclude?: string[];
/** Configuration for linter */
lint?: {
/** List of files, directories or globs that will be linted. */
include?: string[];
/** List of files, directories or globs that will not be linted. */
exclude?: string[];
files?: {
/** List of files, directories or globs that will be linted. */
include?: string[];
/** List of files, directories or globs that will not be linted. */
exclude?: string[];
};
rules?: {
/** List of tag names that will be run. Empty list disables all tags and will only use rules from `include`. */
tags?: string[];
/** List of rule names that will be excluded from configured tag sets. If the same rule is in `include` it will be run. */
exclude?: string[];
/** List of rule names that will be run. Even if the same rule is in `exclude` it will be run. */
include?: string[];
};
/** The default report format to use when linting */
report?: 'pretty' | 'json' | 'compact';
};
/** Configuration for formatter */
fmt?: {
/** List of files, directories or globs that will be formatted. */
include?: string[];
/** List of files, directories or globs that will not be formatted. */
exclude?: string[];
files?: {
/** List of files, directories or globs that will be formatted. */
include?: string[];
/** List of files, directories or globs that will not be formatted. */
exclude?: string[];
};
/** Whether to use tabs (true) or spaces (false) for indentation. */
useTabs?: boolean;
/** The width of a line the printer will try to stay under. Note that the printer may exceed this width in certain cases. */
lineWidth?: number;
/** The number of characters for an indent. */
indentWidth?: number;
/** Whether to use single quote (true) or double quote (false) for quotation. */
singleQuote?: boolean;
/** Define how prose should be wrapped in Markdown files. */
proseWrap?: 'always' | 'never' | 'preserve';
/** Whether to prefer using semicolons. */
semiColons?: boolean;
options?: {
/** Whether to use tabs (true) or spaces (false) for indentation. */
useTabs?: boolean;
/** The width of a line the printer will try to stay under. Note that the printer may exceed this width in certain cases. */
lineWidth?: number;
/** The number of characters for an indent. */
indentWidth?: number;
/** Whether to use single quote (true) or double quote (false) for quotation. */
singleQuote?: boolean;
/** Define how prose should be wrapped in Markdown files. */
proseWrap?: 'always' | 'never' | 'preserve';
/** Whether to prefer using semicolons. */
semiColons?: boolean;
};
};
/** Enables or disables the use of a local node_modules folder for npm packages. Alternatively, use the `--node-modules-dir` or `--node-modules-dir=false` flag. Requires Deno 1.34 or later. */
nodeModulesDir?: boolean;
/** UNSTABLE: Enables or disables the use of a local deno_modules folder as a local cache for remote modules. Alternatively, use the `--deno-modules-dir` or `--deno-modules-dir=false` flag. Requires Deno 1.36 or later. */
denoModulesDir?: boolean;
/** Configuration for deno task */
tasks?: {
/** Command to execute for this task name. */
[k: string]: string;
};
/** Configuration for deno test */
test?: {
/** List of files, directories or globs that will be searched for tests. */
include?: string[];
/** List of files, directories or globs that will not be searched for tests. */
exclude?: string[];
files?: {
/** List of files, directories or globs that will be searched for tests. */
include?: string[];
/** List of files, directories or globs that will not be searched for tests. */
exclude?: string[];
};
};
/** Configuration for deno bench */
bench?: {
/** List of files, directories or globs that will be searched for benchmarks. */
include?: string[];
/** List of files, directories or globs that will not be searched for benchmarks. */
exclude?: string[];
files?: {
/** List of files, directories or globs that will be searched for benchmarks. */
include?: string[];
/** List of files, directories or globs that will not be searched for benchmarks. */
exclude?: string[];
};
};
/** Whether to use a lock file or the path to use for the lock file. Can be overridden by CLI arguments. */
lock?: string | boolean;
}