Keep extension code quality predictable before issues reach runtime. ESLint runs outside the build pipeline. Run it from your scripts or continuous integration (CI).Documentation Index
Fetch the complete documentation index at: https://extension.js.org/llms.txt
Use this file to discover all available pages before exploring further.
When ESLint is a good fit
- You want consistent code standards across team contributions.
- You need CI checks that catch common JS/TS mistakes early.
- You are enforcing extension-specific quality rules before release.
ESLint capabilities
| Capability | What it gives you |
|---|---|
| JavaScript and TypeScript linting | Catch common mistakes and enforce project standards |
| Flat config support | Use modern eslint.config.mjs in new projects |
| CI-friendly execution | Run lint checks in local scripts and pull request pipelines |
| Extension-specific rulesets | Add browser-extension plugins/rules when your team needs stricter checks |
Template examples
ESLint configuration template
Preconfigured lint setup you can use immediately.
Usage with an existing extension
Install the core packages: Createeslint.config.mjs:
Best practices
- Keep lint rules in source control and apply them in CI.
- Use lint-staged or pre-commit hooks for faster local feedback.
- Add framework-specific plugins (for example, React) only when needed.

