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

remark-lint-prohibited-strings

v4.0.0

Published

Check for prohibited strings

Downloads

21,981

Readme

remark-lint-prohibited-strings

A remark-lint plugin to prohibit specified strings in markdown files. It can be used to lint consistent spelling, abbreviations, or syntax within the text of markdown files (e.g. it will not lint code blocks).

Example configuration:

{
  "plugins": [
    "remark-lint-prohibited-strings",
    [
      { no: "End-Of-Life", yes: "End-of-Life" },
      { no: "End-of-life", yes: "End-of-Life" },
      { no: 'gatsby', yes: "Gatsby", ignoreNextTo: "-" },
      { no: 'sales', yes: "Sales", ignoreNextTo: [ "-", "\'", "'" ] },
      { no: "Github", yes: "GitHub" },
      { no: "Javascript", yes: "JavaScript" },
      { no: "Node.JS", yes: "Node.js" },
      { no: "[Rr][Ff][Cc](\\d+)", yes: "RFC $1", replaceCaptureGroups: true },
      { no: "v8", yes: "V8" },
      { yes: 'Unix' }
    ]
  ]
}

Configuration

no

string, optional

Specifies the string you wish to prohibit. Regular expressions are respected, but can only be supplied as a string. If no is provided, the value must be a string, and the match is case-sensitive. If omitted, then the no string will default to be the case-insensitive match of yes. For example, in the configuration above, users will be told to use "Unix" instead of "unix", or "UNIX".

yes

string, optional

Specifies what users will be told to use instead of the matched no value (if provided). For example, in the configuration above, users will be told to use "GitHub" instead of "Github".

ignoreNextTo

string | string [], optional

Makes a prohibited string allowable if it appears next to that string. It is interpreted as a literal sequence of character(s) that appear immediately before or after the yes text. For example, in the configuration above, users will be told to use "Gatsby" instead of "gatsby". However, "gatsby-plugin" and "node-gatsby" will not be flagged because '-' is included in ignoreNextTo for that rule.

As an array of strings, the items are combined into a regex OR condition to match a number of possible sequences of characters that might appear immediately before or after the yes text. In the configuration above, the linter will instruct the user to use "Sales" instead of "sales", but it will ignore "pre-sales", 'sales', and "sales" (within quotes).

replaceCaptureGroups

boolean, optional

Defaults to false. If set to a truthy value, it enables replacement of regular expression capture groups, that are matched in the no regular expression, with group placeholders in yes. It can be used to provide better linting messages. The message reported to the user will use the same process as the the replacement string in String.prototype.replace(). For example, in the configuration above, users will be told to use "RFC 123" instead of "rfc123", "RFC123", or "Rfc123".