-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Fix ESLint errors for search packages #10780
Comments
Hi @praveenkuttappan , is this still an open issue? I'm willing to take it on |
This still seems like an open issue. Adding @deyaaeldeen and @ramya-rao-a to confirm, |
@abc516 @praveenkuttappan Yes this is still an issue, here is the linting report. |
ok @deyaaeldeen @praveenkuttappan can you assign this to me please? |
@abc516 Please go ahead and submit a PR for fixing the linter errors |
Hi @deyaaeldeen @ramya-rao-a @praveenkuttappan I'm working on this issue atm. I'm running into a lot of lint errors regarding unit tests (no-useless catch). According to the rule on eslint (https://eslint.org/docs/rules/no-useless-catch), I could delete the catch block but I feel that would mess up the logic. I'd like some input before I proceed, please. Thanks. Here's a snippet from the searchIndexClient.spec.ts file below.
|
In the above code snippet, I dont see how removing the catch block would change the logic. The finally block would still work even if we don't have the explicit catch block which does nothing but rethrow the error @sarangan12, Do you recall the reason you had the above catch block? |
Originally, I thought I can do some retry in the catch. Later, decided they were not necessary. I am Ok with removing the catch block. |
OK @sarangan12 I made a PR for this. Can you add the label hacktoberfest-accepted to the PR please? |
@abc516 This repository has the |
@sarangan12, @xirzec, The pending linting errors and warning are: In #11868, we discussed about disabling
How do you want to tackle the two warnings about classes being passed to methods instead of interfaces? |
I think we should replace the class reference with an interface that is compatible with whatever searchIndexingBufferedSender actually needs to call. |
Code complete with PR: #13114 |
Yay! |
Fix lint errors found in search packages by ESLint. Following are the steps to run ESLint for search packages and reproduce this issue.
<repo root>/sdk/search/<package-name>
rushx lint
<repo root>/sdk/search/<package-name>
with name ends with lintReport.htmlOnce all known issues are resolved, below change is required in
package.json
file in package root<repo root>/sdk/search /<package-name>
to treat any new lint regression as hard failure in CI.package.json
-f html -o template-lintReport.html || exit 0
Note: HTML report name prefix may be different for each package name to differentiate the report for each package.
The text was updated successfully, but these errors were encountered: