@cssdoc/config 0.5.4 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cssdoc.schema.json +11 -0
- package/dist/index.d.mts +14 -1
- package/dist/index.mjs +19 -0
- package/package.json +2 -2
package/cssdoc.schema.json
CHANGED
|
@@ -109,6 +109,13 @@
|
|
|
109
109
|
"type": "string"
|
|
110
110
|
}
|
|
111
111
|
},
|
|
112
|
+
"pseudoElements": {
|
|
113
|
+
"description": "Native pseudo-elements (without the ::) to document, e.g. [\"before\",\"after\"]. Overrides the built-in default set.",
|
|
114
|
+
"type": "array",
|
|
115
|
+
"items": {
|
|
116
|
+
"type": "string"
|
|
117
|
+
}
|
|
118
|
+
},
|
|
112
119
|
"propValue": {
|
|
113
120
|
"type": "boolean"
|
|
114
121
|
},
|
|
@@ -119,6 +126,10 @@
|
|
|
119
126
|
}
|
|
120
127
|
]
|
|
121
128
|
},
|
|
129
|
+
"inlineComments": {
|
|
130
|
+
"description": "How a /* … */ comment on a member's rule combines with its tag prose: append (default), prepend, replace, or ignore.",
|
|
131
|
+
"enum": ["append", "prepend", "replace", "ignore"]
|
|
132
|
+
},
|
|
122
133
|
"rules": {
|
|
123
134
|
"description": "Per-rule severity overrides (off/warn/error).",
|
|
124
135
|
"type": "object",
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CssDocConfiguration, CssDocTagDefinition, ModifierConventionInput } from "@cssdoc/core";
|
|
1
|
+
import { CssDocConfiguration, CssDocTagDefinition, InlineCommentMode, ModifierConventionInput } from "@cssdoc/core";
|
|
2
2
|
|
|
3
3
|
//#region src/CssDocConfigFile.d.ts
|
|
4
4
|
/** A per-rule severity override, as spelled in `cssdoc.json`. */
|
|
@@ -45,6 +45,8 @@ declare class CssDocConfigFile {
|
|
|
45
45
|
readonly extendsFiles: readonly CssDocConfigFile[];
|
|
46
46
|
/** The modifier convention declared by this file, if any. */
|
|
47
47
|
readonly modifierConvention?: ModifierConventionInput;
|
|
48
|
+
/** How inline `/* … *\/` comments combine with tag prose, if declared by this file. */
|
|
49
|
+
readonly inlineComments?: InlineCommentMode;
|
|
48
50
|
/**
|
|
49
51
|
* The per-rule severity overrides, merged across the `extends` chain (this file wins). Not the
|
|
50
52
|
* resolved severities — pass these to `resolveRuleSeverities` in `@cssdoc/providers`.
|
|
@@ -214,6 +216,13 @@ declare const cssDocSchema: {
|
|
|
214
216
|
readonly type: "string";
|
|
215
217
|
};
|
|
216
218
|
};
|
|
219
|
+
readonly pseudoElements: {
|
|
220
|
+
readonly description: "Native pseudo-elements (without the ::) to document, e.g. [\"before\",\"after\"]. Overrides the built-in default set.";
|
|
221
|
+
readonly type: "array";
|
|
222
|
+
readonly items: {
|
|
223
|
+
readonly type: "string";
|
|
224
|
+
};
|
|
225
|
+
};
|
|
217
226
|
readonly propValue: {
|
|
218
227
|
readonly type: "boolean";
|
|
219
228
|
};
|
|
@@ -223,6 +232,10 @@ declare const cssDocSchema: {
|
|
|
223
232
|
};
|
|
224
233
|
}];
|
|
225
234
|
};
|
|
235
|
+
readonly inlineComments: {
|
|
236
|
+
readonly description: "How a /* … */ comment on a member's rule combines with its tag prose: append (default), prepend, replace, or ignore.";
|
|
237
|
+
readonly enum: readonly ["append", "prepend", "replace", "ignore"];
|
|
238
|
+
};
|
|
226
239
|
readonly rules: {
|
|
227
240
|
readonly description: "Per-rule severity overrides (off/warn/error).";
|
|
228
241
|
readonly type: "object";
|
package/dist/index.mjs
CHANGED
|
@@ -102,11 +102,25 @@ const cssDocSchema = {
|
|
|
102
102
|
type: "array",
|
|
103
103
|
items: { type: "string" }
|
|
104
104
|
},
|
|
105
|
+
pseudoElements: {
|
|
106
|
+
description: "Native pseudo-elements (without the ::) to document, e.g. [\"before\",\"after\"]. Overrides the built-in default set.",
|
|
107
|
+
type: "array",
|
|
108
|
+
items: { type: "string" }
|
|
109
|
+
},
|
|
105
110
|
propValue: { type: "boolean" },
|
|
106
111
|
propValueSeparator: { type: "string" }
|
|
107
112
|
}
|
|
108
113
|
}]
|
|
109
114
|
},
|
|
115
|
+
inlineComments: {
|
|
116
|
+
description: "How a /* … */ comment on a member's rule combines with its tag prose: append (default), prepend, replace, or ignore.",
|
|
117
|
+
enum: [
|
|
118
|
+
"append",
|
|
119
|
+
"prepend",
|
|
120
|
+
"replace",
|
|
121
|
+
"ignore"
|
|
122
|
+
]
|
|
123
|
+
},
|
|
110
124
|
rules: {
|
|
111
125
|
description: "Per-rule severity overrides (off/warn/error).",
|
|
112
126
|
type: "object",
|
|
@@ -217,6 +231,8 @@ var CssDocConfigFile = class CssDocConfigFile {
|
|
|
217
231
|
extendsFiles;
|
|
218
232
|
/** The modifier convention declared by this file, if any. */
|
|
219
233
|
modifierConvention;
|
|
234
|
+
/** How inline `/* … *\/` comments combine with tag prose, if declared by this file. */
|
|
235
|
+
inlineComments;
|
|
220
236
|
/**
|
|
221
237
|
* The per-rule severity overrides, merged across the `extends` chain (this file wins). Not the
|
|
222
238
|
* resolved severities — pass these to `resolveRuleSeverities` in `@cssdoc/providers`.
|
|
@@ -247,6 +263,7 @@ var CssDocConfigFile = class CssDocConfigFile {
|
|
|
247
263
|
this.supportForTags = init.supportForTags;
|
|
248
264
|
this.extendsFiles = init.extendsFiles;
|
|
249
265
|
this.modifierConvention = init.modifierConvention;
|
|
266
|
+
this.inlineComments = init.inlineComments;
|
|
250
267
|
const severities = {};
|
|
251
268
|
const naming = {};
|
|
252
269
|
const render = {};
|
|
@@ -289,6 +306,7 @@ var CssDocConfigFile = class CssDocConfigFile {
|
|
|
289
306
|
if (definition) configuration.setSupportForTag(definition, supported);
|
|
290
307
|
}
|
|
291
308
|
if (this.modifierConvention !== void 0) configuration.setModifierConvention(this.modifierConvention);
|
|
309
|
+
if (this.inlineComments !== void 0) configuration.setInlineComments(this.inlineComments);
|
|
292
310
|
}
|
|
293
311
|
/**
|
|
294
312
|
* Build a {@link CssDocConfiguration} from this file. Convenience for the common case.
|
|
@@ -400,6 +418,7 @@ var CssDocConfigFile = class CssDocConfigFile {
|
|
|
400
418
|
supportForTags: new Map(Object.entries(raw.supportForTags ?? {})),
|
|
401
419
|
extendsFiles,
|
|
402
420
|
modifierConvention: raw.modifierConvention,
|
|
421
|
+
inlineComments: raw.inlineComments,
|
|
403
422
|
rules: raw.rules ?? {},
|
|
404
423
|
naming: raw.naming ?? {},
|
|
405
424
|
structureIgnore: raw.structureIgnore ?? [],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cssdoc/config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Load a cssdoc.json configuration file (custom tags, extends) into an @cssdoc/core CssDocConfiguration — TSDoc-config, for CSS.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"config",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"ajv": "^8.20.0",
|
|
34
34
|
"jsonc-parser": "^3.3.1",
|
|
35
|
-
"@cssdoc/core": "0.
|
|
35
|
+
"@cssdoc/core": "0.6.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/node": "^24.13.3",
|