Skip to content

feat: allow parseInt(id, 10) without magic number extraction#3

Merged
shaunburdick merged 2 commits into
mainfrom
002-allow-10-magic-number
Jun 18, 2026
Merged

feat: allow parseInt(id, 10) without magic number extraction#3
shaunburdick merged 2 commits into
mainfrom
002-allow-10-magic-number

Conversation

@shaunburdick

Copy link
Copy Markdown
Owner

Summary

Adds 10 to the llm-core/no-magic-numbers ignore list so the standard decimal radix in parseInt() no longer forces a named constant extraction like DECIMAL_RADIX.

Changes

  • es6/index.js — Added 10 to the ignore array: [0, 1, 2, 3, 4, 5, 10, 12, 15, 120]
  • test/test.js, test/test.ts, test/test.tsx — Added parseNumericId() functions using parseInt(id, 10) to verify the literal radix passes lint in JS, TS, and React configurations
  • package.json — Version bumped from 8.0.0 to 8.1.0
  • CHANGELOG.md — Added 8.1.0 entry

Verification

Self-test passes: npm test — zero errors, zero warnings.

Adds 10 to llm-core/no-magic-numbers ignore list so the standard
decimal radix in parseInt() doesn't force a named constant extraction.

Adds parseNumericId() test functions to test.js, test.ts, and test.tsx
to verify the literal 10 radix passes lint in all configurations.
@shaunburdick shaunburdick merged commit 07adb45 into main Jun 18, 2026
7 checks passed
@shaunburdick shaunburdick deleted the 002-allow-10-magic-number branch June 18, 2026 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant