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

textlint-rule-no-pair-nightly

v1.0.0-28614704.c1c7efe

Published

textlint rule for no bracket

Downloads

4

Readme

textlint-rule-no-pair

textlint rule for no pair

📖 Rule Details

This rule checks whether the disallowed brackets are present in the sentences.

🍭 Example

For example, if full-width parenthesis and lenticular brackets are not allowed, the following are NG and OK:

❌ NG

They are coming to our house after work(around six o'clock).

【重要】これは(秘密)です。

✅ OK

They are coming to our house after work (around six o'clock).

[重要] これは(秘密)です。

💿 Installlation

Install with npm:

npm install textlint-rule-no-pair

🚀 Usages

Configure .textlintrc

It’s recommended that this rule is used in .textlintrc.js.

This rule allows all pair by default. So you need to put to disallowPairs option which pairs you do not allow.

Below is an example of using full-width parenthesis and lenticular brackets:

const { FullWidthParenthesis, LenticularBrackets } =
  require('textlint-rule-no-pair').pairs

module.exports = {
  rules: {
    'no-pair': {
      disallowPairs: [FullWidthParenthesis, LenticularBrackets]
    }
  }
}

Custom disallow pairs

If you would like to use other pairs, you can put the pairs scheme.

You must define the pair scheme, which is an object with following the properties:

  • name: the name of the bracket
  • start: the opening pair character
  • end: the closing pair character

these interface is defined in here

module.exports = {
  rules: {
    'no-pair': {
      disallowPairs: [
        {
          name: 'Double Angle Quotation Mark',
          start: '«',
          end: '»'
        }
      ]
    }
  }
}

🔨 Support Built-in Pairs

  • Parenthesis: ( and )
  • Square Brackets: [ and ]
  • Curly Brackets: { and }
  • Full-Width Parenthesis: and
  • Full-Width Square Brackets: and
  • Full-Width Curly Brackets: and
  • Corner Brackets: and
  • White Corner Brackets: and
  • Less-Than and Greater-Than Angle Brackets: < and >
  • Lenticular Brackets: and
  • White Lenticular Brackets: and
  • White Square Brackets: and

These built-in pairs is defined in here

If you would like to use these built-in pairs and custom pairs, you can use spread syntax (...) as follows:

const { defaultPairs } = require('textlint-rule-no-pair')

module.exports = {
  rules: {
    'no-pair': {
      disallowPairs: [
        {
          name: 'Double Angle Quotation Mark',
          start: '«',
          end: '»'
        },
        ...defaultPairs
      ]
    }
  }
}

🙌 Contributing guidelines

If you are interested in contributing to textlint-rule-no-pair, I highly recommend checking out the contributing guidelines here. You'll find all the relevant information such as how to make a PR, how to setup development) etc., there.

©️ License

MIT ©️ 2024 kazupon