Comments (7)
Thanks for finding this. As you note, it is exactly a problem where the argument to loadJSLintFromPath() is shadowing the higher-level variable path, and then the call to path.resolve fails.
Fixed with latest grunt-jslint 1.1.11, please update to get the new version.
from grunt-jslint.
Could I have one more question? Why did the unit test pass with the two conflict variables?
from grunt-jslint.
function loadJSLintFromPath was not covered by the unit tests. And apparently jslint doesn't regard it as an error when one variable shadows another.
from grunt-jslint.
There was a case for loadJSLintFromPath loading a specific path in test/editions.js:
jslint.loadJSLintFromPath('node_modules/jslint/lib/jslint-2013-08-26.js', function () {
validate(file, opts, this.callback);
}.bind(this));
},
'should not error': function (err, report) {
assert.ifError(err);
},
'should be a correct edition': function (err, report) {
assert.ok(jslint.edition === '2013-08-26');
},
'should have no violations': function (err, report) {
assert.lengthOf(report, 0);
}
from grunt-jslint.
Yes. But the assertion in that case was testing for edition '2013-08-26' , which was also the edition loaded by the previous test case. So even if the call to loadJSLintFromPath failed, the test case wouldn't see it.
from grunt-jslint.
@novaez the custom edition stuff came in as a pr with horrible test coverage. we foolishly assumed it worked and published it without adding proper tests.
sorry for the bug, it's really quite embarrassing.
it should be fixed now, however. can you validate and close the issue?
from grunt-jslint.
@smikes Got it. Thanks!
@stephenmathieson I've got the latest version and it worked well. Thanks for all of your efforts.
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
- Honor excludes, but use faster algorithm HOT 5
- Error: EISDIR HOT 15
- Reading and removing BOM from UTF8 file HOT 3
- 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.