一键导入
build-lint-validator
Validate TypeScript compilation and ESLint compliance before code delivery. Use after implementation to ensure production-ready code quality.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Validate TypeScript compilation and ESLint compliance before code delivery. Use after implementation to ensure production-ready code quality.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Add data sources (Dataverse tables or Power Platform connectors) to a Code App. Handles both tabular and nontabular connectors, generates service wrappers and React Query hooks.
Comprehensive Power Platform Code Apps validation. Validates package.json scripts, port configuration, dependencies, project structure, TypeScript compilation, and Power Platform configuration. Use after setup or before deployment.
Deploy Code App to Power Platform with comprehensive pre-deployment validation, build verification, and post-deployment checks. Ensures vite.config.ts has base path configured.
Troubleshoot and fix common Power Apps Code Apps issues including deployment errors, 404 asset errors, Dataverse OData errors, authentication issues, and build failures. Provides diagnostic guidance and automated fixes.
Generate React components for displaying and managing data. Creates list views, detail views, and forms using Fluent UI v9 with React Query hooks integration.
Generate React Query hooks for data operations (queries and mutations). Creates type-safe hooks for fetching, creating, updating, and deleting data with proper cache invalidation.
| name | build-lint-validator |
| description | Validate TypeScript compilation and ESLint compliance before code delivery. Use after implementation to ensure production-ready code quality. |
Systematically validate that implemented code compiles successfully and passes ESLint rules before delivery. This skill acts as the final quality gate to catch compilation errors, type issues, and linting violations that would otherwise be discovered by the user during their own build process.
ALWAYS use after:
Use to validate:
This skill performs 3 critical checks:
Ensures all TypeScript code compiles without errors.
Verifies code passes all ESLint rules and style guidelines.
Attempts to automatically fix common linting issues when possible.
Execute the build command to check for compilation errors:
npm run build
What to check:
Common TypeScript errors:
Type 'string' is not assignable to type 'number')Cannot find module '@/components/Button')Property 'foo' does not exist on type 'Bar')Type 'X' does not satisfy the constraint 'Y')Execute the lint command to check for style violations:
npm run lint
What to check:
Common ESLint errors:
'foo' is defined but never used)React Hook useEffect has a missing dependency)React Hook "useState" is called conditionally)Unexpected console statement)If ESLint reports fixable issues, attempt automatic fixes:
npm run lint -- --fix
Auto-fixable issues include:
Non-fixable issues require manual intervention:
Provide structured feedback on validation results.
# Build & Lint Validation Report
**Date**: [current date]
**Status**: ✅ PASS | ⚠️ WARNINGS | ❌ FAIL
## Summary
- **TypeScript Compilation**: ✅ PASS | ❌ FAIL (X errors)
- **ESLint Check**: ✅ PASS | ❌ FAIL (X errors, Y warnings)
- **Auto-Fix Applied**: Yes | No | N/A
## TypeScript Compilation Results
### Errors (X found)
1. [File path:line:column]: [Error message]
- **Type**: Type error | Import error | Syntax error
- **Fix**: [Suggested fix]
2. [File path:line:column]: [Error message]
- **Type**: Type error | Import error | Syntax error
- **Fix**: [Suggested fix]
### Build Output
[Relevant build output]
## ESLint Results
### Errors (X found)
1. [File path:line:column]: [Rule name] - [Error message]
- **Auto-fixable**: Yes | No
- **Fix**: [Suggested fix or "Auto-fixed"]
2. [File path:line:column]: [Rule name] - [Error message]
- **Auto-fixable**: Yes | No
- **Fix**: [Suggested fix or "Auto-fixed"]
### Warnings (Y found)
1. [File path:line:column]: [Rule name] - [Warning message]
- **Recommendation**: [Suggested action]
### Lint Output
[Relevant lint output]
## Recommendations
### Immediate Actions (Blockers)
1. [Action to fix critical issues]
2. [Action to fix critical issues]
### Suggested Improvements
1. [Recommended code quality improvements]
2. [Recommended code quality improvements]
## Next Steps
- [ ] Fix all TypeScript compilation errors
- [ ] Fix all ESLint errors
- [ ] Address ESLint warnings (if applicable)
- [ ] Re-run validation
- [ ] Proceed to delivery/commit phase
Typical workflow:
1. Developer/Agent: Implements feature code
2. Developer/Agent: Invokes build-lint-validator skill
3. Validator: Runs TypeScript compilation check
4. Validator: Runs ESLint check
5. If issues found: Attempts auto-fix with eslint --fix
6. Validator: Generates validation report
7. If failed: Developer/Agent fixes issues and re-validates
8. If passed: Proceed to commit/PR creation
Manual invocation:
User: "Validate the build and lint status"
System: Runs build-lint-validator skill
Proactive invocation (recommended):
Agent: [Completes feature implementation]
Agent: [Automatically invokes build-lint-validator]
Agent: [Reports validation results to user]
Agent: [Fixes issues if found, or marks task complete if passed]
This skill integrates at two key points:
Type errors:
// Error: Type 'string | undefined' is not assignable to type 'string'
const name: string = user?.name;
// Fix: Add type guard or default value
const name: string = user?.name ?? 'Unknown';
Import errors:
// Error: Cannot find module '@/components/Button'
import { Button } from '@/components/Button';
// Fix: Verify path and component export
import { Button } from '@/components/Button/Button';
// OR
import Button from '@/components/Button';
Unused variables:
// Error: 'data' is assigned a value but never used
const [data, setData] = useState();
// Fix: Remove if truly unused, or prefix with underscore if intentionally unused
const [_data, setData] = useState();
React Hook dependency warnings:
// Warning: React Hook useEffect has a missing dependency: 'fetchData'
useEffect(() => {
fetchData();
}, []);
// Fix: Add dependency or wrap in useCallback
useEffect(() => {
fetchData();
}, [fetchData]);
See references/common-fixes.md for detailed fix patterns for frequent errors.
Validation passes when:
npm run build exits with code 0npm run lint exits with code 0Validation fails when:
Optimization tips:
This skill uses standard exit codes:
Usage: Invoke this skill after implementing features to ensure production-ready code quality. Automatically invoked by implementation agents during Phase 3 (post-implementation) and Phase 5 (pre-delivery) validation gates.