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

Fix min-chained-call-depth rule #134

Merged
merged 8 commits into from
Mar 31, 2022
Merged

Fix min-chained-call-depth rule #134

merged 8 commits into from
Mar 31, 2022

Conversation

georgekaran
Copy link
Member

@georgekaran georgekaran commented Mar 30, 2022

Summary

This pull request aims to fix some conflicts between min-chained-call-depth and newline-per-chained-call.

  • Added a new option to the min-chained-call-depth called ignoreChainWithDepth, which has on purpose the same name as in thenewline-per-chained-call.

Examples

✅ Good

Array(10)
    .fill(10)
    .map(foo => foo)
    .slice(5);
Array(10).fill(10);

❌ Bad

Array(10)
    .map(foo => foo)
    .slice(5);
Array(10)
    .fill(10);

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

@georgekaran georgekaran added the bug Something isn't working label Mar 30, 2022
@georgekaran georgekaran self-assigned this Mar 30, 2022
Fryuni
Fryuni previously approved these changes Mar 30, 2022
@georgekaran georgekaran requested a review from Fryuni March 31, 2022 13:03
Copy link
Member

@marcospassos marcospassos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add option and exemples to the docs

src/rules/min-chained-call-depth/index.ts Outdated Show resolved Hide resolved
src/rules/min-chained-call-depth/index.ts Outdated Show resolved Hide resolved
src/rules/min-chained-call-depth/index.ts Outdated Show resolved Hide resolved
src/rules/min-chained-call-depth/index.ts Outdated Show resolved Hide resolved
src/rules/min-chained-call-depth/index.ts Outdated Show resolved Hide resolved
docs/rules/min-chained-call-depth.md Outdated Show resolved Hide resolved
src/rules/min-chained-call-depth/index.ts Outdated Show resolved Hide resolved
@marcospassos marcospassos merged commit db5eefc into master Mar 31, 2022
@marcospassos marcospassos deleted the fix/min-chained-call branch March 31, 2022 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants