transitive-bullshit / create-react-library

CLI for creating reusable react libraries.
https://transitivebullsh.it/javascript-dev-tools-in-2022
4.78k stars 299 forks source link

eslint error #14

Closed seleckis closed 6 years ago

seleckis commented 6 years ago

I have this error in Atom while editing index.js: Cannot find module 'eslint-config-standard-react'.

jonthomp commented 6 years ago

Same issue here in Visual Studio Code so I presume its not editor specific https://github.com/jonthomp/react-tabler-components/issues/13

transitive-bullshit commented 6 years ago

There were a few eslint packages missing from the template's devDependencies.

See the updated version here.

jonthomp commented 6 years ago

Thanks @transitive-bullshit, I think eslint-plugin-node and eslint-plugin-promise are also required? Adding those in resolves the missing packages but now I'm getting a configuration error - 'Configuration for rule "indent" is invalid: Value "[object Object]" should NOT have additional properties.'.

transitive-bullshit commented 6 years ago

I think you're right. Will add those as well.

Regarding the configuration rule issue, where is this happening from? Did you copy over the new .editorconfig files or is this also related to eslint?

transitive-bullshit commented 6 years ago

Also, feel 100% free to use your own eslint preferences, as the template is just a guide. I would like to fix any issues with the default config, though.

jonthomp commented 6 years ago

Yeah I have the new .editorconfig file too. The error is coming up in my VSCode output window, the full eslint startup goes like so:

[Info - 18:44:33] ESLint server is running. [Info - 18:44:35] ESLint library loaded from: d:\Development\react-tabler-components\node_modules\eslint\lib\api.js [Error - 18:44:36] d:\Development\react-tabler-components\node_modules\eslint-config-standard\index.js: Configuration for rule "indent" is invalid: Value "[object Object]" should NOT have additional properties. Referenced from: D:\Development\react-tabler-components.eslintrc

Oh yeah totally on the rolling my own, just figured I would help fix it up instead. May or may not decide to just use eslint-config-react-app

transitive-bullshit commented 6 years ago

I believe this should be fixed now. Please reopen a new issue if you're still having problems with the latest version of create-react-library.

Thanks!