Notable handiwork: PhantomJS, Esprima, FastLZ, KabarVirus, etc.
- Blog: ariya.io
- Twitter: @ariyahidayat
- LinkedIn: ariyahidayat
Timezone: UTC-7.
How to reach me: 📫 ariya.hidayat AT gmail.com.
Grunt task to validate JavaScript source
License: BSD 2-Clause "Simplified" License
Notable handiwork: PhantomJS, Esprima, FastLZ, KabarVirus, etc.
Timezone: UTC-7.
How to reach me: 📫 ariya.hidayat AT gmail.com.
I'm posting this issue to let you know that we will be publishing Grunt 0.4 on Monday, February 18th.
If your plugin is not already Grunt 0.4 compatible, would you please consider updating it? For an overview of what's changed, please see our migration guide.
If you'd like to develop against the final version of Grunt before Monday, please specify "grunt": "0.4.0rc8"
as a devDependency in your project. After Monday's release, you'll be able to use "grunt": "~0.4.0"
to actually publish your plugin. If you depend on any plugins from the grunt-contrib series, please see our list of release candidates for compatible versions. All of these will be updated to final status when Grunt 0.4 is published.
Also, in an effort to reduce duplication of effort and fragmentation in the developer community, could you review the grunt-contrib series of plugins to see if any of your functionality overlaps significantly with them? Grunt-contrib is community maintained with 40+ contributors—we'd love to discuss any additions you'd like to make.
Finally, we're working on a new task format that doesn't depend on Grunt: it's called node-task. Once this is complete, there will be one more conversion, and then we'll never ask you to upgrade your plugins to support our changes again. Until that happens, thanks for bearing with us!
If you have any questions about how to proceed, please respond here, or join us in #grunt on irc.freenode.net.
Thanks, we really appreciate your work!
I'm currently integrating front-end build tasks on a CI server. The CI manager would want a JUnitXML as output.
I've read a mention about that in http://ariya.ofilabs.com/2012/10/javascript-validator-with-esprima.html
I tried to pass a esprimaOptions: {format:'junit'}
to the jsvalidate task, but it doesn't seem to work.
In https://github.com/ariya/grunt-jsvalidate/blob/master/tasks/jsvalidate.js the esprimaOptions doesn't seem to be used.
Maybe there is a good reason at that (impossibility to output well formed XML via Grunt ?), or maybe I missed something. What do you think about that ?
I could try to implement this feature, if feasible / possible.
grunt-jsvalidate is currently using Esprima v1.0.4. That version lacks quite a few additions to Esprima which support ES6 syntax (and many, many fixes). We've started to use the Node 11 branch and can no longer use grunt-jsvalidate as part of our build process because it's using an older version of Esprima.
It would be great to get grunt-jsvalidate updated to use the latest version of Esprima.
Hi! I'm using this tool and it's really helpful. But I was wondering if there is an option for a whitelist/ignore list. For example I want to validate a script which contains some JSP-Syntax because I include the JS-File into a JSP-Template. '<c:choose>' is within the JS-File for example and of course the jsvalidate Tasks fails because of it. Is there a way to tell the script, that this syntax can be ignored?
Best Regards,
Kevin
jsvalidate: {
options: {
verbose: false
},
targetName:{
files:{
src:['<%=jshint.all%>']
}
}
},
Allows for multiple targets.
The current output can be very noisy in automated systems like watch task, or ci servers.
Running "jsvalidate:files" (jsvalidate) task
Validating htdocs/static/js/foo.js OK
Validating htdocs/static/js/bar.js OK
Validating htdocs/static/js/baz.js OK
It'd be great to be able only show failures as opposed to all files being tested. Something similar to what grunt-contrib-jshint does.
Running "jshint:all" (jshint) task
>> 3 files lint free.
When using new version of grunt I get
Loading "jsvalidate.js" tasks...ERROR
>> TypeError: Object #<Object> has no method 'registerHelper'
Running "jsvalidate:files" (jsvalidate) task
Warning: Cannot read property 'src' of undefined Use --force to continue.
Aborted due to warnings.
A lot of people would like the es6 support.
Warning: Unable to read "foo/bar/folder.js" file (Error code: EISDIR). Use --force to continue.
grunt 0.4.1
grunt-jsvalidate 0.2.0
(Node 0.8x and 0.10.1)
Running "jsvalidate:files" (jsvalidate) task
Warning: Cannot read property 'src' of undefined Use --force to continue.
jsvalidate: {
files: ['app/**/*.js']
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.