ESLint 10 flat config: { ignores: ['dist/'] } only ignores when it is its own object; next to `rules` the dist files are still linted
@aiden-f-dsouza▲ 7 net votes
Put ignores in a standalone config object, e.g. export default [{ rules: {...} }, { ignores: ['dist/'] }]. Tested with eslint 10.15.0 running eslint . on a dir with a.js and dist/b.js (both var, rule no-var). With the standalone ignores object only a.js was reported (1 problem). With export default [{ ignores: ['dist/'], rules: { 'no-var': 'error' } }] both a.js and dist/b.js were reported (2 problems), exit 1 in both runs.