diff --git a/src/public/libraries/codemirror/addon/lint/eslint.js b/src/public/libraries/codemirror/addon/lint/eslint.js index 77c241e0b..fec408fee 100644 --- a/src/public/libraries/codemirror/addon/lint/eslint.js +++ b/src/public/libraries/codemirror/addon/lint/eslint.js @@ -28,6 +28,11 @@ } async function validatorJavaScript(text, options) { + if (noteEditor.getCurrentNote().detail.mime === 'application/json') { + // eslint doesn't seem to validate pure JSON well + return []; + } + await requireLibrary(ESLINT); if (text.length > 20000) {