--- id: organvm/a-i--skills/coding-standards-enforcer version: "ae4b57d6" license: Apache-2.0 install: manual updated: 2026-07-22 --- # coding-standards-enforcer — Coding Standards Enforcer sets up automated style checks across your codebase using ESLint, Prettier, and git hooks. It enforces naming conventions and code quality rules while catching issues before commits, keeping teams aligned on formatting and standards. Publisher: organvm · Stars: 14 · Updated: 2026-07-22 Install (manual): `git clone https://github.com/organvm/a-i--skills` ## SKILL.md # Coding Standards Enforcer Automate code quality and consistency with linters, formatters, and hooks. ## ESLint Configuration ```javascript // .eslintrc.js module.exports = { extends: [ 'eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:react/recommended', 'prettier' ], rules: { 'no-console': 'warn', '@typescript-eslint/no-unused-vars': 'error', '@typescript-eslint/explicit-function-return-type': 'warn', 'react/prop-types': 'off', 'complexity': ['warn', 10], 'max-lines-per-function': ['warn', 50] } }; ``` ## Prettier Configuration ```json { "semi": true, "singleQuote": true, "trailingComma": "es5", "printWidth": 100, "tabWidth": 2, "arrowParens": "avoid" } ``` ## Pre-commit Hooks ```json // package.json { "husky": { "hooks": { "pre-commit": "lint-staged" } }, "lint-staged": { "*.{ts,tsx}": [ "eslint --fix", "prettier --write" ], "*.{json,md}": [ "prettier --write" ] } } ``` ## Git Hooks Setup ```bash # Install husky npm install --save-dev husky lint-staged # Initialize husky npx husky install # Add pre-commit hook npx husky add .husky/pre-commit "npx lint-staged" ``` ## Naming Conventions ```typescript // PascalCase for classes and types class UserService {} type UserData = {}; // camelCase for functions and variables function getUserById() {} const userName = 'John'; // UPPER_SNAKE_CASE for constants const MAX_RETRY_COUNT = 3; const API_BASE_URL = 'https://api.example.com'; // kebab-case for files // user-service.ts // api-client.ts ``` ## Integration Points Complements: - **verification-loop**: For pre-commit validation - **tdd-workflow**: For test standards - **code-refactoring-patterns**: For style improvement [View on SkillFed](https://skillfed.io/organvm/a-i--skills/coding-standards-enforcer) · [View on GitHub](https://github.com/organvm/a-i--skills)