With modern eslint (from v8.21.0), if you're using the new config file eslint.config.js, the --ext option is no longer supported. Instead, specify the files to lint in the config, and then run eslint . to lint all specified files.
Example eslint.config.js:
/** @type {import('eslint').Linter.Config[]} */
export default [
{ files: ["**/*.{js,mjs,cjs,ts,jsx,tsx}"] },
{ ignores: ["dist" ] },
// Other config options here
];