Skip to content

window.JSHINT not defined, CodeMirror JavaScript linting cannot run #67

@duanguiyang

Description

@duanguiyang

Describe the bug

无法正常使用。我的版本:"codemirror": "^5.65.19", "codemirror-editor-vue3": "^2.8.0", "diff-match-patch": "1.0.5", "jshint": "^2.13.6", "jslint": "^0.12.1","@types/codemirror": "^5.60.15", "@types/jshint": "^2.12.4",

Steps to reproduce

我的主要代码:import { Editor, EditorConfiguration } from "codemirror";
import Codemirror from "codemirror-editor-vue3";
import { JSHINT } from "jshint";
// window.JSHINT = JSHINT;
当这个window.JSHINT = JSHINT这个注释掉时页面正常显示,但是无法做js语法检查。且控制台报错:window.JSHINT not defined, CodeMirror JavaScript linting cannot run
当去掉注释时,页面报错,无法显示。控制台报错:TypeError: events.EventEmitter is not a constructor hook.js:608 Module "events" has been externalized for browser compatibility. Cannot access "events.EventEmitter" in client code. See

Package Info

"codemirror": "^5.65.19", "codemirror-editor-vue3": "^2.8.0",    "diff-match-patch": "1.0.5", "jshint": "^2.13.6", "jslint": "^0.12.1","@types/codemirror": "^5.60.15", "@types/jshint": "^2.12.4",

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions