Skip to content
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

Enable @angular-eslint/template/eqeqeq linting rule #320

Merged
merged 4 commits into from
Oct 27, 2023

Conversation

meisekimiu
Copy link
Member

Enable the @angular-eslint/template/eqeqeq linting rule. This also includes tests for one of the modified components, the file-viewer component which used the == operator instead of ===. The other modified component, the connector component, already has some level of test coverage. Further refactoring of that component can be done once we finally decide to remove the Facebook connector completely (including the message showing its removal).

@meisekimiu meisekimiu force-pushed the lint/@angular-eslint/template/eqeqeq branch from e20a8fd to 1132bea Compare October 27, 2023 20:46
Add tests to the file-browser component before adding a new linting rule
that will cause us to modify some of the component template.

Lint rule: @angular-eslint/template/eqeqeq
The file for the file-viewer tests was named
`file-view.component.spec.ts`. Rename it to
`file-viewer.component.spec.ts` to match the rest of the component
filenames.

Lint rule: @angular-eslint/template/eqeqeq
The `@angular-eslint/template/eqeqeq` linting rule forbids usage of the
== operator in Angular component templates, preferring the more type
safe === operator instead.

Lint rule: @angular-eslint/template/eqeqeq
@meisekimiu meisekimiu force-pushed the lint/@angular-eslint/template/eqeqeq branch from 1132bea to 532a81e Compare October 27, 2023 20:48
@@ -111,7 +111,7 @@ export class FileViewerComponent implements OnInit, OnDestroy {

if (publicProfile) {
publicProfile.archive$()?.subscribe((archive) => {
this.allowDownloads = archive.allowPublicDownload;
this.allowDownloads = !!archive?.allowPublicDownload;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change was made by Prettier.

@meisekimiu meisekimiu marked this pull request as ready for review October 27, 2023 20:52
@meisekimiu meisekimiu merged commit bd91257 into main Oct 27, 2023
2 checks passed
@meisekimiu meisekimiu deleted the lint/@angular-eslint/template/eqeqeq branch October 27, 2023 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants