ricardofbarros / linter-js-standard

Atom linter plugin for JavaScript, using JavaScript Standard Style
https://atom.io/packages/linter-js-standard
MIT License
99 stars 48 forks source link

Package ignore patterns not applied #163

Closed dcalhoun closed 7 years ago

dcalhoun commented 7 years ago

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 timoxley/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 commented 7 years ago

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 commented 7 years ago

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

dcalhoun commented 7 years ago

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

ricardofbarros commented 7 years ago

sure @dcalhoun

sonicdoe commented 7 years ago

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 commented 7 years ago

@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 commented 7 years ago

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 commented 7 years ago

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