-
Notifications
You must be signed in to change notification settings - Fork 2
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
Standardjs installation and running #47
Conversation
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.
Very detailed tests to ensure the tool works as expected. It exposes the errors in the code.
The test looks to be working fine and the example code definitely shows the errors. |
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.
Might need to fix the linting issues for the deployment pipeline but otherwise lgtm!
…atically fixes the code
…lint rules because they differ
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.
really detailed love it.
nit: if we are going to merge though we want to get rid of the lining issues!
This is great info showing how it runs and even fixes errors automatically, especially for everything except unused variable. It should be good to say it has been run at least once in the git flow cycle. |
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.
I just added the StandardJS workflow. It seems that because we have added the static tool to the codebase without changing the codebase to this StandardJS linting standards, the pipeline isn't passing. We can't push unless it passes, but at the same time I see more than 7000 lines of code that needs to be fixed. I tried the automatic formatted but it also seems we have some undefined/null prevention linting rules that we can't automatically fix. It also seems unfeasible for us to go through every line and fix them given the codebase is already so big.
Pull Request Test Coverage Report for Build 11620981110Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
It looks like the standard linter was running on all files. I changed it to only work on the single file we created to get it to pass the pipelines. |
Installation
Example Code that breaks many rules(Generated by chatGPT)
Test:
Added script to package.json
Standard Dependency
After calling npx standard --fix on the file to automatically fix the code (only manually removed the unused variable 'add' function:
Now calling npx standard we can see that it fixed all the errors expect the unused variable error: