Comments (3)
我看了一下你引用的这个 issue,感觉重点是回避检查代码片段,不然代码里肯定有很多非中文的书写习惯会导致错误,目前 zhlint 默认只会跳过一些比较明显的非中文内容,比如 markdown 里的 code block。
from zhlint.
针对你提供的用例,我建议在执行 zhlint 的上层环境加一些判断规则吧。如果想完全跳过 zhlint 的所有检查,可以加 <!-- zhlint disabled -->
,但我不确定这是不是你想要的。
from zhlint.
感谢作者开发这么好用的工具,规范主要还是用于注释中和 markdown 这种书写。代码和配置文件内容的话,因为各种符号和编程规范,确实可能会冲突。我现在的配置是这样,写前端、JS、TS 这些用起来没啥问题。注释的代码这个引号的提示问题,是 eslint-plugin-zhlint 这个工具没有处理好。
zhlint: {
rules: {
halfWidthPunctuation: '',
fullWidthPunctuation: '',
unifiedPunctuation: 'simplified',
spaceBetweenHalfWidthLetters: false,
spaceAfterHalfWidthPunctuation: false,
},
},
from zhlint.
Related Issues (20)
- v0.7.1 计划
- 另起一行的情况不应该再强制使用空格导致他们变成一行
- TypeError: Cannot read properties of undefined (reading 'match')
- 希望可以生成文本报告 HOT 1
- 请教关于 .zhlintrc 的使用问题 HOT 2
- 全中文下,圆括号用半角还是全角? HOT 1
- 有docker compose版本么? HOT 1
- [BUG] 每次运行 `zhlint --fix` 时都会在文件最后添加一个空行 HOT 1
- .zhlintrc" does not exist. Will proceed as default. HOT 1
- 如果 markdown 文件有 frontmatter 会格式错误(Vitepress) HOT 1
- 有几个 bad case 会报错:Cannot read properties of undefined (reading 'match')
- 重新设计 .zhlintignore 以支持文件筛选 HOT 1
- 基于 W3C 中文排版需求统一术语
- 基于 W3C 中文排版需求进一步细分标点符号类型
- 基于 W3C 中文排版需求更新近似符号统一表和简体/繁体转换表
- recent bug collections
- api-extractor/tsconfig improvement
- 错误输出定位符位置不准确 HOT 2
- feat: add `spaceAroundHyperMark` rule HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zhlint.