Commit graph

3 commits

Author SHA1 Message Date
Aric Camarata
6f165b79ad ci: fix eslint parser devDeps, typed linting config, prettier formatting
- Add @typescript-eslint/parser and @typescript-eslint/eslint-plugin as
  direct devDependencies (were only transitive, not linked in node_modules)
- Add files pattern and parserOptions.project to eslint.config.mjs so
  ESLint finds and type-checks src/**/*.ts files correctly
- Run prettier --write to fix formatting across all src files
2026-05-31 08:47:17 -04:00
Aric Camarata
fbb2fa9179 chore: adopt shared config packages (tsconfig, eslint, prettier) 2026-05-30 15:06:05 -04:00
Aric Camarata
8f39fcd82e refactor: code quality improvements across the board
- Extract magic numbers into named constants (DHUHR_OFFSET_MINUTES,
  ANGLE_MIN/MAX, LAT_SCALE) with source citations for MCW coefficients
- Add input validation (RangeError) for lat, lng, tz, elevation on all
  public API functions (getTimes, getTimesAll)
- Optimize solar ephemeris: computeAngles() returns declination so
  getTimes/getTimesAll reuse it for Asr instead of computing twice
- DRY: shared constants.ts for DEG, Dhuhr offset, angle bounds
- Improve MethodEntry type with labeled tuple elements and NaN docs
- Add stricter tsconfig (noImplicitReturns, noFallthroughCasesInSwitch)
- Switch tests to node:test framework (TAP output, describe/it blocks)
- Add 8 new input validation tests (104 ESM + 13 CJS total)
- Add ESLint + Prettier with CI lint job
- Remove src/ from npm package files (smaller published tarball)
- Document NaN return behavior in JSDoc for getTimes/getTimesAll
2026-03-08 11:10:22 -04:00