diff --git a/docs/src/use/migrate-to-9.0.0.md b/docs/src/use/migrate-to-9.0.0.md index 51ea9656510..5f57a5d01f7 100644 --- a/docs/src/use/migrate-to-9.0.0.md +++ b/docs/src/use/migrate-to-9.0.0.md @@ -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 @@ -300,6 +300,14 @@ try { **Related issue(s):** [#17540](https://github.com/eslint/eslint/issues/17540) +## `--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) + ## Removed multiple `context` methods ESLint v9.0.0 removes multiple deprecated methods from the `context` object and moves them onto the `SourceCode` object: @@ -544,11 +552,3 @@ linter.getRules(); ``` **Related Issues(s):** [#13481](https://github.com/eslint/eslint/issues/13481) - -## `--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)