-
Notifications
You must be signed in to change notification settings - Fork 3
Linting doesn't work out-of-the-box for new developers #8
Comments
@ticean Any thoughts about how we can best have that |
The When one runs
Both tricky problems to debug. I think it's best to prevent it completely and embrace the remote Docker environment. It seems the hurdle is that @machikoyasuda wants her IDE to use the project's runtime for linting, but that runtime is remote. Here are some options: a. Global Linting DependenciesDon't depend on the project runtime. Install the dependencies in the global development environment. b. Use the Containerized Environmenta1) Modify the command script that the IDE uses to run the lint in a Dockerized command. That should be fairly easy to do. a2) Or, treat this similarly to remote debugging. Is there a plugin or technique that will attach to the remote environment? That would probably require some assumption on IDE choice as it may introduce project files to support it. c. Load Dependencies from Outside the Project DirectoryAlternatively, the same trick that we use inside the container could work in the development environment. Node searches up the directory tree to find a
|
@ticean Are you sure host |
Oh, right @aldeed. I forgot about that change with the mounted volume. Thanks. The hard paths in the |
When I first ran the generator to create a basic front-end app, I got several errors when I tried to run
docker-compose run web yarn run lint
.The
package.json
file did not have any of thedevDependencies
I needed to geteslint
running. I got errors indicated required modules were missing, like:[Error - 13:54:51] Cannot find module 'babel-eslint' Referenced from: /Users/machikoyasuda/Desktop/reaction-static/package.json
Here is how I got linting working for me locally:
In my generated app, I ran all of these things so that the
package.json
file has all thedevDependencies
listed and CircleCI was able to build it and runyarn run lint
itself: https://github.com/reactioncommerce/reaction-static/pull/16To improve dev experience, I think we should:
The text was updated successfully, but these errors were encountered: