Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

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

Closed
IllusionMH opened this issue Nov 5, 2018 · 1 comment · Fixed by #641
Closed

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

IllusionMH opened this issue Nov 5, 2018 · 1 comment · Fixed by #641
Labels
Difficulty: Easy Someone with little to no experience in TSLint should be able to send a pull request for this issue. Domain: Tooling Repository tasks around improving source tooling. Status: Accepting PRs Type: Rule Feature Adding a feature to an existing rule.
Milestone

Comments

@IllusionMH
Copy link
Contributor

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

@JoshuaKGoldberg JoshuaKGoldberg added Status: Accepting PRs Difficulty: Easy Someone with little to no experience in TSLint should be able to send a pull request for this issue. Type: Rule Feature Adding a feature to an existing rule. Domain: Tooling Repository tasks around improving source tooling. labels Nov 5, 2018
@JoshuaKGoldberg
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Difficulty: Easy Someone with little to no experience in TSLint should be able to send a pull request for this issue. Domain: Tooling Repository tasks around improving source tooling. Status: Accepting PRs Type: Rule Feature Adding a feature to an existing rule.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants