@khanacademy/perseus-linter 0.0.0-PR3049-20251118235933 → 0.0.0-PR3049-20251119195401

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.js CHANGED
@@ -27,7 +27,7 @@ function _interopNamespaceCompat(e) {
27
27
 
28
28
  var KAS__namespace = /*#__PURE__*/_interopNamespaceCompat(KAS);
29
29
 
30
- const libName="@khanacademy/perseus-linter";const libVersion="4.4.6";perseusUtils.addLibraryVersionToPerseusDebug(libName,libVersion);
30
+ const libName="@khanacademy/perseus-linter";const libVersion="4.4.7";perseusUtils.addLibraryVersionToPerseusDebug(libName,libVersion);
31
31
 
32
32
  const linterContextDefault={contentType:"",highlightLint:false,paths:[],stack:[]};
33
33
 
@@ -131,7 +131,7 @@ var NestedLists = Rule.makeRule({name:"nested-lists",severity:Rule.Severity.WARN
131
131
  nested lists are hard to read on mobile devices;
132
132
  do not use additional indentation.`});
133
133
 
134
- var RadioWidgetError = Rule.makeRule({name:"radio-widget-error",severity:Rule.Severity.ERROR,selector:"widget",lint:function(state,content,nodes,match,context){if(state.currentNode().widgetType!=="radio"){return}const nodeId=state.currentNode().id;if(!nodeId){return}const widget=context&&context.widgets&&context.widgets[nodeId];if(!widget){return}const choices=widget.options.choices;if(!choices.some(choice=>choice.correct)){return "No choice is marked as correct."}}});
134
+ var RadioWidgetError = Rule.makeRule({name:"radio-widget-error",severity:Rule.Severity.ERROR,selector:"widget",lint:function(state,content,nodes,match,context){if(state.currentNode().widgetType!=="radio"){return}const nodeId=state.currentNode().id;if(!nodeId){return}const widget=context?.widgets?.[nodeId];if(!widget){return}const choices=widget.options.choices;if(!choices.some(choice=>choice.correct)){return "No choice is marked as correct."}}});
135
135
 
136
136
  var StaticWidgetInQuestionStem = Rule.makeRule({name:"static-widget-in-question-stem",severity:Rule.Severity.WARNING,selector:"widget",lint:(state,content,nodes,match,context)=>{if(context?.contentType!=="exercise"){return}if(context.stack.includes("hint")){return}const nodeId=state.currentNode().id;if(!nodeId){return}const widget=context?.widgets?.[nodeId];if(!widget){return}if(widget.static){return `Widget in question stem is static (non-interactive).`}}});
137
137