@atscript/core 0.1.15 → 0.1.17
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/dist/index.cjs +2 -1
- package/dist/index.mjs +2 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -864,7 +864,8 @@ var AnnotationSpec = class {
|
|
|
864
864
|
message: `Multiple "${mainToken.text}" annotations are not allowed.`,
|
|
865
865
|
range: mainToken.range
|
|
866
866
|
});
|
|
867
|
-
|
|
867
|
+
const effectiveEntity = mainToken.parentNode.entity === "ref" && this.config.nodeType?.includes("prop") ? "prop" : mainToken.parentNode.entity;
|
|
868
|
+
if (this.config.nodeType && this.config.nodeType.length > 0 && !this.config.nodeType.includes(effectiveEntity)) messages.push({
|
|
868
869
|
severity: 1,
|
|
869
870
|
message: `${mainToken.text} applies only to ${this.config.nodeType.join(", ")} nodes.`,
|
|
870
871
|
range: mainToken.range
|
package/dist/index.mjs
CHANGED
|
@@ -840,7 +840,8 @@ var AnnotationSpec = class {
|
|
|
840
840
|
message: `Multiple "${mainToken.text}" annotations are not allowed.`,
|
|
841
841
|
range: mainToken.range
|
|
842
842
|
});
|
|
843
|
-
|
|
843
|
+
const effectiveEntity = mainToken.parentNode.entity === "ref" && this.config.nodeType?.includes("prop") ? "prop" : mainToken.parentNode.entity;
|
|
844
|
+
if (this.config.nodeType && this.config.nodeType.length > 0 && !this.config.nodeType.includes(effectiveEntity)) messages.push({
|
|
844
845
|
severity: 1,
|
|
845
846
|
message: `${mainToken.text} applies only to ${this.config.nodeType.join(", ")} nodes.`,
|
|
846
847
|
range: mainToken.range
|