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

Can't ignore files #608

Closed
mvaragnat opened this issue Sep 1, 2016 · 4 comments

Comments

@mvaragnat
Copy link

commented Sep 1, 2016

This lib is great, thank you. However I ran into a small issue with one project. I read the readme, but I am not able to ignore files when running standar.

I would like to excluse a specific lib in /public/js/, but to illustrate I went as far as having the following block in package.json. In spite of that, standard runs on all files. Any idea of what I'm doing wrong?

"standard": {
      "ignore": [
        "public/*",
        "**/*.js"
      ]
    }

Related question, how do you ignore files if standard is installed locally on the machine and not as a project dependency? I tried both options but the result is the same, files are not ignored.

Thanks for your help!

@dcousens dcousens added the question label Sep 1, 2016

@jonathan-potter

This comment has been minimized.

Copy link

commented Sep 1, 2016

👍 for simple way to turn this off for a file or directory.

Sometimes you have to read code from projects that you do not control, so it would be nice to be able to turn this off.

maybe standard --disable or somesuch which would just dump a .standardrc file in the directory.

@feross

This comment has been minimized.

Copy link
Member

commented Sep 10, 2016

To ignore a specific folder (say "public/js/ignoredlibrary"), you can add the following to package.json:

  "standard": {
    "ignore": [
      "public/js/ignoredlibrary/**/*.js"
    ]
  }

Related question, how do you ignore files if standard is installed locally on the machine and not as a project dependency?

This shouldn't matter. standard will still look for the nearest package.json from the current working directory that you run standard from. So your ignore rules should be obeyed.

@feross feross closed this Sep 10, 2016

@mvaragnat

This comment has been minimized.

Copy link
Author

commented Sep 11, 2016

Thanks @feross ! Actually, my mistake was to add that "standard" object into the "depencies" field of package.json ! I thought it was an option to add to the depency.

I hope others are not as stupid as me :-)

@feross

This comment has been minimized.

Copy link
Member

commented Sep 11, 2016

@mvaragnat No worries. Glad you got it figured out.

@lock lock bot locked as resolved and limited conversation to collaborators May 10, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
4 participants
You can’t perform that action at this time.