Skip to content

Execute vue-tsc --noEmit through lint-staged to detect that the scope includes the node_modules file #1457

Open
@lyliang1216

Description

@lyliang1216

When I execute the vue-tsc --noEmit command in lint-staged, the files in node_modules are also checked. However, when I execute vue-tsc --noEmit directly without lint-staged, the check result is normal and the content of node_modules is not included. How to solve this problem?And in the .gitignore, .eslintignore, and .prettierignore files, add the node_modules directory to be ignored
This is configured in package.json
`
image

Debug Logs

Here we also check the files in node_modules
image

### My method (unsuccessful)
At present, I want to filter the files in this directory for this situation, but it seems that my method is wrong
This is configured in lint-staged.config.mjs after modification
image

Debug Logs

This is modified, but it is wrong
image

`

  • OS: Windows 10
  • Node.js: v18.18.0
  • lint-staged: v15.2.7

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions