javascripttypescripteslint

How to list files being linted by ESLint


How can I get a list of the files ESLint is checking?

The only talk about it I can find is this eslint issue where a member of the repo suggested running DEBUG=eslint:* eslint. However, the output from that is impossibly large.


Solution

  • A close look at the output shows a single line with eslint:flat-eslint Lint before the filename. Knowing that we can narrow the debug statement based on the output (eslintv8).

    DEBUG=eslint:flat-eslint eslint when using flat config

    or DEBUG=eslint:cli-engine eslint when using deprecated config

    or DEBUG=eslint:flat-eslint,eslint:cli-engine if unsure.

    As the OP in the linked issue suggested, a --list-files option seems like a no brainer for eslint to add.