Skip to content

Linting all files, ignore node_modules at any level #21

@robwilkerson

Description

@robwilkerson

I have a project directory structure that looks a little like this:

/
|- client_module/
|   |- node_modules/
|   |- index.js
|   |_ etl.py
|- node_modules/
|- src/
|   |- tests/
|   |   |- integration/
|   |   |   |- my.test.js
|   |- routes/
|   |   |_ route1.js
|   |_ server.js
|_ test_client/
|   |- node_modules/
|   |_ index.js
|_ package.json

I'm trying to run the lintspacers-cli against all files that aren't in a node_modules directory at any level. So far, the closest I've been able to come is using the following:

lintspaces --editorconfig './.editorconfig' --ignores 'js-comments' .* * **/*

Unfortunately, that doesn't reach all the way down to src/routes/route1.js, much less to src/tests/integration/my.test.js. If I try to inject another globstar all of the node_modules directories are included.

lintspaces --editorconfig './.editorconfig' --ignores 'js-comments' .* * **/**/*

I've tried about a dozen other combinations and some included pattern negation, but in those attempts I get an error that either "!" or "(" is an unexpected token (I use zsh).

I'm hoping someone might be able to move me in the right direction with a pattern that will return everything I'm trying to lint and nothing that I'm not. So far I haven't had much luck on my own.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions