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

eslint-plugin-boyscout

v1.0.1

Published

An experimental tool to help track refactoring efforts.

Downloads

3

Readme

Coverage Status CircleCI

eslint-plugin-boyscout

An experimental tool to help track refactoring efforts.

eslint-plugin-boyscout lets you define your own eslint rule in your project, without creating and deploying an eslint-plugin to the npm registry.

Up to you what you do with those rules, we use them to keep track of long-winded refactoring efforts.

Installation

Install eslint-plugin-boyscout:

$ npm install eslint-plugin-boyscout --save-dev

Note: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-boyscout globally.

Usage

Boyscout needs to know where the rules are defined, this forces you to use an eslintrc.js file to configure the plugin like so:

require('eslint-plugin-boyscout').RULES_DIR = "/path/to/your/directory"

Youl also need to add boyscout to your configuration file:

{
    plugins: [
        "boyscout"
    ]
}

Warning: We highly recommend the RULES_DIR to be an absolute path. If a relative path is used boyscout will try to load the rules relative to the current working directory... that works fine until you have more than one project using eslint and you don't change your directory before opening other projects files. Relative paths also probably don't work if you're using a global eslint.

Creating rules

Add rules in the directory you configured in #usage, following the eslint-rule syntax exactly as if they were under the lib/rules directory.

The rules will be loaded by filename under the boyscout namespace. For example a rule file any-directory/replace-jquery.js will be loaded as boyscout/replace-jquery

Adding tests for rules

Any file/directory that starts with an underscore will be ignored by this plugin. You can take advantage of this to write rule tester files.

Using the rules

Add them into the eslint configuration file, just like any other eslint rule

{
    rules: {
        "boyscout/rule-name": 2
    }
}

Acknowledgement

This plugin now contains some fixes taken from eslint-plugin-rulesdir