You need to initialize eslint in your working directory, and for that you need a package.json file first.
eslint
package.json
Run this in your terminal and you'll be fine.
npm init --yes && npm init @eslint/config@latest