Nick-Mazuk / eslint-config

A highly opinionated ESLint config.
MIT License
1 stars 2 forks source link

Using specific configs throws errors #64

Open mrmattrc opened 2 years ago

mrmattrc commented 2 years ago

When I run the standard lint script, it runs as expected. However, when I use a more specific config as documented in the README, it throws an error: Error: Failed to load config "plugin:testing-library/recommended" to extend from. In particular, I am trying to use the Next.js or React configs. I've also added "eslint-plugin-testing-library": "^5.0.1" to my project, but it still has the same behavior.

Next.js

{
    "extends": ["@nick-mazuk/eslint-config/next"]
}

React

{
    "extends": ["@nick-mazuk/eslint-config/react"]
}
mrmattrc commented 2 years ago

This line appears to be causing the issue, but I'm not sure why yet.

Nick-Mazuk commented 2 years ago

Hi @mrmattrc,

My guess is that eslint-plugin-testing-library depends on react-testing-library. On all my React projects, I used that library to unit test components.

However, I'm no longer using React in my personal projects (I've switched to Svelte), so feel free to create a quick PR removing that plugin from the React config.