Skip to content

馃挕: Better defaults for defaultExcludeGlobs#8937

Description

@lonix1

Problem

Further to discussion in #8927.

For the vscode extension, default ignores have this default:

  "cSpell.ignorePaths": [
    "package-lock.json",
    "node_modules",
    "vscode-extension",
    ".git/{info,lfs,logs,refs,objects}/**",
    ".git/{index,*refs,*HEAD}",
    ".vscode",
    ".vscode-insiders"
  ],

However this is the default for the library/cli:

const defaultExcludeGlobs = ['node_modules/'];

I think most people would be surprised that .git/ (and others things) is not auto-ignored.

Solution

The default should probably be something like this:

const defaultExcludeGlobs = ['.git/', 'node_modules/'];

Maybe it should also include package-lock.json and pnpm-lock.yaml.

Is there a reason the library/cli default is so minimal?

Alternatives

In cspell.json:

"ignorePaths": [".git/", "node_modules/", "pnpm-lock.yaml"]

And, better docs here so people don't fall into this trap.

Additional Context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions