Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-zhlint

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-zhlint

ESLint plugin for Chinese typographies (中文排版) with zhlint

  • 2.0.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
7
increased by75%
Maintainers
1
Weekly downloads
 
Created
Source

eslint-plugin-zhlint

Linting Chinese typographies in JavaScript/TypeScript with zhlint.

VSCode Linting Preview

Installation

You'll first need to install ESLint:

npm i eslint --save-dev

Next, install eslint-plugin-zhlint:

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

Usage

Add zhlint to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
  "plugins": ["zhlint"]
}

Then configure the zhlint/zhlint rule under the rules section.

{
  "rules": {
    "zhlint/zhlint": ["warn"]
  }
}

or with options:

{
  "rules": {
    "zhlint/zhlint": [
      "warn",
      {
        "lintComments": true,
        "lintStringLiterals": true,
        "zhlint": {
          "rules": {
            "halfWidthPunctuation": "",
            "fullWidthPunctuation": ",。:;?!“”‘’()",
            "unifiedPunctuation": "traditional"
          }
        }
      }
    ]
  }
}

Options

  • lintComments (boolean, default true): true to enable zhlint in // or /* ... */ comments
  • lintStringLiterals (boolean, default true): true to enable zhlint in string literals (single-quoted / double-quoted strings, and template literals)
  • zhlint (object): options passed down to zhlint

Supported rules

See https://github.com/Jinjiang/zhlint#supported-rules. If no zhlint.rules option provided, all rules are enabled by default.

Keywords

FAQs

Package last updated on 17 Mar 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc