Human.js
A tool to ensure that your JavaScript is readable by humans
Install / Use
/learn @Willyham/Human.jsREADME
human.js
Ensure your JavaScript is readable by humans.
human.js lays out a set of guiding principles for writing code which is more readable. To accompy these principles and allow you to incorporate them into your work more easily, it also provides a set of eslint rules, exported as a plugin.
NOTE: Currently under reconstruction. I'll be adding new rules and principles as often as I can. When this becomes useful, I'll cut 1.0.0 and publish this.
Install
$ npm install --save-dev human.js
Usage
The project exports an eslint plugin. You should configure your .eslintrc or package.json files to use these
rules.
{
"env": {
"es6": true
},
"plugins": [
"human.js"
],
"rules": {
"human/no-loops": "error",
"human/no-else": "error",
"human/no-numeric-literal-calls": "error",
"human/no-plus-new": "error",
"human/no-tilde-floor": "error",
"human/no-unary-index-of": "error",
"human/no-bang-bang": "error"
}
}
Rules
- no-loops - Forbid the use imperitive loop constructs.
- no-else - Forbid the use of the 'else' keyword.
- no-numeric-literal-calls - Forbid the use of numeric quirks like 2..toString()
- no-tilde-floor - Forbid the use of ~~.
- no-unary-index-of - Forbid the use of ~ for testing membership.
- no-plus-new - Forbid the use of +new casting.
- no-bang-bang - Forbid the use of !! for boolean casting
Related Skills
node-connect
345.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
104.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
345.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
345.4kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
