Package Exports
- eslint-linter-browserify
- eslint-linter-browserify/linter.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (eslint-linter-browserify) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
eslint-linter-browserify
Use eslint in the browser
import "./node_modules/eslint-linter-browserify/linter.js";
const linter = new eslint.Linter();
const messages = linter.verify("var foo;", {
rules: {
semi: ["error", "never"]
}
}, { filename: "foo.js" });
console.log(messages);
https://eslint.org/docs/developer-guide/nodejs-api#linter
See the CodeMirror example for a way to use this in CodeMirror.