Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print relative paths in error reports (including console) #1373

Open
hyperupcall opened this issue Oct 19, 2023 · 0 comments
Open

Print relative paths in error reports (including console) #1373

hyperupcall opened this issue Oct 19, 2023 · 0 comments

Comments

@hyperupcall
Copy link

Is your feature request related to a problem? Please describe.

When printing hinting violations, it prints the absolute path of the HTML file:

/storage/ur/storage_home/Docs/Programming/Repositories/fox-forks/HTMLHint/test/cli/formatters/example.html
      L8 |  <div bad='' bad=''></div>
                ^ The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes)
      L8 |  <div bad='' bad=''></div>
                       ^ The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes)
      L8 |  <div bad='' bad=''></div>
                       ^ Duplicate of attribute name [ bad ] was found. (attr-no-duplication)
      L9 |  <div bad='' bad=''></div>
                ^ The value of attribute [ bad ] must be in double quotes. (attr-value-double-quotes)

Describe the solution you'd like

Both ESLint and Prettier print relative file paths. Relative file paths make it significantly easier to parse the error message and know exactly what file violated a linting rule. This compounds when file paths are long.

Describe alternatives you've considered

Using absolute paths

Additional context
Add any other context or screenshots about the feature request here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant