Thanks to visit codestin.com
Credit goes to github.com

Skip to content

docs(eslint-plugin): [explicit-module-boundary-types] fix doc & code examples #3058

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

Merged
merged 2 commits into from
Feb 15, 2021
Merged

Conversation

MrChocolatine
Copy link
Contributor

  1. For each option of the rule, the sentences Examples of incorrect/correct code for this rule with ... were wrong when the option's value had to be false.

  2. Slight simplification of a few code examples, less confusing.

  3. Fix and homogenise code examples.

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @MrChocolatine!

typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community.

The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately.

Thanks again!


🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint. As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitors per day.

Copy link
Member

@bradzacher bradzacher left a comment

Choose a reason for hiding this comment

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

thanks!
you'll need to format the docs appropriately using prettier

@bradzacher bradzacher added documentation Documentation ("docs") that needs adding/updating awaiting response Issues waiting for a reply from the OP or another party labels Feb 14, 2021
@MrChocolatine
Copy link
Contributor Author

MrChocolatine commented Feb 14, 2021

@bradzacher Yes I just saw that. I made the change on GitHub directly but I will run Prettier as soon as I can run it on my laptop. However I am surprised, I thought I kept the current code style... We will see.

@bradzacher
Copy link
Member

Probably just needs a new line somewhere.

Easiest way to fix it without checking out is to copy paste the file into the prettier demo on their website (just gotta make sure the settings match our config)

@MrChocolatine
Copy link
Contributor Author

MrChocolatine commented Feb 14, 2021

@bradzacher prettier executed ✅ .
Weird, I sincerely thought the previous code was less readable but as we say I did the job boss ¯_(ツ)_/¯ .

export const foo = () =>
  ({
    bar: true,
  } as const);

vs

export const foo = () => (
  {
    bar: true,
  } as const
);

@codecov
Copy link

codecov bot commented Feb 14, 2021

Codecov Report

Merging #3058 (5ec6db2) into master (5a78444) will increase coverage by 0.03%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #3058      +/-   ##
==========================================
+ Coverage   92.65%   92.69%   +0.03%     
==========================================
  Files         314      314              
  Lines       10675    10675              
  Branches     3027     3027              
==========================================
+ Hits         9891     9895       +4     
+ Misses        362      358       -4     
  Partials      422      422              
Flag Coverage Δ
unittest 92.69% <100.00%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ackages/eslint-plugin/src/rules/no-extra-parens.ts 90.27% <100.00%> (+5.55%) ⬆️

Copy link
Member

@bradzacher bradzacher left a comment

Choose a reason for hiding this comment

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

yeah that's an issue they've recently fixed but haven't yet released.
prettier/prettier#8840

@bradzacher bradzacher merged commit d94c6c9 into typescript-eslint:master Feb 15, 2021
@MrChocolatine MrChocolatine deleted the patch-1 branch February 15, 2021 07:45
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
awaiting response Issues waiting for a reply from the OP or another party documentation Documentation ("docs") that needs adding/updating
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants