mirror of
https://github.com/zadam/trilium.git
synced 2025-11-06 05:15:59 +01:00
initial support for eslint backed JS linting
This commit is contained in:
@@ -142,6 +142,7 @@ const noteEditor = (function() {
|
||||
else if (currentNote.detail.type === 'code') {
|
||||
if (!codeEditor) {
|
||||
await requireLibrary(CODE_MIRROR);
|
||||
await requireLibrary(JS_LINT);
|
||||
|
||||
CodeMirror.keyMap.default["Shift-Tab"] = "indentLess";
|
||||
CodeMirror.keyMap.default["Tab"] = "indentMore";
|
||||
@@ -154,7 +155,10 @@ const noteEditor = (function() {
|
||||
indentUnit: 4,
|
||||
matchBrackets: true,
|
||||
matchTags: { bothTags: true },
|
||||
highlightSelectionMatches: { showToken: /\w/, annotateScrollbar: false }
|
||||
highlightSelectionMatches: { showToken: /\w/, annotateScrollbar: false },
|
||||
lint: true,
|
||||
gutters: ["CodeMirror-lint-markers"],
|
||||
lineNumbers: true
|
||||
});
|
||||
|
||||
codeEditor.on('change', noteChanged);
|
||||
|
||||
Reference in New Issue
Block a user