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

Package ignore patterns not applied #163

Closed
dcalhoun opened this issue Feb 17, 2017 · 8 comments
Closed

Package ignore patterns not applied #163

dcalhoun opened this issue Feb 17, 2017 · 8 comments

Comments

@dcalhoun
Copy link

dcalhoun commented Feb 17, 2017

The patterns I place within package.json for standard.ignore do not appear to impact this Atom plugin.

"standard": {
  "ignore": [
    "inspectlet.js",
    "googleAnalytics.js",
    "vendor/**"
  ]
}

I've also reported this in standard/standard-loader#71. So, it's possible I just setting this up incorrectly. However, the ignore patterns work when I run standard via the CLI.

I've created a simple test case here.

@ricardofbarros
Copy link
Owner

Hey @dcalhoun, you're right. Somehow it was broken up to v3.8.1. I have just release new a patch version (v.3.8.2) and it should be fixed.

@dcalhoun
Copy link
Author

Thank you! 😄 I can confirm it is now functioning as expected.

@dcalhoun
Copy link
Author

@ricardofbarros it would appear this bug has been introduced again. My test case is listing incorrect files again. Will you verify, please?

@dcalhoun dcalhoun reopened this Apr 25, 2017
@ricardofbarros
Copy link
Owner

sure @dcalhoun

@sonicdoe
Copy link
Collaborator

I could not reproduce this with linter-js-standard v3.9.0 and the dcalhoun/standard-loader-test repository. If I open the nonStandard.js file, no warnings are displayed.

@dcalhoun Are you still experiencing this issue (with the latest version)?

@dcalhoun
Copy link
Author

@sonicdoe it would appear that it is partially working. Files explicitly added to StandardJS' ignore attribute are in fact ignored and not linted.

However, I still see two issues within dcalhoun/standard-loader-test.

  1. Only *.min.js files are ignored by default. The remaining default ignored files are currently erroneously linted.

    Certain paths (node_modules/, coverage/, vendor/, *.min.js, bundle.js, and files/folders that begin with . like .git/) are automatically ignored.

  2. My understanding is that StandardJS' ignore attribute should be additive.

    Sometimes you need to ignore additional folders or specific minified files. To do that, add a standard.ignore property to package.json:

    So, if I set ignore: ['nonStandard.js'], the default ignore files (e.g. vendor/) should still be ignored.


I pushed up a couple more example files to dcalhoun/standard-loader-test. Let me know if you need any additional clarity.

@sonicdoe
Copy link
Collaborator

linter-js-standard currently only supports the ignore property in package.json. We plan to support standard’s default list of ignored files in the future. I’ll therefore close this in favor of #18.

(The reason why *.min.js files are ignored is because linter itself ignores them by default.)

By the way, thank you for providing a test repository. This makes reproducing way easier 🙂

@dcalhoun
Copy link
Author

@sonicdoe You're welcome. Thank you for your hard work on this great project!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants