Skip to content

Commit

Permalink
docs: Publish v8.51.0 release highlights (#476)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdjermanovic authored Oct 6, 2023
1 parent 141b156 commit 68f1ad8
Showing 1 changed file with 28 additions and 2 deletions.
30 changes: 28 additions & 2 deletions src/content/blog/2023-10-06-eslint-v8.51.0-released.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,43 @@ layout: post
title: ESLint v8.51.0 released
teaser: "We just pushed ESLint v8.51.0, which is a minor release upgrade of ESLint. This release adds some new features and fixes several bugs found in the previous release."
image: release-notes-minor.png
draft: true
authors:
- eslintbot
- mdjermanovic
categories:
- Release Notes
tags:
- Release
---


## Highlights

### New CLI option `--no-warn-ignored`

This release includes a new CLI option [`--no-warn-ignored`](/docs/latest/use/command-line-interface#--no-warn-ignored) that, when on, suppresses warnings about ignored files that were explicitly passed in the file list. The new option is available only in the [flat config](/docs/latest/use/configure/configuration-files-new) mode.

This option is particularly useful when ESLint is run with `--max-warnings 0` from tools that pass a list of individual files, such as `lint-staged`, as it prevents exit code 1 when an ignored file is passed.

```
{
"lint-staged": {
"*.js": "eslint --max-warnings 0 --no-warn-ignored"
}
}
```

#### API

As part of this change, `FlatESLint` constructor has a new option `warnIgnored: boolean`, default `true`.

The `warnIgnored` option of `FlatESLint#lintText()` is still available, but it now defaults to the value of the constructor option. Effectively, its default value is changed from `false` to `true`. In order to retain previous behavior, pass `warnIgnored: false` to `FlatESLint#lintText()`:

```js
const eslint = new FlatESLint();

await eslint.lintFiles(patterns);
await eslint.lintText(code, { filePath, warnIgnored: false });
```



Expand Down

0 comments on commit 68f1ad8

Please sign in to comment.