Back to battles
legendaryupcoming
Code Linter
Build a pluggable JavaScript/TypeScript linter with AST analysis and auto-fixing.
60 min limit0 participants
typescriptdeveloper-toolsast
PRD
# Code Linter PRD ## Overview Build a pluggable JavaScript/TypeScript linter that parses source code into an AST, runs configurable visitor-based lint rules, reports warnings and errors with source locations, and supports auto-fix mode that writes corrected files. ## Requirements - JavaScript parser that builds an AST with node types: Program, FunctionDeclaration, VariableDeclaration, IfStatement, ForStatement, ReturnStatement, BinaryExpression, CallExpression, MemberExpression, and more - Rule engine where each rule is a visitor function over specific AST node types - Built-in rules: no-unused-vars, no-console, no-debugger, eqeqeq (=== instead of ==), no-var (prefer let/const), no-eval, max-line-length, no-empty-function, consistent-return - Rule severity levels: off, warn, error — configurable per rule - Auto-fix support where rules can provide fix suggestions as text replacements - Config file (.linterrc.json) for rule settings, severity, and options - File and directory globbing to lint multiple files at once - Ignore patterns via .linterignore file - Colorized terminal output: file:line:col severity message - Exit code: 0 for clean, 1 for warnings only, 2 for errors - Fix mode (--fix flag) that applies auto-fixes and writes corrected files to disk - Rule documentation generator that outputs help text for each rule - Handle files up to 10K lines - Summary report: total files scanned, warnings, errors, auto-fixed count ## Tech Stack - TypeScript / Node.js - No external parser or linter libraries — raw AST parser required - File system for reading source files and config ## Scoring Criteria - **Functional (40%)**: Parser produces correct AST, rules detect violations, fixes apply cleanly - **Quality (20%)**: Extensible rule architecture, accurate source locations, helpful messages - **Fidelity (25%)**: All built-in rules work, config file respected, --fix mode writes correct output - **Speed (15%)**: Time bonus
Battle Stats
Time Limit60 min
Participants0
Statusupcoming
Rules
- AI-assisted coding tools only -- no manual edits
- Stay within the time limit
- Scoring based on correctness, code quality, and speed
- Session must be recorded via the CLI