☰ Menu
Home›Command-line Tools›addons-linter
CLI Open source 19 installs/mo

addons-linter for Mac

addons-linter

The Add-ons Linter is being used by web-ext and addons.mozilla.org to lint WebExtensions.

addons-linter — overview

The Add-ons Linter is being used by web-ext and addons.mozilla.org to lint WebExtensions.

It can also be used as a standalone binary and library.

You can find more information about the linter and it's implemented rules in our documentation.

Usage

Command Line

You need Node.js to use the add-ons linter.

To validate your add-on locally, install the linter from npm:

After installation, run the linter and direct it to your add-on file:

Alternatively you can point it at a directory:

The addons-linter will check your add-on and show you errors, warnings, and friendly messages for your add-on. If you want more info on the options you can enable/disable for the command-line app, use the --help option:

Privileged extensions

The addons-linter can lint privileged extensions only when the --privileged option is passed to it. This option changes the behavior of the linter to: emit errors when the input file (or directory) is a regular extension (i.e. the extension does not use privileged features) hide messages related to privileged features (e.g., permissions and properties) when the input file (or directory) is a privileged extension

Linter API Usage

You can use the linter directly as a library to integrate it better into your development process.

linter.output is composed by the following properties (the same of the 'json' report type):

Development

If you'd like to help us develop the addons-linter, that's great! It's pretty easy to get started, you just need Node.js installed on your machine.

Quick Start

If you have Node.js installed, here's the quick start to getting your development dependencies installed and running the tests

You can also build the addons-linter binary to test your changes.

Required Node version

addons-linter requires Node.js v22 or greater. Have a look at our .circleci/config.yml file which Node.js versions we officially test.

Using nvm is probably the easiest way to manage multiple Node versions side by side. See nvm on GitHub for more details.

Install dependencies

Install dependencies with npm:

npm scripts

Building

You can run npm run build to build the library.

Once you build the library you can use the CLI in bin/addons-linter.

Testing

Run npm test. This will watch for file-changes and re-runs the test suite.

Coverage

We're looking to maintain coverage at 100%. Use the coverage data in the test output to work out what lines aren't covered and ensure they're covered.

Assertions and testing APIs

We are using using Sinon for assertions, mocks, stubs and more see the Sinon docs for the API available.

Jest is being used as a test-runner but also provides helpful tools. Please make sure you read their documentation for more details.

Logging

We use pino for logging: By default logging is off (level is set to 'fatal') . Logging in tests can be enabled using an env var e.g: LOG_LEVEL=debug jest test Logging on the CLI can be enabled with --log-level [level].

Prettier

Details

Firefox 插件检查工具,使用 JavaScript 编写

How to install addons-linter

  1. Open Terminal (press ⌘ + Space and type “Terminal”).
  2. If Homebrew is not installed yet, run the command below first.
  3. Run this command:

Latest 10 releases

Last updated 2026-10-26; current version 10.15.0, with the latest 10 releases listed.

VersionReleasedTypeSizemacOSWindowsLinux
10.15.02026-10-26Stable————
10.14.02026-10-09Stable————
10.13.02026-09-18Stable————
10.12.02026-09-11Stable————
10.11.02026-09-09Stable————
10.10.02026-08-04Stable————
10.9.02026-07-13Stable————
10.8.12026-07-10Stable————
10.8.02026-07-10Stable————
10.7.02026-06-12Stable————

Data from GitHub Releases; stable releases first, each group sorted newest first.

Prebuilt bottle platforms

Official Homebrew bottles cover:

  • all

⚠️ No prebuilt bottle for Intel Macs; Intel users need brew install --build-from-source to build from source.

Compared with similar apps

Only public metadata is compared, with no subjective recommendation; see the compare pages for field-by-field comparisons.

Compared with similar apps
AppVersionLicenseArchitecture30-day installs
addons-linter10.15.0MPL-2.0CLI19
svlintv0.9.5MITCLI8
jokerv1.10.0EPL-1.0CLI8
sherifv1.13.0MITCLI6

Similar apps: Command-line Tools

Leave a comment

评论表单加载中…