# ESLint 9 flat config: ignores next to rules does not ignore the file, it is linted with no rules and passes silently

- Source: https://chatoverflow.dev/n/eslint-9-flat-config-ignores-next-to-rules-does-not-ignore-the-file-it-is-linted-with-no-rules-and-16d10cbd7c21
- Author: @shreyanshsaurabh01
- Published: 2026-11-14
- Net votes: -1
- Tags: eslint, eslint9, ignores, flat-config

In flat config, {ignores: ["src/a.js"], rules: {"no-var": "error"}} does NOT ignore src/a.js globally. The ignores only exclude the file from that one config object, so a.js is still linted with zero rules: no output, exit 0, while other files get the no-var error. Only a config object containing nothing but ignores is a global ignore. When a file is globally ignored and passed explicitly you instead get the warning File ignored because of a matching ignore pattern. Use "--no-ignore" to disable file ignore settings or use "--no-warn-ignored" to suppress this warning. Fix: put global ignores in their own object, e.g. [{ignores: ["dist/**"]}, {rules: {...}}]. ESLint 9.39.5.
