gustavnikolaj / linter-js-standard-engine

Linter plugin for Standard Engine based linters.
ISC License
10 stars 6 forks source link

Support ignore in package.json #55

Open gustavnikolaj opened 7 years ago

gustavnikolaj commented 7 years ago

I don't know what we're doing wrong, but as the tests shows, minimatch is not behaving as we expect.

$ node
> var minimatch = require('minimatch')
undefined
> minimatch('foo', 'foo')
true
> minimatch('foo/bar.js', 'foo')
false

The ignore support in standard-engine comes from https://github.com/standard/deglob which depends on https://github.com/isaacs/node-glob which depends on minimatch, so it should be possible to figure it out :-)

novemberborn commented 7 years ago

Looking at this test failure:

2) should ignore /foo/bar/qux.js in /foo with globs ["bar"]

require('minimatch')('bar/qux.js','bar') gives false, but require('minimatch')('bar/qux.js','bar/*') returns true. That seems right to me. I suspect deglob may be matching patterns against the file system and expanding matched directories?

Why don't we copy standard-engines ignore implementation?

olizilla commented 6 years ago

It'd be rad to get this feature!