1. eslint-plugin-self
Allows ESLint plugins to be run on themselves
eslint-plugin-self
Package: eslint-plugin-self
Created by: not-an-aardvark
Last modified: Fri, 17 Jun 2022 20:41:27 GMT
Version: 1.2.1
License: MIT
Downloads: 528
Repository: https://github.com/not-an-aardvark/eslint-plugin-self

Install

npm install eslint-plugin-self
yarn add eslint-plugin-self

eslint-plugin-self

When writing an ESLint plugin, it's often useful to use the plugin's rules to lint the plugin's own codebase. You can use eslint-plugin-self to do that.

Usage

npm install eslint-plugin-self --save-dev

Note: eslint-plugin-self must be installed locally (it will not work if installed globally), and the project that installs it must be a functioning ESLint plugin.

Add the following to your config file:

 {
  "plugins": [
    "self"
  ]
}

Then you can use your plugin's rules, with the self/ prefix:

 {
  "rules": {
    "self/my-custom-rule": "error"
  }
}

You can also use your plugin's configs, or anything else exported by your plugin:

 {
  "extends": [
    "plugin:self/some-config"
  ]
}

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code