cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Koudritsky <>
Subject Re: Usage of jscs & JSHint in Cordova
Date Wed, 21 Jan 2015 21:01:04 GMT
I added he jscs file in cordova-lib some time ago but didn't enforce it in
npm test because that required more work in the code to get rid of the
remaining style errors. Would be glad if someone invests the effort to make
the code comply with the current (or modified) rules.

Similar story for the spec files, they were excluded from the JShint check
because we didn't have the time/motivation to make them compliant with any
reasonable jshint settings.

I don't have a strong opinion about what is better for jshint, a config
file or individual config lines in js files. One benefit of config comments
is that it works in editors that do real time jshinting, but ignore the
config files in parent dirs (I think Brackets jshint plugin was doing this
some time ago).

I'm not sure if it's worth it moving the config file(s) up the dir, they
probably should live as siblings of the package.json

On Wed, Jan 21, 2015 at 3:16 PM, Murat Sutunc <> wrote:

> Hi,
> I was curious about the jscs and jshint usage in cordova repos. Seems like
> in cordova-lib we currently have:
> -          jscs rules in cordova-lib\cordova-lib
> -          individual jshint rules on some js files under
> cordova-lib\cordova-lib
> -
> While jscs rules are set, it's currently not plugged into `npm test`. Do
> we have a policy in place to enforce these rules? If so I should add it to
> packages.json or just remove the config file.
> Regarding individual jshint rules on files, should we migrate to having
> one .jshintrc file on the base folder (and exclude node_modules). We can
> then add individual flags on files if they are necessary to do so and catch
> any potentially non-hinted files (ex. many files are non-hinted
> spec-cordova\*) According to CB-6973 the following jshint config can be the
> master rule:
> /* jshint node:true, bitwise:true, undef:true, trailing:true,
> quotmark:true,
> indent:4, unused:vars, latedef:nofunc
> */
> Any thoughts?
> Thanks,
> Murat

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message