Comments (5)
This is issue 42, branch is smikes/grunt-jslint exclude-On-42 (will come in as a separate pull request because I did this badly...)
from grunt-jslint.
Should this be closed?
from grunt-jslint.
Let's wait to see if @sterpe weighs in in the next couple days.
On Mar 20, 2014, at 10:28 AM, Stephen Mathieson [email protected]
wrote:
Should this be closed?
Reply to this email directly or view it on
GitHubhttps://github.com//issues/42#issuecomment-38188867
.
from grunt-jslint.
@smikes
Either way they're both O(n) algorithms so should be better in general. I think the algorithm cribbed from JSHint code base is probably faster in situations where someone has a lot of files and is using very few very broad globs, i.e,
['src/**/*.js', '!**/node_modules/**']
since it doesn't actually try to expand all the files in the (potentially huge) exclusion glob.
If the globs are extremely specific, I imagine the map is faster.
The one problem with the map approach is because it doesn't regex the exclusion glob against an fp it's subject to issues of equivalent paths having inequivalent strings -- i.e.,
['./foo/**/*.js', '!**/node_modules/**']
in this case, I think that
**/node_modules/**
is going to expand to:
foo/node_modules/...
so all of the exclusions may be ignored (but we should check this I think).
easy fix is
[..., '!./foo/**/node_modules/**']
but an issue to be aware of.
from grunt-jslint.
FWIW, I guess the issue with #41 is that we didn't path.resolve the exclude paths so the minimatch failed.
I'm fine with whatever approach. Thanks @smikes @stephenmathieson
from grunt-jslint.
Related Issues (20)
- Travis build fails for current node 0.11 HOT 5
- Use node-jslint rather than a submodule HOT 9
- Passing es5 -- Not Catching Trailing Commas HOT 8
- Non-trivial exclude rules take forever to filter.
- Remove shelljs dep
- exclude array is ignored HOT 7
- Error: EISDIR HOT 15
- Reading and removing BOM from UTF8 file HOT 3
- Options.edition with the aboslute path didn't work HOT 7
- Changes to node-jslint HOT 3
- node-jslint will require node 0.8 HOT 1
- How to set jslint options... HOT 1
- Warning: grunt-jslint's interface has changed HOT 2
- Ignore specific warnings HOT 4
- Request - option to run custom function if JSLint fails HOT 1
- Why is this error been thrown when I run jslint using grunt to improve my code quality? HOT 2
- Exclude is not working ... HOT 14
- will it be updated? HOT 9
- array.forEach is not a function HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grunt-jslint.