Skip to content

File matching a parent directory #487

Closed
@rondog

Description

@rondog

I just have a question of file matching and dont even know if this is possible. I have my package.json in a subfolder /docroot/themes/custom/my_theme/package.json and I am using lint-staged to run some precommit git hooks, but I cant get the file pattern matching to work for files that are in parent directories.

I want to search for files in /docroot/modules/custom/**/*.php

I have tried

"docroot/modules/custom/**/*.php": [
  "phpcs --standard=Drupal"
]

"/docroot/modules/custom/**/*.php": [
  "phpcs --standard=Drupal"
]

"modules/custom/**/*.php": [
  "phpcs --standard=Drupal"
]

"../../../modules/custom/**/*.php": [
  "phpcs --standard=Drupal"
]

and I cannot get any of them to match files. My git root is in the /docroot folder. Any ideas?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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