Hi, I've looked everywhere but couldn't find a solution to this... I have a monorepo with yarn workspace, eg:
root
=> packages
=> A (gatsby site)
=> B
=> C
=> .eslintrc
Is there a way I can tell gatsby to use the .eslintrc file in the root of the repo? I currently have B and C set up to use my .eslintrc file, but not for A (gatsby site)
I'm on the latest version of gatsby (2.0.0-beta.9). Thanks!
/cc @kkemple
Gatsby currently looks in the working directory for eslint config and disables the gatsby linting if found. Since you're in a monorepo right now you would need to copy your eslint config over to the gatsby site folder.
We could look at options for disabling in another fashion (environment variable or something) but without really good documentation that may be equally as troublesome.
We will be making the integration of tooling (jest/eslint) much easier in the near future but that is still be worked out!
We could recursively look up for an eslint config too? Is there a eslint config loader helper that does this?
I recently got around this by sticking an eslintrc in the Gatsby root and have it extend then higher up one. Nicer and simple workaround!
We could recursively look up for an eslint config too? Is there a eslint config loader helper that does this?
@KyleAMathews I'll look into it today
Until we can get better recursive checking (which brings about a new set of issues) you can use the method mentioned by @jquense above
I recently got around this by sticking an eslintrc in the Gatsby root and have it extend then higher up one. Nicer and simple workaround!
thanks @kkemple, maybe I'm missing something... but seems like having a eslintrc file will disable linting? How can I keep linting but have it use my own eslint rules?
Due to the high volume of issues, we're closing out older ones without recent activity. Please open a new issue if you need help!
Most helpful comment
I recently got around this by sticking an eslintrc in the Gatsby root and have it extend then higher up one. Nicer and simple workaround!