Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore "node_modules" by default #405

Open
Chrico opened this issue Jun 26, 2023 · 4 comments · May be fixed by #460
Open

Ignore "node_modules" by default #405

Chrico opened this issue Jun 26, 2023 · 4 comments · May be fixed by #460

Comments

@Chrico
Copy link

Chrico commented Jun 26, 2023

By default the node_modules-folder is not ignored. It should be considered - to align with ESLint and Stylelint - to ignore the folder by default.

ESLint
https://eslint.org/docs/latest/use/configure/ignore

In addition to any patterns in the .eslintignore file, ESLint always follows a couple of implicit ignore rules even if the --no-ignore flag is passed. The implicit rules are as follows:

  • node_modules/ is ignored.

Stylelint
https://stylelint.io/user-guide/configure/

Stylelint ignores the node_modules directory by default. However, this is overridden if ignoreFiles is set.

Chrico added a commit to inpsyde/reusable-workflows that referenced this issue Jun 26, 2023
… Markdownlint

See also: igorshubovych/markdownlint-cli#405

Signed-off-by: Christian Leucht <3417446+Chrico@users.noreply.github.com>
@DavidAnson
Copy link
Collaborator

Feels a little like magic - and then it forces other parts of the code to be more complicated (see StyleLint comment you quoted, now there needs to be a way to un-ignore, etc.). That said, I can see why this is handy if you only care about Node projects.

@Chrico
Copy link
Author

Chrico commented Jun 27, 2023

Jip, that's true, you (maybe) need to find a way to "un-ignore" it. But is there actually any use case, why I would like to lint markdown files comming from external dependencies? :)

@DavidAnson
Copy link
Collaborator

VS Code's default ignore list includes bower_components, among others. Should some of those directories be be ignored by default as well? This tool is written in JavaScript, but can be used anywhere. Do other ecosystems have other special folders? Where does the magic stop? :)

@tyrann0us
Copy link

Hi @DavidAnson,

Should some of those directories be be ignored by default as well? This tool is written in JavaScript, but can be used anywhere.

IMO, since this is an npm package, as a first start, I'd only ignore the node_modules/ folder. If there's demand for folder structures from other package managers, these could be added later.
Thanks!

@tyrann0us tyrann0us linked a pull request Feb 21, 2024 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants