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 🙏

© 2026 – Pkg Stats / Ryan Hefner

eslint-plugin-weblint-security

v1.2.9

Published

ESLint rules for enhanced security - even for React and Node.js!

Readme

eslint-plugin-weblint-security

npm version Downloads/month

Additional ESLint security rules for Javascript, React and Node.js / Express!

💿 Installation

Install ESLint either locally or globally. (Note that locally, per project, is strongly preferred)

$ npm install --save-dev eslint eslint-plugin-weblint-security
  • Requires Node.js >=14.4.0
  • Requires ESLint >=7.2.0
  • Requires ES-Parser >=2020

🔧 Setup & Usage

Include Weblint security plugin in your .eslintrc.json configuration file ("env" required*):

{
    "env": {
        "browser": true,
        "es2020": true
    },
    "plugins": [
        "weblint-security"
    ].
    "extends": [
        "eslint:recommended",
        "plugin:weblint-security/recommended"
    ]
}

React support

For React projects, include the React specific rules and configurations:

{
    "env": {
        "browser": true,
        "es2020": true
    },
    "parserOptions": {
        "sourceType": "module"
    },
    "parser": "babel-eslint",
    "plugins": [
        "weblint-security"
    ],
    "extends": [
        "eslint:recommended",
        "plugin:weblint-security/recommended",
        "plugin:weblint-security/react"
    ]
}

Node.js support (including Express.js security aspects)

For Node.js projects, include the Node.js specific rules and configurations:

{
    "env": {
        "node": true
    },
    "parser": "babel-eslint",
    "plugins": [
        "weblint-security"
    ],
    "extends": [
        "eslint:recommended",
        "plugin:weblint-security/recommended",
        "plugin:weblint-security/nodejs"
    ]
}

📖 Rules

✒️ - the mark of fixable rules. Use eslint --fix . to apply all available fixes to your project.

Recommended base rules (@/recommended)

| Rule ID | Description | | |:--------|:------------|:--:| | no-href-and-src-inline-xss | Disallows unescaped variables of uncertain origin from href and src attributes, due to the concern that they might originate from user input. | ✒️ |

React specific rules (@/react)

| Rule ID | Description | | |:--------|:------------|:--:| | no-href-and-src-inline-xss-react | Disallows unescaped variables of uncertain origin from href and src JSX attributes, due to the concern that they might originate from user input. | ✒️ |

Node.js specific rules (@/nodejs)

| Rule ID | Description | | |:--------|:------------|:--:| | detect-sql-injection | Detect the usage of SQL queries that might be vulnerable to SQL Injections. | | | detect-missing-helmet | Disallow use of ExpressJS applications without the use of Helmet.js defaults, due to the concern that the HTTP headers might be insecurely configured. | ✒️ |

❤️ Contributions

We welcome contributions!

Please use GitHub's Issues/PRs.

Please make sure any contributions are covered within the tests, or that new tests are supplied for the contribution.

Testing the rules

To run the tests, use: npm test

Test coverage is achieved through the set of test files, located at: /tests/test-files/<relevant rule-name>/

All test files are prefixed with one of the following:

  • valid_ for files that should give no output. Useful for testing false positives and soundness.

  • invalid_ for files that should give some output. Useful for testing use-cases and completeness.

  • fixed_ for files that contain the output of applying eslint --fix to some invalid_ file.