Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/uzitech/eslint-linter-browserify

Use eslint in the browser
https://github.com/uzitech/eslint-linter-browserify

Last synced: 19 days ago
JSON representation

Use eslint in the browser

Awesome Lists containing this project

README

        

# eslint-linter-browserify
Use eslint in the browser

```js
import * as eslint from "eslint-linter-browserify";

// or const eslint = require("eslint-linter-browserify");
// or
// or

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](./example) for a way to use this in [CodeMirror](https://codemirror.net).