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 - npm Package Compare versions

Comparing version 1.0.1 to 2.0.0

13

lib/rules/zhlint.js

@@ -27,3 +27,2 @@ const zhlint = require("zhlint");

data: {
zhlintRuleName: validation.name,
zhlintMsg: validation.message,

@@ -69,3 +68,3 @@ },

messages: {
zhlint: "[zhlint/{{ zhlintRuleName }}] {{ zhlintMsg }}",
zhlint: "[zhlint] {{ zhlintMsg }}",
},

@@ -75,6 +74,14 @@ },

const sourceCode = context.getSourceCode();
const { zhlint: zhlintOptions, ...ruleOptions } = {
let { zhlint: zhlintOptions, ...ruleOptions } = {
lintComments: true,
lintStringLiterals: true,
...context.options[0],
zhlint: {
rules: {
preset: "default",
trimSpace: false, // disabled by default because of false positives
...context.options[0]?.zhlint?.rules,
},
...context.options[0]?.zhlint,
},
};

@@ -81,0 +88,0 @@ return {

{
"name": "eslint-plugin-zhlint",
"version": "1.0.1",
"version": "2.0.0",
"description": "ESLint plugin for Chinese typographies (中文排版) with zhlint",

@@ -16,17 +16,18 @@ "keywords": [

],
"scripts": {
"test": "mocha tests --recursive"
},
"dependencies": {
"requireindex": "~1.1.0",
"zhlint": "^0.3.0"
"requireindex": "^1.2.0",
"zhlint": "^0.7.1"
},
"devDependencies": {
"eslint": "^7.1.0",
"mocha": "^7.2.0"
"eslint": "^8.36.0",
"mocha": "^10.2.0"
},
"engines": {
"node": ">=0.10.0"
"node": "^14.17.0 || >=16.0.0"
},
"license": "MIT"
}
"packageManager": "pnpm@7.29.3",
"license": "MIT",
"scripts": {
"test": "mocha tests --recursive"
}
}

@@ -1,2 +0,2 @@

# <img src="https://raw.githubusercontent.com/Jinjiang/zhlint/master/logo.svg" style="vertical-align: middle;"> eslint-plugin-zhlint
# <img src="https://raw.githubusercontent.com/Jinjiang/zhlint/master/docs/logo.svg" style="vertical-align: middle;"> eslint-plugin-zhlint

@@ -52,3 +52,6 @@ Linting Chinese typographies in JavaScript/TypeScript with [zhlint](https://github.com/Jinjiang/zhlint).

"zhlint": {
"rules": ["space-full-width-content", "space-punctuation"]
"rules": {
"fullWidthPunctuation": ",。:;?!“”‘’()",
"unifiedPunctuation": "traditional"
}
}

@@ -55,0 +58,0 @@ }

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