You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:
$ cd$(mktemp -d)
$ yarn add -D eslint eslint-plugin-react-hooks
$ touch test.js
$ yarn eslint --plugin react-hooks test.jsyarn run v1.17.3warning package.json: No license field
$ /tmp/tmp.nAQkiU0etB/node_modules/.bin/eslint --plugin react-hooks test.jsError: Failed to load plugin 'react-hooks' declared in 'CLIOptions': Cannot find module './src/index' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15) at Function.Module._load (internal/modules/cjs/loader.js:508:25) at Module.require (internal/modules/cjs/loader.js:637:17) at require (/tmp/tmp.nAQkiU0etB/node_modules/v8-compile-cache/v8-compile-cache.js:161:20) at Object.<anonymous> (/tmp/tmp.nAQkiU0etB/node_modules/eslint-plugin-react-hooks/index.js:10:18) at Module._compile (/tmp/tmp.nAQkiU0etB/node_modules/v8-compile-cache/v8-compile-cache.js:194:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10) at Module.load (internal/modules/cjs/loader.js:600:32) at tryModuleLoad (internal/modules/cjs/loader.js:539:12) at Function.Module._load (internal/modules/cjs/loader.js:531:3)error Command failed with exit code 2.info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
What is the expected behavior?
Plugin is loaded successfully.
Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
only eslint-plugin-react-hooks@2.0.0
The text was updated successfully, but these errors were encountered:
Upon inspecting the eslint-plugin-react-hooks (v2.0.0) folder installed (in node_modules), the src folder is missing. index.js expects to be able to import ./src/index.
Do you want to request a feature or report a bug?
Bug (maybe)
What is the current behavior?
eslint-plugin-react-hooks
is not loaded correctly.eslint-plugin-react-hooks@2.0.0/index.js
is not the correct file.packages/eslint-plugin-react-hooks/npm/index.js
should be used.If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:
What is the expected behavior?
Plugin is loaded successfully.
Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
only
eslint-plugin-react-hooks@2.0.0
The text was updated successfully, but these errors were encountered: