Skip to content

Conversation

@scottlovegrove
Copy link
Contributor

Summary

  • Add max-params ESLint rule with 3-parameter limit and error severity
  • Refactor getAuthorizationUrl() to use options object pattern for cleaner API
  • Add appropriate exceptions for test files and constructors

Breaking Change

The getAuthorizationUrl() function now accepts an options object instead of individual parameters:

Before:

getAuthorizationUrl(clientId, permissions, state, baseUrl)

After:

getAuthorizationUrl({ clientId, permissions, state, baseUrl })

Test plan

  • ESLint passes with new rule configuration
  • Test files remain exempt from max-params rule
  • Constructor with legitimate parameter count has ESLint exception
  • All existing functionality preserved with new API signature

🤖 Generated with Claude Code

scottlovegrove and others added 2 commits October 31, 2025 10:21
- Add max-params ESLint rule set to error with 3 parameter limit
- Disable rule for test files to allow flexibility in test setup
- Refactor getAuthorizationUrl() to use options object instead of 4 separate parameters
- Add ESLint exception for TodoistRequestError constructor

BREAKING CHANGE: getAuthorizationUrl() now accepts an options object instead of individual parameters.
Before: getAuthorizationUrl(clientId, permissions, state, baseUrl)
After: getAuthorizationUrl({ clientId, permissions, state, baseUrl })

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
- Update test.each calls to use options object instead of individual parameters
- Update error test case to use new function signature
- All tests now passing with new API

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@scottlovegrove scottlovegrove merged commit 582bea5 into main Oct 31, 2025
1 check passed
@scottlovegrove scottlovegrove deleted the scottl/max-params branch October 31, 2025 10:30
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.

2 participants