Skip to content

Commit

Permalink
docs: update migration guide
Browse files Browse the repository at this point in the history
  • Loading branch information
snitin315 committed Jan 6, 2024
1 parent f43c6c5 commit 08db74f
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions docs/src/use/migrate-to-9.0.0.md
Expand Up @@ -30,7 +30,7 @@ The lists below are ordered roughly by the number of users each change is expect
* [Stricter `/* exported */` parsing](#exported-parsing)
* [`"eslint:recommended"` and `"eslint:all"` strings no longer accepted in flat config](#string-config)
* [`varsIgnorePattern` option of `no-unused-vars` no longer applies to catch arguments](#vars-ignore-pattern)
* [`--output-file` now writes a file to disk even with empty output](#output-file)
* [`--output-file` now writes a file to disk even with an empty output](#output-file)

### Breaking changes for plugin developers

Expand Down Expand Up @@ -300,6 +300,14 @@ try {

**Related issue(s):** [#17540](https://github.com/eslint/eslint/issues/17540)

## <a name="output-file"></a> `--output-file` now writes a file to disk even with an empty output

Prior to ESLint v9.0.0, the `--output-file` flag would skip writing a file to disk if the output was empty. However, in ESLint v9.0.0, `--output-file` now consistently writes a file to disk, even when the output is empty. This update ensures a more consistent and reliable behavior for `--output-file`.

**To address:** Review your usage of the `--output-file` flag, especially if your processes depend on the file's presence or absence based on output content. If necessary, update your scripts or configurations to accommodate this change.

**Related Issues(s):** [#17660](https://github.com/eslint/eslint/issues/17660)

## <a name="removed-context-methods"></a> Removed multiple `context` methods

ESLint v9.0.0 removes multiple deprecated methods from the `context` object and moves them onto the `SourceCode` object:
Expand Down Expand Up @@ -544,11 +552,3 @@ linter.getRules();
```

**Related Issues(s):** [#13481](https://github.com/eslint/eslint/issues/13481)

## <a name="output-file"></a> `--output-file` now writes a file to disk even with empty output

Prior to ESLint v9.0.0, the `--output-file` flag would skip writing a file to disk if the output was empty. However, in ESLint v9.0.0, `--output-file` now consistently writes a file to disk, even when the output is empty. This update ensures a more consistent and reliable behavior for `--output-file`.

**To address:** Review your usage of the `--output-file` flag, especially if your processes depend on the file's presence or absence based on output content. If necessary, update your scripts or configurations to accommodate this change.

**Related Issues(s):** [#17660](https://github.com/eslint/eslint/issues/17660)

0 comments on commit 08db74f

Please sign in to comment.