clean-codejs-naming
1
总安装量
1
周安装量
#54001
全站排名
安装命令
npx skills add https://github.com/damianwrooby/javascript-clean-code-skills --skill clean-codejs-naming
Agent 安装分布
amp
1
opencode
1
kimi-cli
1
github-copilot
1
claude-code
1
Skill 文档
Clean Code JavaScript â Naming Patterns
Table of Contents
- Principles
- Variables
- Functions
- Booleans
- Bad vs Good Examples
Principles
- Names should reveal intent
- Avoid abbreviations and mental mapping
- Use domain language consistently
Variables
// â Bad
const d = 86400000;
// â
Good
const MILLISECONDS_PER_DAY = 86400000;
Functions
// â Bad
function getUser(u) {}
// â
Good
function fetchUserById(userId) {}
Booleans
// â Bad
if (!user.isNotActive) {}
// â
Good
if (user.isActive) {}
Bad vs Good Examples
// â Bad
const data = getData();
// â
Good
const usersResponse = fetchUsers();