Socket
Book a DemoInstallSign in
Socket

@adguard/eslint-plugin-logger-context

Package Overview
Dependencies
Maintainers
3
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@adguard/eslint-plugin-logger-context

ESLint plugin that requires AdGuard logger calls to start with a context tag.

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
3
Created
Source

@adguard/eslint-plugin-logger-context

A minimal ESLint plugin for AdGuard projects that requires logger calls to start with a context tag.

Install

pnpm add -D @adguard/eslint-plugin-logger-context

Quick Start

Add to your .eslintrc.js:

module.exports = {
  plugins: [
    '@adguard/logger-context',
  ],
  rules: {
    '@adguard/logger-context/require-logger-context': ['error', {
      // optional
      contextModuleName: 'moduleName',
      // optional
      loggerVariableName: 'logger',
    }],
  },
};

Example of correct usage:

logger.info('[ext.page-handler]: some message');

Keywords

eslint

FAQs

Package last updated on 03 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts