-
Notifications
You must be signed in to change notification settings - Fork 138
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
Resolving Eslint Errors #634
base: main
Are you sure you want to change the base?
Resolving Eslint Errors #634
Conversation
- Added the creation of the .eslintignore file which is used to ignore the linting of javascript files. 2. Changes to test_runner.bash - Indentation fixes
- Created an eslintignore file that ignores the Cypress tests
- Added a line to ignore the .eslintignore. 2. Changes to the dev/Dockerfile - Copied the .eslint file inside the docker/dev directory into the container. Built the container locally, and this did the trick. - Unfortunately, I couldn't get Cypress to work on my machine to be able to verify that it works on the host machine. You only need one .eslintignore file, and it might be that the one in the docker/dev directory is good enough.
- Making sure the .eslintignore file remained hidden
- Realized that ignoring the .eslintignore is NOT what we want. We want it to be included in the project. 2. Addition of the dev/.eslintignore file - File that prevents eslint from running on js files.
- Moved the new COPY command below line 187 w/explaination for its existence
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved the COPY ./.eslintignore .
command below line 187 below the other copy commands with an accompanying comment explaining its use.
2. Changes to dev/Dockerfile - Changed the COPY command to make the visible eslintignore file invisible inside the dev container
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed the .eslintignore
file to eslintignore
.
Looks good. As one last check for possible other impacts, please try to install an eslint extension in VSCodium in the dev container to be sure that it is not affected by the |
Great! We should check it the other way around also. Can you use the extension to lint js code in VSCodium in the dev container? |
I was testing out some potential solutions for allowing the linter to run on the file without running on the tests, but I couldn't get very far because VS Codium has stopped working. I actually removed the volume and image for the dev container and reinstalled it, but it crashes when clicking on the eslint extension. example.mp4 |
I resolved the issue another way. First, I manually installed the Eslint plugin for Cypress [here] into the
After all that hard work, I was able to observe the fruits of my labor. Now the final piece in this saga is actually figuring out if this still allows the files inside VS codium to work. Unfortunately...I cannot test that. It keeps crashing. But I feel so close to a solution! Edit: I finally was able to both install the extension and click on a Cypress component test. No linting occurs. I have no clue if this is a back to the drawing boards moment or if VS codium isn't working correctly. Regardless, it was an interesting night. example.mp4 |
It seems like maybe it is the particular eslint extension that you are using that is leading to the VSCodium crashes. Maybe try one of the others to see if that makes a difference. I think FarmData2 is likely to use the Prettier extension so that would be a good one to try. |
This PR should be flipped back to a draft. |
…-Dev-Team-2022/FarmData2 into Issue600_EslintErrors
- somehow my changes were removed from my system. I had to add these files back before working. No changes here besides incorporating the stylesheet. Changes to BCalendarDateSelection.js - no noteable changes. Could not figure out how to make BCalendar work. Changes to BCalendarDateSelection.spec.comp.js - No noteable changes. Basically the same.
Pull Request Description
Closes #600. Adds an
.eslintignore
file that prevents eslint from running on JavaScript files. This file is located inside the /docker/dev directory which has a new addition to its Dockerfile which copies it into this directory. I couldn't run Cypress test on my host machine (Windows 10) and check to see if this.eslintignore
would also suffice to stop any errors for testing outside the dev container.Licensing Certification
FarmData2 is a Free Cultural Work and all accepted contributions are licensed as described in the LICENSE.md file. This requires that the contributor holds the rights to do so. By submitting this pull request I certify that I satisfy the terms of the Developer Certificate of Origin for its contents.