Skip tslint alert in angular
Asked Answered
A

1

1

I have a tslint alert that I want to skip, but as you can see in the image, I use a lot of flags and don't works

enter image description here

I also try to exclude the folder in the tslint conf but also don't works.

The message of the error is: "Could not find template file './bookappointments.page.html'.(-992008)" and if someone is asking, I have the error because I have in the angular.json a filereplacement to replace /bookappointments/bookappointments.page.html whit this one witch is in /bookappointments/costum/bookappointments.page-costum.html"

(I read must not use filereplacment for html files, but don't find how must do :-()

To clarify I attach where I replace the html file:

enter image description here

I do it to costumize the template for a costumer.

As I have many costum I want to have a folder for each with the custom .ts and the .html

Arlin answered 4/8, 2022 at 9:5 Comment(12)
Can you show the error?Armes
Does this answer your question? Disable TSLint in VSCodeTerrilyn
I try as say in [link]https://mcmap.net/q/234727/-disable-tslint-in-vscode[/… putting in false the javascript.validate.enable and typescript.validate.enable but isen't works :-(Arlin
Thanks @mattytommo, the error says: "Could not find template file './bookappointments.page.html'.(-992008)"Arlin
How about actually creating an empty HTML file with the same file name ?Gardener
Thiis is not TSLint error. This is compilation error. You can't directly change the component html file in angular.json. Can you show how and why you want to change the template file?Amalia
Thanks @wadie, maybe it's works, but I think is not very elegant.Arlin
Thanks, @Vimal Patel, I edit the question to clarify.Arlin
I'm still not entirely sure why you chose this approach in the first place.Gardener
Thanks @wadie, but as I say in the post I don't know other way to replace the html files for the customsArlin
The best way to go about this is to have reusable components. The parent component is your bookappointments, then you feed it values potentially using @Input based on the different content you need.Gardener
Thanks @Gardener do you know any place with a tutorial or a beter explain?Arlin
T
0

This is not an error, and it wasn't from angular. It's just a code formatters rule to make each developer implement codes look be the same way.

If you not interested, you can just disable by

modify tslint.json file with

"javascript.validate.enable": false
Terrilyn answered 4/8, 2022 at 9:14 Comment(1)
Thanks a lot but I do 'it and still have the issue. I think is about angular and/or tslint, because is marked after starts VSC and in the bottom says: "Angular: Running ngcc for ../tsconfig.json"Arlin

© 2022 - 2024 — McMap. All rights reserved.