npm-check icon indicating copy to clipboard operation
npm-check copied to clipboard

npm-check incorrectly flags partial SCSS files as unused dependencies

Open danny007in opened this issue 1 year ago • 1 comments

GitHub Copilot: Sure, here's a possible description for the GitHub issue:


Description

When running npm-check to check for unused dependencies in a project that uses SCSS, partial SCSS files that are imported in the main SCSS file are incorrectly flagged as unused dependencies. This is because partial SCSS files are prefixed with an underscore (_) and npm-check does not recognize them as being used in the main file.

Steps to Reproduce

  1. Create a project that uses SCSS and has at least one partial SCSS _partial.scss file that is imported in the main SCSS file.
  2. Run npm-check to check for unused dependencies.
  3. Observe that the partial SCSS file is incorrectly flagged as an unused dependency.

Expected Behavior

npm-check should recognize partial SCSS files that are imported in the main SCSS file as being used and not flag them as unused dependencies.

Actual Behavior

npm-check incorrectly flags partial SCSS files as unused dependencies.

Environment

  • Operating System: [Windows 11 pro]
  • Node.js version: [18.17.1]
  • npm-check version: [6.0.1]

Let me know if you want me to make any changes to the description.

Code_8gWUHqLWfE

danny007in avatar Oct 05 '23 07:10 danny007in

also in https://github.com/dylang/npm-check/issues/305

danny007in avatar Oct 05 '23 07:10 danny007in