Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update: Improve array-callback-return report message #13395

Merged
merged 6 commits into from Jul 3, 2020

Commits on Jun 28, 2020

  1. Update: Improve array-callback-return report (explains why)

    The array-callback-return rule should explain that a return value is required because the surrounding method requires it. This makes it clear that eg. .filter() expects the passed function to return something, rather than a general expectation of that function.
    
    The error messages for expectedAtEnd/Inside now read 'Method .{{arrayMethodName}}() expected a value to be returned at the end of {{name}}.' and 'Method .{{arrayMethodName}}() expected a return value from {{name}}.'
    mrflip committed Jun 28, 2020
    Copy the full SHA
    e526893 View commit details
    Browse the repository at this point in the history
  2. Update lib/rules/array-callback-return.js

    Co-authored-by: Kai Cataldo <kai@kaicataldo.com>
    mrflip and kaicataldo committed Jun 28, 2020
    Copy the full SHA
    e6f640f View commit details
    Browse the repository at this point in the history
  3. Update lib/rules/array-callback-return.js

    Co-authored-by: Kai Cataldo <kai@kaicataldo.com>
    mrflip and kaicataldo committed Jun 28, 2020
    Copy the full SHA
    65374e1 View commit details
    Browse the repository at this point in the history
  4. Update: Improve array-callback-return report (explains why) patch

    * Made tests match proposed new message.
    mrflip committed Jun 28, 2020
    Copy the full SHA
    0cdf1a8 View commit details
    Browse the repository at this point in the history
  5. fix: forEach message, .from Owner

    * forEach has a message, and describes why no return value is expected.
    * present tense ('Array.from expects no' vs 'Array.from expected no')
    * Added explicit check of the forEach message
    mrflip committed Jun 28, 2020
    Copy the full SHA
    71847d4 View commit details
    Browse the repository at this point in the history
  6. Copy the full SHA
    2e349c2 View commit details
    Browse the repository at this point in the history