Trouble with eslint

I’ve seen this error on my own plugin. I figured out it was because I tried to update the eslint config file from .eslintrc.cjs to the latest flat config format eslint.config.js via the eslint migration. eslint.config.js doesn’t support the --ext (Command Line Interface Reference - ESLint - Pluggable JavaScript Linter), so changing the file to the older .eslintrc.cjs should fix it.

There are some extra instructions on how to setup the lint files in lint-configs/lint-configs at main · discourse/lint-configs · GitHub

For some extra context, @discourse/lint-configs use eslint 8.57.0, which by default doesn’t utilize the new flat config https://eslint.org/docs/v8.x/use/configure/configuration-files#configuration-file-formats.