Skip to content

Lint rule themed-component-selectors doesn't work on Windows #4872

@tdonohue

Description

@tdonohue

Describe the bug

Our custom rule dspace-angular-ts/themed-component-selectors doesn't work when npm run lint is run on Windows command-line. It obviously works fine in GitHub (which uses Ubuntu), so it's possible this bug is specific to Windows

To Reproduce

Steps to reproduce the behavior:

  1. Download latest code on Windows
  2. Run npm run clean, npm install and npm run lint

The results you'll see are ~112 errors from the custom and dspace theme directories. All of the errors are the same and reference ds-base-. Here's an example:

C:\dspace-angular\src\themes\custom\app\workflowitems-edit-page\workflow-item-delete\workflow-item-delete.component.ts
  10:13  error  Unthemed version of themeable component should have a selector starting with 'ds-base-'  dspace-angular-ts/themed-component-selectors

C:\dspace-angular\src\themes\custom\app\workflowitems-edit-page\workflow-item-send-back\workflow-item-send-back.component.ts
  10:13  error  Unthemed version of themeable component should have a selector starting with 'ds-base-'  dspace-angular-ts/themed-component-selectors

C:\dspace-angular\src\themes\custom\app\workspaceitems-edit-page\workspaceitems-delete-page\workspaceitems-delete-page.component.ts
  9:13  error  Unthemed version of themeable component should have a selector starting with 'ds-base-'  dspace-angular-ts/themed-component-selectors

C:\dspace-angular\src\themes\dspace\app\header-nav-wrapper\header-navbar-wrapper.component.ts
  14:13  error  Unthemed version of themeable component should have a selector starting with 'ds-base-'  dspace-angular-ts/themed-component-selectors

C:\dspace-angular\src\themes\dspace\app\header\header.component.ts
  23:13  error  Unthemed version of themeable component should have a selector starting with 'ds-base-'  dspace-angular-ts/themed-component-selectors

C:\dspace-angular\src\themes\dspace\app\home-page\home-news\home-news.component.ts
  6:13  error  Unthemed version of themeable component should have a selector starting with 'ds-base-'  dspace-angular-ts/themed-component-selectors

C:\dspace-angular\src\themes\dspace\app\navbar\navbar.component.ts
  18:13  error  Unthemed version of themeable component should have a selector starting with 'ds-base-'  dspace-angular-ts/themed-component-selectors

Expected behavior

Obviously, our lint rules should work regardless of the operating system.

Related work

Unclear when this broke, but it was originally added in #2865 in 8.0. It's possible we didn't thoroughly test it on Windows.

Metadata

Metadata

Labels

affects: 9.xIssue impacts 9.x releasesaffects: mainIssue impacts "main" (latest release).bugclaimed: AtmireAtmire team is working on this issue & will contribute backcode task

Type

Projects

Status

✅ Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions