JSLint CommonJS module

10 views
Skip to first unread message

Bram Stein

unread,
May 27, 2010, 7:46:29 AM5/27/10
to Narwhal and Jack
Hello,

I'm not sure how much interest there is for this, but I have wrapped
Douglas Crockford's JSLint as a CommonJS module and wrote a simple
front-end for it using Narwhal's command line argument parser. I know
there is some prior art with respect to command line JSLint front-
ends, but I really needed something that could read from both files
and stdin. I have released the JSLint module and front-end as separate
packages so it is possible to 'require' the JSLint module without my
front-end.

You can install both of them with Tusk:

tusk install http://github.com/bramstein/fulljslint/zipball/master
tusk install http://github.com/bramstein/jslint/zipball/master

If the installation was successful you can run "jslint --help" to get
an overview of the available options. More documentation and source
code is available on my Github page (http://github.com/bramstein/
jslint).

I encountered a small problem while installing remote packages; Tusk
tries to write the package to a temporary directory in the "zips"
subdirectory of the Narwhal home directory. This directory does not
exist by default. Simply creating it fixes the problem. Perhaps Tusk
should create the directory if it doesn't exist.

Thanks,

Bram Stein

Kris Kowal

unread,
May 27, 2010, 3:15:40 PM5/27/10
to narw...@googlegroups.com
On Thu, May 27, 2010 at 4:46 AM, Bram Stein <b.l....@gmail.com> wrote:
> Hello,
>
> I'm not sure how much interest there is for this, but I have wrapped
> Douglas Crockford's JSLint as a CommonJS module and wrote a simple
> front-end for it using Narwhal's command line argument parser. I know
> there is some prior art with respect to command line JSLint front-
> ends, but I really needed something that could read from both files
> and stdin. I have released the JSLint module and front-end as separate
> packages so it is possible to 'require' the JSLint module without my
> front-end.
>
> You can install both of them with Tusk:
>
>    tusk install http://github.com/bramstein/fulljslint/zipball/master
>    tusk install http://github.com/bramstein/jslint/zipball/master

Awesome, it works for me. I can get it added to the tusk catalog if
jslint explicates that it's dependent on fulljslint:

http://github.com/kriskowal/jslint/commit/e467c582fe58be29f728214a915ea5fee689fde9

This will make the following work:

$ tusk update
$ tusk install jslint

I think it would be good to rename fulljslint to jslint-core or
something, so that they stand side by side in lexical order, or jslint
and jslint-command. A name change is not required for my help in
getting it in the catalog though. Thanks!

Kris Kowal

Bram Stein

unread,
May 28, 2010, 1:49:33 AM5/28/10
to Narwhal and Jack
I think renaming fulljslint to jslint-core is a very good idea. I have
changed my repositories to reflect that. I also added the dependency
as you specified. I had this in there before but found out Tusk
doesn't update the catalog after installing a remote package (perhaps
this is by design?). So doing:

tusk install http://github.com/bramstein/jslint-core/zipball/master
tusk install http://github.com/bramstein/jslint/zipball/master

Will result in the second install failing since "jslint-core" is not
in the catalog. This would of course be solved if I distributed my own
catalog or if these packages become part of the official catalog
(which would be great!)

Let me know if you find any other problems,

Thanks,

Bram

On May 27, 9:15 pm, Kris Kowal <kris.ko...@cixar.com> wrote:
> On Thu, May 27, 2010 at 4:46 AM, Bram Stein <b.l.st...@gmail.com> wrote:
> > Hello,
>
> > I'm not sure how much interest there is for this, but I have wrapped
> > Douglas Crockford's JSLint as a CommonJS module and wrote a simple
> > front-end for it using Narwhal's command line argument parser. I know
> > there is some prior art with respect to command line JSLint front-
> > ends, but I really needed something that could read from both files
> > and stdin. I have released the JSLint module and front-end as separate
> > packages so it is possible to 'require' the JSLint module without my
> > front-end.
>
> > You can install both of them with Tusk:
>
> >    tusk installhttp://github.com/bramstein/fulljslint/zipball/master
> >    tusk installhttp://github.com/bramstein/jslint/zipball/master
>
> Awesome, it works for me.  I can get it added to the tusk catalog if
> jslint explicates that it's dependent on fulljslint:
>
> http://github.com/kriskowal/jslint/commit/e467c582fe58be29f728214a915...

Kris Kowal

unread,
May 28, 2010, 1:56:33 AM5/28/10
to narw...@googlegroups.com
On Thu, May 27, 2010 at 10:49 PM, Bram Stein <b.l....@gmail.com> wrote:
> I think renaming fulljslint to jslint-core is a very good idea. I have
> changed my repositories to reflect that. I also added the dependency
> as you specified. I had this in there before but found out Tusk
> doesn't update the catalog after installing a remote package (perhaps
> this is by design?). So doing:
>
>    tusk install http://github.com/bramstein/jslint-core/zipball/master
>    tusk install http://github.com/bramstein/jslint/zipball/master
>
> Will result in the second install failing since "jslint-core" is not
> in the catalog. This would of course be solved if I distributed my own
> catalog or if these packages become part of the official catalog
> (which would be great!)

Added to source.json and rebuilt the catalog. Merge-ready:

http://github.com/kriskowal/narwhal/commit/b85eeb3a6cbea2be880dd2a0758e91dde10b0312

Kris Kowal

Reply all
Reply to author
Forward
0 new messages