ESLint - Flat file config in 2024
September 9, 2024
This was an easy fix previously. Under env - you had to set the jest to true.
{
"env": {
"jest": true
}
}

The fix in Eslint 9 is
export default [
{
languageOptions: {
globals: {
...globals.jest,
},
},
},
Reference link - https://eslint.org/docs/latest/use/configure/language-options 🔗