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

feat: Pass --max-warnings value to formatters #16348

Merged
merged 3 commits into from Oct 7, 2022
Merged

feat: Pass --max-warnings value to formatters #16348

merged 3 commits into from Oct 7, 2022

Commits on Sep 25, 2022

  1. Copy the full SHA
    2dc338a View commit details
    Browse the repository at this point in the history

Commits on Oct 7, 2022

  1. Make formatter docs wording consistent

    Originally suggested by @fasttime in
    #16348 (comment).
    btmills committed Oct 7, 2022
    Copy the full SHA
    c772b6c View commit details
    Browse the repository at this point in the history
  2. Update LoadedFormatter and FormatterFunction typedefs

    Originally suggested by @fasttime in
    #16348 (comment).
    
    Internally, I define two types, `MaxWarningsExceeded` and `ResultsMeta`,
    that the updated `LoadedFormatter` and `FormatterFunction` types can
    use. I'm then able to reuse the `ResultsMeta` type instead of the
    generic `Object` type in `ESLint` and `FlatESLint`'s `format` wrapper
    functions.
    
    Externally in the Node.js API docs, I describe the new second argument
    to `LoadedFormatter`'s `format` method inline rather than separately
    documenting the new types.
    
    While working on this, I noticed that `FlatESLint` is using the
    pre-PR #15727 `Formatter` type rather than `LoadedFormatter` and
    `FormatterFunction`. I'll fix that in a follow-up PR to keep this PR
    scoped to passing `maxWarningsExceeded` info.
    btmills committed Oct 7, 2022
    Copy the full SHA
    5624b0b View commit details
    Browse the repository at this point in the history