- Add package.json with ESLint v9, typescript-eslint, eslint-plugin-react, eslint-plugin-react-hooks, eslint-config-prettier, Prettier, and TypeScript as devDependencies; includes lint, format, and format:check npm scripts - Add eslint.config.js (flat config) with TypeScript recommended rules, React + React Hooks plugin rules, and prettier conflict suppression - Add tsconfig.json with strict: true, ES2020 target, DOM libs, react-jsx - Add .prettierrc with single quotes, 2-space indent, ES5 trailing commas - Update CLAUDE.md to document new tooling and commands Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1.8 KiB
1.8 KiB
Simple Calculator
Greenfield project. Implementation is driven by the Vexa AI-SDLC pipeline (Jira project TSC).
Project Structure
/
├── index.html # Calculator UI (semantic HTML5)
├── styles.css # Responsive CSS layout and styling
├── package.json # Dev dependencies and npm scripts
├── eslint.config.js # ESLint flat config (TypeScript + React rules)
├── tsconfig.json # TypeScript compiler config (strict mode)
├── .prettierrc # Prettier formatting config
├── README.md # Project overview
└── CLAUDE.md # This file
Build Commands
No build step configured yet. Install dependencies with:
npm install
Test Commands
No test suite has been configured yet. Update this section once testing infrastructure is in place.
Development Commands
No dev server or REPL is configured yet. Update this section once the implementation begins.
Lint and Format Commands
npm run lint # Run ESLint
npm run format # Format all files with Prettier
npm run format:check # Check formatting without writing (CI)
Architecture Notes
- Domain: Simple Calculator — arithmetic operations (add, subtract, multiply, divide at minimum).
- Stack: Plain HTML/CSS/JS — no framework or build step.
index.htmlcontains the full UI structure: operand inputs, operation buttons, calculate/clear buttons, result<output>, and an error<p role="alert">.
Code Style
- Linter: ESLint v9 (flat config) with
typescript-eslintrecommended rules,eslint-plugin-react,eslint-plugin-react-hooks, andeslint-config-prettier. - Formatter: Prettier — single quotes, 2-space indent, ES5 trailing commas, 80-char line width.
- TypeScript:
strict: trueenabled intsconfig.json.