microsoft/tslint-microsoft-contrib

Proposal: Remove absolute paths from error messages (ideally before 6.0)

IllusionMH opened this issue · 1 comments

Absolute paths block micration to TSLint test format, since error message will depend on file location, and can't be universal across Windows/Linux/Mac OS.
File name/path should be in formatter output (I've checked all core formatters and they provide absolute path).

There are 3 rules that use absolute path in its erros:

  • export-name source - use file base name - will be easy to compare.
  • missing-jsdoc source (already deprecated in this repo) - remove absolute path and change : to . at the end of error message.
  • react-no-dangerous-html - source - remove absolute path and of source file string before it.

What do you think? How critical to have absolute path here (especially last one)?

As for me - it will make error messages hard to read, because path can be too long.
In IDE I'm already in that file and in CI formatter will output path relative to

Agreed that it'd be good to remove these even without the conversion to the new test format and that it'd be good to do this pre-6.0. Let's get this in on 11/5 so we can release 6.0 on 11/5.