Registry /
testing / eslint-linter-browserify
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslnode 18–226 runs
build_error
glibcnode 18–226 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Linter
✓ import { Linter } from 'eslint-linter-browserify'
✗ import Linter from 'eslint-linter-browserify'
Use named import, not default. The package exports an object with Linter property.
eslint (namespace)
✓ import * as eslint from 'eslint-linter-browserify'
✗ const eslint = require('eslint-linter-browserify')
Both ESM and CJS work. For browser scripts, use UMD: <script src='...linter.js'> and access window.eslint.
type Linter
✓ import type { Linter } from 'eslint-linter-browserify'
✗ import { Linter } from 'eslint-linter-browserify' // no runtime import needed
Only use type import when you only need the type, e.g. for TypeScript declarations.
Shows how to create a Linter instance, define rules, and verify code. Output is an array of lint messages.
import { Linter } from 'eslint-linter-browserify';
const linter = new Linter();
const code = "var foo = 1;";
const config = {
rules: {
semi: ["error", "always"],
"no-var": ["error"]
}
};
const messages = linter.verify(code, config, { filename: "test.js" });
console.log(messages);
// Example output: [{ line: 1, column: 1, message: "Unexpected var, use let or const instead.", ruleId: "no-var", severity: 2 }]
Errors
Common errors & fixes
Cannot find module 'eslint-linter-browserify'
Package not installed or not in node_modules.
fixRun 'npm install eslint-linter-browserify' and ensure import path is correct.
linter.verify is not a function
Using default import instead of named import: 'import Linter from ...' returns the module object, not the Linter class.
fixUse 'import { Linter } from 'eslint-linter-browserify''. ReferenceError: require is not defined
Using CJS require in an ESM context (e.g., modern browser or Node with 'type':'module').
fixUse import instead, or switch to a bundler that supports require.
Failed to load rule 'no-undef': Cannot find module 'eslint/lib/rules/no-undef'
Trying to load a rule that expects Node.js module resolution; browser build may not include all rules.
fixOnly use rules that are bundled with the linter. Check the package's bundled rules list.
Audit
Dependencies
No dependency data recorded yet.