The correct behavior of all tools is to assume that .js files are in ES modules format.
Hence you must convert existing .js files (including config files) to ESM format, or rename them to .cjs if you want to keep them intact.
You should rename .eslintrc.js/.prettierrc.js to .cjs extension, or make them a valid JSON with .json extension
.js and .mjs test files work out of the box as ESM; .cjs works as CJS
Non-compliant: .js files do not work correctly. See https://gist.github.com/jakub-g/a5b17be90f42fe74d6f980e353e80143