Skip to content

Commit 60164e7

Browse files
authored
rollup other files (#248)
1 parent 4f7deca commit 60164e7

File tree

12 files changed

+353
-44
lines changed

12 files changed

+353
-44
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
linter.js
2+
linter.min.js
3+
linter.mjs
4+
linter.cjs
25
example/bundle.js
36
.npmrc
47

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22
Use eslint in the browser
33

44
```js
5-
import "./node_modules/eslint-linter-browserify/linter.js";
5+
import * as eslint from "eslint-linter-browserify";
6+
7+
// or const eslint = require("eslint-linter-browserify");
8+
// or <script src="https://cdn.jsdelivr.net/npm/eslint-linter-browserify/linter.js"></script>
9+
// or <script src="https://cdn.jsdelivr.net/npm/eslint-linter-browserify/linter.min.js"></script>
610

711
const linter = new eslint.Linter();
812

example/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33
"version": "1.0.0",
44
"description": "",
55
"main": "index.js",
6+
"type": "module",
67
"scripts": {
7-
"test": "echo \"Error: no test specified\" && exit 1",
8+
"test": "npm run build:linter && npm run build",
89
"build": "rollup --config",
9-
"start": "npm run build --prefix ../ && npm run build && serve"
10+
"build:linter": "npm run build --prefix ../",
11+
"start": "npm run build:linter && npm run build && serve"
1012
},
1113
"author": "",
1214
"license": "MIT",

example/script.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import {basicSetup, EditorView} from "codemirror";
22
import {javascript, esLint} from "@codemirror/lang-javascript";
33
import {linter, lintGutter} from "@codemirror/lint";
4-
import "eslint-linter-browserify"; // Adds eslint.Linter to globalThis
4+
5+
// Uses linter.mjs
6+
import * as eslint from "eslint-linter-browserify";
57

68
const config = {
79
// eslint configuration

package-lock.json

Lines changed: 236 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)