You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@streampipes.apache.org by GitBox <gi...@apache.org> on 2023/01/03 11:44:55 UTC

[GitHub] [streampipes] aamirxshaikh commented on issue #877: Apply UI linting to all modules

aamirxshaikh commented on issue #877:
URL: https://github.com/apache/streampipes/issues/877#issuecomment-1369675581

   I have been performing UI linting and formatting for configuration module. 
   
   Upon performing linting, I came a warning and few errors.
   
   Warning:
   
   ```
   D:\root\Code\Open source\streampipes\ui\src\app\app-asset-monitoring\dialog\add-pipeline\add-pipeline-dialog.component.ts
     78:5  warning  Lifecycle interface 'OnInit' should be implemented for method 'ngOnInit'. (https://angular.io/styleguide#style-09-01)  @angular-eslint/use-lifecycle-interface
   ```
   
   I fixed the above warning by implementing OnInit interface on AddPipelineDialogComponent.
   
   `export class AddPipelineDialogComponent implements OnInit`
   
   That fixed the warning.
   
   Also I came across few errors which occurs in multiple files and I'll be listing them below:
   
   ```
   D:\root\Code\Open source\streampipes\ui\src\app\configuration\consul-configs\consul-configs.component.html
     37:51  error  Expected `===` but received `==`  @angular-eslint/template/eqeqeq
   ```
   
   For the above error, I have replaced "==" with "===", for all the respected files, and that fixed the error.
   
   ```
   D:\root\Code\Open source\streampipes\ui\src\app\configuration\consul-configs-boolean\consul-configs-boolean.component.ts
     24:15  error  The selector should start with one of these prefixes: "sp" (https://angular.io/guide/styleguide#style-02-07)  @angular-eslint/component-selector
   ```
   
   I'm not sure how to fix the above error. I have tried searching for the solution. I Couldn't find anything.
   
   ```
   D:\root\Code\Open source\streampipes\ui\src\app\configuration\export\import-dialog\data-import-dialog.component.ts
     49:5  error  Lifecycle methods should not be empty  @angular-eslint/no-empty-lifecycle-method 
   ```
   
   Also, I'm not sure about the above error, I came across a solution which stated that we need to modify ".eslintrc.json" file to exclude the rule from the linter.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@streampipes.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org