Skip to content

此eslint插件可检测代码中的中文简繁体使用,并支持自动修复为指定格式

Notifications You must be signed in to change notification settings

reed-soul/eslint-plugin-chinese

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eslint-plugin-chinese

中文字符检查,判断是否包含中文简体或繁体

Installation

You'll first need to install ESLint:

npm i eslint --save-dev

Next, install eslint-plugin-chinese:

npm install eslint-plugin-chinese --save-dev

Usage

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

{
    "plugins": [
        "chinese"
    ]
}

Then configure the rules you want to use under the rules section.

{
    "rules": {
        "chinese/chinese-check": ["error", "S", { "autoFix": false,"ignore": ["console.log"] }]
    }
}

Rules

🔧 Automatically fixable by the --fix CLI option.

Name Description 🔧
chinese 中文简繁体校验 🔧

About

此eslint插件可检测代码中的中文简繁体使用,并支持自动修复为指定格式

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published