Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't integrate eslint-plugin-react-hooks into Next app #141

Closed
Powell-v2 opened this issue Jun 1, 2021 · 3 comments
Closed

Can't integrate eslint-plugin-react-hooks into Next app #141

Powell-v2 opened this issue Jun 1, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@Powell-v2
Copy link

What version of this package are you using?
"ts-standard": "^10.0.0"

What operating system, Node.js, and npm version?
Ubuntu 20.04.1 LTS "Focal Fossa" (on WSL2)

What happened?
eslint-plugin-react-hooks reports no errors - even though there are a couple of spots in the inspected files where rules of React hooks are broken.

Here's my config in package.json:

"ts-standard": {
    "ignore": [
      "next-env.d.ts"
    ],
    "plugins": [
      "react-hooks"
    ]
  }

eslint-plugin-react-hooks is installed as a dev dependency:

"eslint-plugin-react-hooks": "^4.2.0",

I'm running the following command:
ts-standard --fix

What did you expect to happen?
Expected to see errors reported by ts-standard

Are you willing to submit a pull request to fix this bug?
Depends. I suspect my setup is missing something.

@theoludwig theoludwig added the bug Something isn't working label Jun 13, 2021
@theoludwig
Copy link
Member

Hey! 👋 @Powell-v2

Thanks for your report!
There is an open PR to integrate eslint-plugin-react-hooks inside eslint-config-standard-react, which means that it will be there by default with ts-standard.

@Powell-v2
Copy link
Author

Hey @divlo.

Thanks for your reply! Am I correct in my understanding that ts-standard cannot be extended at will?

@theoludwig
Copy link
Member

Yes! @Powell-v2
As said in README: https://github.com/standard/ts-standard#-please-change-x-rule

If you want to add or personalize some rules, you can instead use eslint and use eslint-config-standard-with-typescript.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

2 participants