Skip to content
Open
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
12 changes: 11 additions & 1 deletion packages/vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,16 @@
]
}
],
"jsonValidation": [
{
"fileMatch": "jsconfig*.json",
"url": "./schemas/tsconfig.schema.json"
},
{
"fileMatch": "tsconfig*.json",
"url": "./schemas/tsconfig.schema.json"
}
],
"menus": {
"commandPalette": [
{
Expand All @@ -61,4 +71,4 @@
"dependencies": {
"@css-modules-kit/ts-plugin": "^0.6.0"
}
}
}
37 changes: 37 additions & 0 deletions packages/vscode/schemas/tsconfig.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"cmkOptions": {
"type": "object",
"markdownDescription": "Config options for css-modules-kit.",
"properties": {
"dtsOutDir": {
"type": "string",
"default": "generated",
"markdownDescription": "Specifies the directory where `*.d.ts` files are output."
},
"arbitraryExtensions": {
"type": "boolean",
"default": false,
"markdownDescription": "Determines whether to generate `*.module.d.css.ts` instead of `*.module.css.d.ts`."
},
"namedExports": {
"type": "boolean",
"default": false,
"markdownDescription": "Determines whether to generate named exports in the d.ts file instead of a default export."
},
"prioritizeNamedImports": {
"type": "boolean",
"default": false,
"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."
},
"keyframes": {
"type": "boolean",
"default": true,
"title": "keyframes",
"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."
}
}
}
}
}