markdownlint-cli
markdownlint-cli copied to clipboard
Ignore "node_modules" by default
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.
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.
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? :)
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? :)
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!