Skip to content

Commit 3c79f45

Browse files
committed
chore(vscode): add tsconfig schema
1 parent ff53507 commit 3c79f45

2 files changed

Lines changed: 48 additions & 1 deletion

File tree

packages/vscode/package.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,16 @@
4545
]
4646
}
4747
],
48+
"jsonValidation": [
49+
{
50+
"fileMatch": "jsconfig*.json",
51+
"url": "./schemas/tsconfig.schema.json"
52+
},
53+
{
54+
"fileMatch": "tsconfig*.json",
55+
"url": "./schemas/tsconfig.schema.json"
56+
}
57+
],
4858
"menus": {
4959
"commandPalette": [
5060
{
@@ -61,4 +71,4 @@
6171
"dependencies": {
6272
"@css-modules-kit/ts-plugin": "^0.6.0"
6373
}
64-
}
74+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"properties": {
4+
"cmkOptions": {
5+
"type": "object",
6+
"markdownDescription": "Config options for css-modules-kit.",
7+
"properties": {
8+
"dtsOutDir": {
9+
"type": "string",
10+
"default": "generated",
11+
"markdownDescription": "Specifies the directory where `*.d.ts` files are output."
12+
},
13+
"arbitraryExtensions": {
14+
"type": "boolean",
15+
"default": false,
16+
"markdownDescription": "Determines whether to generate `*.module.d.css.ts` instead of `*.module.css.d.ts`."
17+
},
18+
"namedExports": {
19+
"type": "boolean",
20+
"default": false,
21+
"markdownDescription": "Determines whether to generate named exports in the d.ts file instead of a default export."
22+
},
23+
"prioritizeNamedImports": {
24+
"type": "boolean",
25+
"default": false,
26+
"markdownDescription": "Whether to prioritize named imports over namespace imports when adding import statements. This option only takes effect when `cmkOptions.namedExports` is `true`.\n\nWhen this option is `true`, `import { button } from '...'` will be added. When this option is `false`, `import button from '...'` will be added."
27+
},
28+
"keyframes": {
29+
"type": "boolean",
30+
"default": true,
31+
"title": "keyframes",
32+
"markdownDescription": "Determines whether to generate the [token](https://github.com/mizdra/css-modules-kit/blob/main/docs/glossary.md#token) of keyframes in the d.ts file."
33+
}
34+
}
35+
}
36+
}
37+
}

0 commit comments

Comments
 (0)