-
-
Notifications
You must be signed in to change notification settings - Fork 759
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
add eslint rules and plugins for "Apply Linting Only to Files Updated in git #1270" #1397
Conversation
Our Pull Request Approval ProcessWe have these basic policies to make the approval process smoother for our volunteer team. Testing Your CodePlease make sure your code passes all tests. Our test code coverage system will fail if these conditions occur:
The process helps maintain the overall reliability of the code base and is a prerequisite for getting your PR approved. Assigned reviewers regularly review the PR queue and tend to focus on PRs that are passing. ReviewersWhen your PR has been assigned reviewers contact them to get your code reviewed and approved via:
Reviewing Your CodeYour reviewer(s) will have the following roles:
CONTRIBUTING.mdRead our CONTRIBUTING.md file. Most importantly:
Other
|
Are the linting errors expected for only this PR and will work satisfactorily from the CLI? |
No. These errors are due to the new rules added and will be there even for the CLI |
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.
No. These errors are due to the new rules added and will be there even for the CLI
That is not the goal as stated in the issue. We only want linting to be done against files committed in git. Now the next person submitting a PR will have to fix hundreds of linting errors for the remaining tests to pass.
Please contact the author of this PR for assistance
DO NOT CLOSE THIS PR.
Make any adjustments to your branch and do the follow up in this PR
The linting errors are due to the old scripts in the PR workflow. These scripts probably check linting for the whole of the repository and the errors arise due to new linting errors added. We will have to update the PR workflow to check for linting in committed files. |
Please make the changes so that it works as expected You may have repurposed the script names so they are not failing You'll need to restore the functionality, possibly with a new script name |
From what I can see in the PR workflows, the linting is performed for the whole repo and not only files submitted in the PR. Do you want me to change the PR workflow to check only submitted files? @palisadoes |
The errors we see are due to new rules like tsdoc/syntax, import/no-duplicates, and @typescript-eslint/no-explicit-any which were not fixed in old files. Its better we fix them somehow like advised in the PR you mentioned or remove these rules. Please advice @palisadoes |
|
@palisadoes We should revert the rules and open a new PR for each rule. It must be ensured that whenever any change to linting and formatting configurations are made, they must be added to the codebase completely in that PR itself. Bloating this PR with eslint changes is not wise IMO as then we are delaying this PR when it is ready. Also it would allow us to test these changes concerned with |
@palisadoes
Error due to rules other than "no-explicit-any" can be fixed by hand as they are not much in number. I can assist you with that. |
@Shubh152 As a middle ground, we can do the following
|
I agree with you @EshaanAgg . I'll be happy to help with that. I will do as you advice and then open another PR for the planned changes .Should we @palisadoes ? |
Yes. this is long overdue. |
Would it be easier to split this up into multiple issues each handling a different linting rule? That way we could split up the workload. |
There is only one linting rule "no-explicit-any" which is a problem. Rest I will fix in this PR. I think file or directory-wise approach will be good. |
@NamitBhutani Could this approach be used in your case? |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #1397 +/- ##
===========================================
- Coverage 97.44% 97.35% -0.09%
===========================================
Files 138 136 -2
Lines 3683 3560 -123
Branches 1076 1036 -40
===========================================
- Hits 3589 3466 -123
Misses 89 89
Partials 5 5 ☔ View full report in Codecov by Sentry. |
For the admin repo, there are a lot of other errors too, other than the ones related to "typescript-eslint/no-explicit-any". It is definitely possible to fix all but would require a lot of changes and reviews, especially for "@typescript-eslint/no-non-null-assertion". |
What about the approach of linting only the committed files and those submitted in the PR? That will assist greatly. |
9c19e55
into
PalisadoesFoundation:develop
@Shubh152 This has been merged. Create another PR for the remaining linting errors and use the same original issue as a reference. |
What kind of change does this PR introduce?
feature
Issue Number:
Fixes #1270
Did you add tests for your changes?
Snapshots/Videos:
If relevant, did you update the documentation?
Summary
added eslint rules and plugins as requested in ISSUE#1270 and PR#1353
Does this PR introduce a breaking change?
Other information
Have you read the contributing guide?
Yes