Skip to content

Commit 514fa4d

Browse files
author
angelozerr
committed
Support for jsconfig.json completion.
1 parent e9f6b8f commit 514fa4d

File tree

2 files changed

+217
-7
lines changed

2 files changed

+217
-7
lines changed

eclipse/json/ts.eclipse.ide.json.core/plugin.xml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@
33
<plugin>
44

55
<extension point="org.eclipse.core.contenttype.contentTypes">
6-
<content-type
7-
file-names="jsconfig.json"
8-
priority="high"
9-
name="%jsconfig_Content_Type_Extension_Element.name"
10-
id="ts.eclipse.ide.json.core.jsconfigsource"
11-
base-type="org.eclipse.wst.json.core.jsonsource">
12-
</content-type>
136
<content-type
147
file-names="tsconfig.json"
158
priority="high"
169
name="%tsconfig_Content_Type_Extension_Element.name"
1710
id="ts.eclipse.ide.json.core.tsconfigsource"
1811
base-type="org.eclipse.wst.json.core.jsonsource">
1912
</content-type>
13+
<content-type
14+
file-names="jsconfig.json"
15+
priority="high"
16+
name="%jsconfig_Content_Type_Extension_Element.name"
17+
id="ts.eclipse.ide.json.core.jsconfigsource"
18+
base-type="org.eclipse.wst.json.core.jsonsource">
19+
</content-type>
2020
<content-type
2121
file-names="tslint.json"
2222
priority="high"
@@ -42,6 +42,11 @@
4242
fileMatch="tsconfig.json"
4343
url="http://json.schemastore.org/tsconfig"
4444
uri="schemastore/tsconfig-neon" />
45+
<schema name="jsconfig.json"
46+
description="JSON schema for the JavaScript configuration file"
47+
fileMatch="jsconfig.json"
48+
url="http://json.schemastore.org/jsconfig"
49+
uri="schemastore/jsconfig" />
4550
<schema name="tslint.json"
4651
description="JSON schema for the TSLint configuration files"
4752
fileMatch="tslint.json"
Lines changed: 205 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,205 @@
1+
{
2+
"title": "JSON schema for the JavaScript configuration file",
3+
"type": "object",
4+
"default": {
5+
"compilerOptions": {
6+
"target": "ES6"
7+
}
8+
},
9+
"properties": {
10+
"compilerOptions": {
11+
"type": "object",
12+
"description": "Instructs the JavaScript language service how to validate and down level compile .js files",
13+
"properties": {
14+
"charset": {
15+
"description": "The character set of the input files",
16+
"type": "string"
17+
},
18+
"diagnostics": {
19+
"description": "When down-level compiling, show diagnostic information.",
20+
"type": "boolean"
21+
},
22+
"emitBOM": {
23+
"description": "When down-level compiling, emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files.",
24+
"type": "boolean"
25+
},
26+
"inlineSourceMap": {
27+
"description": "When down-level compiling, emit a single file with source maps instead of having a separate file.",
28+
"type": "boolean"
29+
},
30+
"inlineSources": {
31+
"description": "When down-level compiling, emit the source alongside the sourcemaps within a single file; requires --inlineSourceMap to be set.",
32+
"type": "boolean"
33+
},
34+
"jsx": {
35+
"description": "When down-level compiling, specify JSX code generation: 'preserve' or 'react'.",
36+
"enum": [
37+
"preserve",
38+
"react"
39+
]
40+
},
41+
"reactNamespace": {
42+
"description": "When down-level compiling, specifies the object invoked for createElement and __spread when targeting 'react' JSX emit.",
43+
"type": "string"
44+
},
45+
"listFiles": {
46+
"description": "When down-level compiling, print names of files part of the compilation.",
47+
"type": "boolean"
48+
},
49+
"mapRoot": {
50+
"description": "When down-level compiling, specifies the location where debugger should locate map files instead of generated locations",
51+
"type": "string",
52+
"format": "uri"
53+
},
54+
"module": {
55+
"description": "When down-level compiling, specify module code generation: 'commonjs', 'system', 'umd', 'amd', 'es6', or 'es2015'.",
56+
"enum": [
57+
"commonjs",
58+
"umd",
59+
"amd",
60+
"system",
61+
"es6",
62+
"es2015"
63+
]
64+
},
65+
"newLine": {
66+
"description": "When down-level compiling, specifies the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix).",
67+
"enum": [
68+
"CRLF",
69+
"LF"
70+
]
71+
},
72+
"noEmit": {
73+
"description": "When down-level compiling, do not emit output.",
74+
"type": "boolean"
75+
},
76+
"noEmitHelpers": {
77+
"description": "When down-level compiling, do not generate custom helper functions like __extends in compiled output.",
78+
"type": "boolean"
79+
},
80+
"noEmitOnError": {
81+
"description": "When down-level compiling, do not emit outputs if any type checking errors were reported.",
82+
"type": "boolean"
83+
},
84+
"noLib": {
85+
"description": "Do not include the default library file (lib.d.ts).",
86+
"type": "boolean"
87+
},
88+
"noResolve": {
89+
"description": "When down-level compiling, do not resolve triple-slash references or module import targets to the input files.",
90+
"type": "boolean"
91+
},
92+
"skipDefaultLibCheck": {
93+
"description": "Do not check for the default library (lib.d.ts).",
94+
"type": "boolean"
95+
},
96+
"outFile": {
97+
"description": "When down-level compiling, concatenate and emit output to single file.",
98+
"type": "string",
99+
"format": "uri"
100+
},
101+
"outDir": {
102+
"description": "When down-level compiling, redirect output structure to the directory.",
103+
"type": "string",
104+
"format": "uri"
105+
},
106+
"pretty": {
107+
"description": "When down-level compiling, stylize errors and messages using color and context. (experimental)",
108+
"type": "boolean"
109+
},
110+
"removeComments": {
111+
"description": "When down-level compiling, do not emit comments to output.",
112+
"type": "boolean"
113+
},
114+
"rootDir": {
115+
"description": "When down-level compiling, specifies the root directory of input files. Use to control the output directory structure with --outDir.",
116+
"type": "string",
117+
"format": "uri"
118+
},
119+
"isolatedModules": {
120+
"description": "When down-level compiling, unconditionally emit imports for unresolved files.",
121+
"type": "boolean"
122+
},
123+
"sourceMap": {
124+
"description": "When down-level compiling, generates corresponding '.map' file.",
125+
"type": "boolean"
126+
},
127+
"sourceRoot": {
128+
"description": "When down-level compiling, specifies the location where debugger should locate JavaScript files instead of source locations.",
129+
"type": "string",
130+
"format": "uri"
131+
},
132+
"stripInternal": {
133+
"description": "When down-level compiling, do not emit declarations for code that has an '@internal' annotation.",
134+
"type": "boolean"
135+
},
136+
"target": {
137+
"description": "Specifies which default library (lib.d.ts) to use. When down-level compiling, specifies the code being generated.",
138+
"enum": [
139+
"ES3",
140+
"ES5",
141+
"ES6",
142+
"es3",
143+
"es5",
144+
"es6",
145+
"es2015"
146+
],
147+
"default": "ES6"
148+
},
149+
"watch": {
150+
"description": "When down-level compiling, watch input files.",
151+
"type": "boolean"
152+
},
153+
"experimentalDecorators": {
154+
"description": "Enables experimental support for proposed ES decorators.",
155+
"type": "boolean"
156+
},
157+
"emitDecoratorMetadata": {
158+
"description": "When down-level compiling, emit design-type metadata for decorated declarations in source.",
159+
"type": "boolean"
160+
},
161+
"allowUnusedLabels": {
162+
"type": "boolean",
163+
"description": "Do not report errors on unused labels."
164+
},
165+
"noFallthroughCasesInSwitch": {
166+
"type": "boolean",
167+
"description": "Report errors for fallthrough cases in switch statement."
168+
},
169+
"allowUnreachableCode": {
170+
"type": "boolean",
171+
"description": "Do not report errors on unreachable code."
172+
},
173+
"forceConsistentCasingInFileNames": {
174+
"type": "boolean",
175+
"description": "Disallow inconsistently-cased references to the same file."
176+
},
177+
"allowSyntheticDefaultImports": {
178+
"type": "boolean",
179+
"description": "Allow default imports from modules with no default export. This does not affect code emit, just typechecking."
180+
},
181+
"noImplicitUseStrict": {
182+
"type": "boolean",
183+
"description": "When down-level compiling, do not emit \"use strict\" directives in module output."
184+
}
185+
},
186+
"additionalProperties": false
187+
},
188+
"files": {
189+
"type": "array",
190+
"description": "If no 'files' property is present in a jsconfig.json, the language service defaults to including all files the containing directory and subdirectories. When a 'files' property is specified, only those files are included.",
191+
"items": {
192+
"type": "string",
193+
"format": "uri"
194+
}
195+
},
196+
"exclude": {
197+
"type": "array",
198+
"description": "List files and folders that should not be included. This property is not honored when the 'files' property is present.",
199+
"items": {
200+
"type": "string",
201+
"format": "uri"
202+
}
203+
}
204+
}
205+
}

0 commit comments

Comments
 (0)