codelyzer icon indicating copy to clipboard operation
codelyzer copied to clipboard

a11y errors in console have absolute paths

Open markgoho opened this issue 6 years ago • 2 comments

Describe the bug Errors in the console link to absolute paths. We should use relative paths.

Context and configuration

Please share: a11y rules are what are specifically linking to absolute file paths

To Reproduce Create a template that violates a rule, one for angular style guide, the other for an a11y rule

Expected behavior The error would print in the console with a relative file path

Additional context Here's an error for a style guide rule:

ERROR: C:/Users/Jack/Documents/Rosie/rosie-storefront/libs/storefront/checkout/src/lib/components/address-selector/address-selector.component.ts:5:13 - The selector should be kebab-cased and include a dash (https://angular.io/guide/styleguide#style-05-02)

When that link is ctrl+clicked on in VS Code, here's what the breadcrumbs look like: image

Here is an a11y error:

ERROR: c:/users/jack/documents/rosie/rosie-storefront/libs/storefront/checkout/src/lib/containers/payment-type/payment-type.component.html:10:4 - click must be accompanied by either keyup, keydown or keypress event for accessibility

and the breadcrumbs in VS Code: image

The issue that this presents is that VS Code can't "find" the file in the project when it's opened from an absolute path, so it doesn't show up in the sidebar. Kind of annoying.

markgoho avatar Jul 18 '19 14:07 markgoho

@mohammedzamakhan would you have a moment to look at that?

mgechev avatar Jul 18 '19 17:07 mgechev

Sure 👍

mohammedzamakhan avatar Jul 18 '19 18:07 mohammedzamakhan