Skip to content

Most of JS Hint errors resolved #309

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 7, 2015

Conversation

Igloczek
Copy link
Contributor

@Igloczek Igloczek commented Oct 6, 2015

Hi, I resolved most of the JS Hint errors (mostly inconsistent code formatting, like if statements without braces and equality operators), but still some exist. Honestly I have no idea for what are configs in this functions, so just leave them as they are :)

Qunit tests are passing without errors (hope they cover most of cases).

Running "jshint:files" (jshint) task

   form-validator/security.dev.js
     28 |        validatorFunction : function(val, $el, config) {
                                                        ^ 'config' is defined but never used.
     77 |        validatorFunction : function(value, $el, config, language, $form) {
                                                                            ^ '$form' is defined but never used.
     77 |        validatorFunction : function(value, $el, config, language, $form) {
                                                                  ^ 'language' is defined but never used.
     77 |        validatorFunction : function(value, $el, config, language, $form) {
                                                          ^ 'config' is defined but never used.
    158 |        validatorFunction : function(val, $el, conf) {
                                                        ^ 'conf' is defined but never used.
   form-validator/jquery.form-validator.js
    294 |        validationRule = $elem.attr(conf.validationRuleAttribute),
                 ^ 'validationRule' is defined but never used.
   1718 |    validatorFunction: function (val, $el, conf) {
                                                    ^ 'conf' is defined but never used.

PS. Did you think about moving to Gulp + ESLint? (including file watching, which currently lack the most for me)

victorjonsson added a commit that referenced this pull request Oct 7, 2015
@victorjonsson victorjonsson merged commit bd39ad4 into victorjonsson:master Oct 7, 2015
@victorjonsson
Copy link
Owner

  • The config variables can be removed. I'll fix that.
  • The unit tests could be more extensive, that's for sure...
  • ESlint might be a good idea, what would be the main benefits of using it, compared to jshint?
  • I prefer gulp in general but in this project I don't see any major disadvantage with using grunt. I'm guessing that the watch feature could be implemented using grunt as well.

Btw, thanks for your contribution! It's greatly appreciated

@Igloczek
Copy link
Contributor Author

Igloczek commented Oct 7, 2015

It's great article with comparison of all available JS linting engines - http://www.sitepoint.com/comparison-javascript-linting-tools/
My thoughts after using ESLint are same - precise, with lots of configuration options, but little bit slower (but who cares?)
Actually it's my main production linting engine and I would recommend it to everyone.

IMHO Gulp tasks looks much cleaner than same written for Grunt and most of devs use Gulp (so will be easier to extend/improve plugin in future)

Thanks for your work, this plugin really rocks!

@Igloczek Igloczek deleted the js-hint-errrors-fix branch October 15, 2015 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants