我使用 ace 编辑器(javascript-worker)中的语法检查。我需要使用语法检查“use strict”模式,但在代码正文中没有声明“use strict”, 我该如何配置呢?
(function configureAceWorker() {
const worker = editor.session.$worker;
if (!worker) {
setTimeout(configureAceWorker, 500);
} else {
worker.call("changeOptions", [{
// https://jshint.com/docs/options
strict: "implied", // lint the code as if there is the "use strict"; directive
}]);
}
})();