npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ec0lint-plugin-ec0lint-plugin

v0.0.1

Published

An ec0lint plugin for linting ec0lint plugins

Downloads

5

Readme

eslint-plugin-eslint-plugin CI NPM version Conventional Commits

An ESLint plugin for linting ESLint plugins. Rules written in CJS, ESM, and TypeScript are all supported.

Installation

You'll first need to install ESLint:

npm i eslint --save-dev

Next, install eslint-plugin-eslint-plugin:

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

Usage

Here's an example ESLint configuration that:

  • Sets sourceType to script for CJS plugins (most users) (use module for ESM/TypeScript)
  • Enables the recommended configuration
  • Enables an optional/non-recommended rule
{
    "parserOptions": {
        "sourceType": "script"
    },
    "extends": [
        "plugin:eslint-plugin/recommended"
    ],
    "rules": {
        "eslint-plugin/require-meta-docs-description": "error"
    }
}

Rules

  • ✔️ if the rule belongs to the recommended configuration
  • 🛠 if some problems reported by the rule are automatically fixable by the --fix command line option
  • 💡 if some problems reported by the rule are manually fixable by editor suggestions

Name | ✔️ | 🛠 | 💡 | Description ----- | ----- | ----- | ----- | ----- consistent-output | ✔️ | | | enforce consistent use of output assertions in rule tests fixer-return | ✔️ | | | require fixer functions to return a fix meta-property-ordering | | 🛠 | | enforce the order of meta properties no-deprecated-context-methods | ✔️ | 🛠 | | disallow usage of deprecated methods on rule context objects no-deprecated-report-api | ✔️ | 🛠 | | disallow the version of context.report() with multiple arguments no-identical-tests | ✔️ | 🛠 | | disallow identical tests no-missing-placeholders | ✔️ | | | disallow missing placeholders in rule report messages no-only-tests | ✔️ | | 💡 | disallow the test case property only no-unused-placeholders | ✔️ | | | disallow unused placeholders in rule report messages no-useless-token-range | ✔️ | 🛠 | | disallow unnecessary calls to sourceCode.getFirstToken() and sourceCode.getLastToken() prefer-message-ids | | | | require using messageId instead of message to report rule violations prefer-object-rule | ✔️ | 🛠 | | disallow rule exports where the export is a function prefer-output-null | | 🛠 | | disallow invalid RuleTester test cases where the output matches the code prefer-placeholders | | | | require using placeholders for dynamic report messages prefer-replace-text | | | | require using replaceText() instead of replaceTextRange() report-message-format | | | | enforce a consistent format for rule report messages require-meta-docs-description | | | | require rules to implement a meta.docs.description property with the correct format require-meta-docs-url | | 🛠 | | require rules to implement a meta.docs.url property require-meta-fixable | ✔️ | | | require rules to implement a meta.fixable property require-meta-has-suggestions | ✔️ | 🛠 | | require suggestable rules to implement a meta.hasSuggestions property require-meta-schema | ✔️ | | 💡 | require rules to implement a meta.schema property require-meta-type | ✔️ | | | require rules to implement a meta.type property test-case-property-ordering | | 🛠 | | require the properties of a test case to be placed in a consistent order test-case-shorthand-strings | | 🛠 | | enforce consistent usage of shorthand strings for test cases with no options

Presets

| | Name | Description | |:--|:-----|:------------| | ✔️ | recommended | enables all recommended rules in this plugin | | | rules-recommended | enables all recommended rules that are aimed at linting ESLint rule files | | | tests-recommended | enables all recommended rules that are aimed at linting ESLint test files | | | all | enables all rules in this plugin | | | rules | enables all rules that are aimed at linting ESLint rule files | | | tests | enables all rules that are aimed at linting ESLint test files |

Semantic versioning policy

The list of recommended rules will only change in a major release of this plugin. However, new non-recommended rules might be added in a minor release of this plugin. Therefore, using the all, rules, and tests presets is not recommended for production use, because the addition of new rules in a minor release could break your build.

Preset usage

Presets are enabled by adding a line to the extends list in your config file. For example, to enable the recommended preset, use:

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

Or to apply linting only to the appropriate rule or test files:

{
    "overrides": [
        {
            "files": ["lib/rules/*.{js,ts}"],
            "extends": ["plugin:eslint-plugin/rules-recommended"]
        },
        {
            "files": ["tests/lib/rules/*.{js,ts}"],
            "extends": ["plugin:eslint-plugin/tests-recommended"]
        },
    ]
}