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

Ulises 2010
  • 478
  • 1
  • 6
  • 16
  • Can you show the error? – Mathew Thompson Aug 04 '22 at 09:07
  • Does this answer your question? [Disable TSLint in VSCode](https://stackoverflow.com/questions/50823743/disable-tslint-in-vscode) – paranaaan Aug 04 '22 at 09:08
  • I try as say in [link]https://stackoverflow.com/questions/50823743/disable-tslint-in-vscode[/link] putting in false the javascript.validate.enable and typescript.validate.enable but isen't works :-( – Ulises 2010 Aug 06 '22 at 07:37
  • Thanks @mattytommo, the error says: "Could not find template file './bookappointments.page.html'.(-992008)" – Ulises 2010 Aug 06 '22 at 07:39
  • How about actually creating an empty HTML file with the same file name ? – wadie Aug 11 '22 at 13:40
  • 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? – Vimal Patel Aug 15 '22 at 15:15
  • Thanks @wadie, maybe it's works, but I think is not very elegant. – Ulises 2010 Aug 16 '22 at 06:19
  • Thanks, @Vimal Patel, I edit the question to clarify. – Ulises 2010 Aug 16 '22 at 06:19
  • I'm still not entirely sure why you chose this approach in the first place. – wadie Aug 16 '22 at 08:08
  • Thanks @wadie, but as I say in the post I don't know other way to replace the html files for the customs – Ulises 2010 Aug 16 '22 at 08:20
  • 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. – wadie Aug 16 '22 at 10:19
  • Thanks @wadie do you know any place with a tutorial or a beter explain? – Ulises 2010 Aug 16 '22 at 10:26

1 Answers1

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
paranaaan
  • 1,626
  • 2
  • 9
  • 17
  • 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" – Ulises 2010 Aug 05 '22 at 09:07