Skip to content

The NPM script "lint" in package.json should be capable of running without including the root path #7434

@tylers-username

Description

@tylers-username

This issue respects the following points:

  • This issue is not already reported on GitHub (I've searched it).
  • I agree to follow Jellyfin's Code of Conduct.
  • This report addresses only a single issue; If you encounter multiple issues, kindly create separate reports for each one.

Describe the bug

This is not a bug, but a developer improvement.

Today, if I run npm run lint ./src/component/experimental, the actual command executed is eslint ./ ./src/component/experimental, which means eslint is scanning every qualified file in the app.

The ESLint config should establish ./ as the default path and package.json should set "lint": to "lint": eslint so that if npx eslint or npm run lint is executed, the commands work the way they always have while enabling targeting of specific files when needed to avoid scanning the entire codebase.

Reproduction Steps

  1. cd $webRoot
  2. npm run lint src/components`

Expected/Actual behaviour

I expect eslint to only scan the src/components directory

Actual behavior

eslint scans all files in ./ and then additionally scans src/components

Logs

No response

Server version

n/a

Web version

10.11.4

Build version

n/a

Platform

all

Browser

n/a

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions