New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@qlover/eslint-plugin

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@qlover/eslint-plugin

ESLint plugin for qlover's TypeScript projects

latest
npmnpm
Version
2.0.1
Version published
Weekly downloads
35
-10.26%
Maintainers
1
Weekly downloads
 
Created
Source

@qlover/eslint-plugin

ESLint plugin for qlover's TypeScript projects.

👉 中文文档 | English Docs

Installation

npm install --save-dev @qlover/eslint-plugin

Usage

Add @qlover to the plugins section of your .eslintrc configuration file:

{
  "plugins": ["@qlover"]
}

Then configure the rules you want to use:

{
  "rules": {
    "@qlover-eslint/ts-class-method-return": ["error", {
      "allowConstructors": true,
      "allowPrivateMethods": false
    }]
  }
}

Or use the recommended configuration:

{
  "extends": ["plugin:@qlover-eslint/recommended"]
}

Rules

ts-class-method-return

Enforces return type annotations for class methods to improve code readability and type safety.

Options

  • allowConstructors (default: true) - When true, constructors are allowed to omit return type annotations
  • allowPrivateMethods (default: false) - When true, private methods (prefixed with #) are allowed to omit return type annotations

Example of incorrect code:

class Example {
  method() {  // Missing return type
    return true;
  }

  #privateMethod() {  // Missing return type (not allowed by default)
    return 'private';
  }
}

Example of correct code:

class Example {
  constructor() {  // Constructor return type is optional by default
    // initialization
  }

  method(): boolean {
    return true;
  }

  #privateMethod(): string {
    return 'private';
  }
}

For more detailed information about each rule, please check the rule documentation.

Keywords

eslint

FAQs

Package last updated on 12 Mar 2026

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