Skip to content

Allow users to ignore a given set of directories or files

Che Fisher requested to merge GrayedFox/file-name-linter:patch-1 into master

This PR allows users to specify folders and files they want ignored in the config file, like so:

{
  "rules": {
    "docs/.vuepress/components": [
      "/[a-z0-9-]+\\."
    ],
    "docs/en": [
      "readme.md$"
    ],
    "docs/de": [
      "readme.md$"
    ]
  },
  "ignore": [
    "docs/.vuepress/dist",
    "some/other/folder/README.md"
  ]
}

Note: this PR also extends and slightly edits an existing test to regain full coverage. It removes the trailing "/" that was being added by the path.sep inside the CLI tests since that sort of goes against Node conventions (Node returns directories without a trailing separator).

Edited by Che Fisher

Merge request reports