Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/botnadzor/extension/llms.txt

Use this file to discover all available pages before exploring further.

This guide will help you set up the Botnadzor Extension development environment on your local machine.

Prerequisites

Before you begin, ensure you have the following installed:
  • Node.js 24 or higher - Download from nodejs.org
    • The exact version is specified in .tool-versions, but any version ≥ 24.0 will work
  • pnpm 10 or higher - Install with npm install -g pnpm or follow the pnpm installation guide
    • The exact version is specified in package.jsonpackageManager, but any version ≥ 10.0 will work

Installation

Clone the repository and install dependencies:
npm install -g pnpm
pnpm install

Development Commands

Running in Development Mode

Start the extension in development mode with hot reload:
pnpm dev:chrome
The development server will:
  • Automatically launch a clean browser instance
  • Open a test page on VK.com
  • Enable live reload when you make changes
  • Output build files to the dist/ directory
You can manually load the extension from the dist/ directory into your main browser if desired.

Building for Production

Build optimized production bundles:
pnpm build
Build artifacts are created in the dist/ directory and can be manually loaded into your browser.

Creating Distribution Packages

Package the extension into distributable ZIP files:
pnpm zip

Code Quality

Linting and Type Checking

Run all code quality checks:
pnpm lint
This runs the following checks in parallel:
  • ESLint - JavaScript/TypeScript linting
  • Prettier - Code formatting
  • TypeScript - Type checking
  • knip - Unused code detection
  • cspell - Spell checking
  • pnpm dedupe - Dependency deduplication check

Individual Linters

You can run specific linters separately:
pnpm lint:eslint

Auto-fixing Issues

Automatically fix certain types of issues:
pnpm fix
This runs:
  • pnpm fix:eslint - Auto-fix ESLint issues
  • pnpm fix:prettier - Format code with Prettier
  • pnpm fix:knip - Remove unused files and exports
  • pnpm fix:pnpm-dedupe - Deduplicate dependencies

Testing

Run unit tests:
pnpm test:unit
The extension uses Vitest for unit testing.
System tests are not yet configured. Running pnpm test or pnpm test:system will display a message indicating this.

CI/CD

The project uses GitHub Actions for continuous integration. CI runs on:
  • All pull requests
  • New commits to the main branch
The CI pipeline consists of two parallel jobs:
  1. build - Builds the extension for both Chrome and Firefox
  2. lint and test - Runs all linters and unit tests
Running pnpm lint locally before pushing will catch most issues that CI checks for.

Next Steps

Now that you have your development environment set up, learn about:

Build docs developers (and LLMs) love