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

"1:1 error Cannot process specified file: it’s ignored" with remark@3 #130

Closed
jeddy3 opened this issue Feb 27, 2017 · 4 comments
Closed
Labels
🙋 no/question This does not need any changes

Comments

@jeddy3
Copy link

jeddy3 commented Feb 27, 2017

Hello.

Given the following lerna directory structure:

packages
  package1 
    node_modules
    package.json
    README.md 
  package2
    node_modules
    package.json
    README.md
.gitignore
.remarkrc
package.json
README.md

Where .remarkrc contains:

{
  "plugins": [
    "preset-lint-recommended",
    "preset-lint-consistent"
  ]
}

And the root package.json contains:

{
  "scripts": {
    "lint:md": "remark '**/*.md' --ignore-path .gitignore --quiet --frail",
  },
  "devDependencies": {
    "remark-cli": "3.0.0",
    "remark-preset-lint-consistent": "2.0.0",
    "remark-preset-lint-recommended": "2.0.0",
  }
}

And .gitignore contains:

.DS_Store
.env
dist
lerna-debug.log
node_modules
npm-debug.log
coverage

Running npm run lint:md returns a few thousand of the same error (I believe one for each markdown files within the node_modules directories, e.g.:

packages/website/node_modules/leveldown/README.md
  1:1  error  Cannot process specified file: it’s ignored

Whereas the same setup (albeit with a remark-cli@2 configuration object) threw no errors.

I've taken a poke around, but I'm struggling to see what might be causing it. Am I missing something obvious?

@wooorm
Copy link
Member

wooorm commented Feb 27, 2017

The previous version did some magic things there, which caused problems.

Thing is that your globs match those files, and your ignore file says to ignore them. remark doesn’t know what to do in that case, so it warns.

Is there any reason not to pass . instead of the glob? A different file-finding mechanism kicks in then, which should work properly!

@jeddy3
Copy link
Author

jeddy3 commented Feb 27, 2017

Is there any reason not to pass . instead of the glob?

Nope, no particular reason. Using . worked great. Thank you for the very quick reply :)

@jeddy3 jeddy3 closed this as completed Feb 27, 2017
@wooorm
Copy link
Member

wooorm commented Feb 27, 2017

Great. Sure no problem, thanks for using remark!

@theetrain
Copy link

I am also facing this issue. Given there are changes in .github/ISSUE_TEMPLATE/defect_template.md, I have:

.remarkignore

.github/ISSUE_TEMPLATE/**

When running remark --quiet --frail ., I also see the error:

.github/ISSUE_TEMPLATE/defect_template.md
1:1  error  Cannot process specified file: it’s ignored

@wooorm wooorm added the 🙋 no/question This does not need any changes label Aug 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🙋 no/question This does not need any changes
Development

No branches or pull requests

3 participants