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
Adds jslint, and linted files. #53
Conversation
@@ -46,7 +46,7 @@ describe('ko validation integration', function () { | |||
'integer': [ 'Must be number' ] | |||
}), | |||
noNumbersField: ko.observable('').extend({ | |||
'invalidChars': [ '1234567890'.split(''), 'Must not have numbers.' ] | |||
'invalidChars': [ ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0'], 'Must not have numbers.' ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
waaat?
@@ -1,4 +1,5 @@ | |||
var ko = ko || {}; | |||
var ko; | |||
ko = ko || {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😒
@@ -46,7 +46,7 @@ describe('ko validation integration', function () { | |||
'integer': [ 'Must be number' ] | |||
}), | |||
noNumbersField: ko.observable('').extend({ | |||
'invalidChars': [ '1234567890'.split(''), 'Must not have numbers.' ] | |||
'invalidChars': [ String.prototype.split.call(['1234567890'], ''), 'Must not have numbers.' ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have you tried ('1234567890').split('')
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jslint doesn't like that.
On Tue, Jan 21, 2014 at 6:14 PM, João Paulo Bochi
notifications@github.comwrote:
In spec/integration-spec.js:
@@ -46,7 +46,7 @@ describe('ko validation integration', function () {
'integer': [ 'Must be number' ]
}),
noNumbersField: ko.observable('').extend({
'invalidChars': [ '1234567890'.split(''), 'Must not have numbers.' ]
'invalidChars': [ String.prototype.split.call(['1234567890'], ''), 'Must not have numbers.' ]
have you tried ('1234567890').split('')?
—
Reply to this email directly or view it on GitHubhttps://github.com//pull/53/files#r9052419
.
Bruno Trecenti
thoughtworks.com
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jslint doesn't like that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and I don't like jshint for that 😒
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jsLint.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we not using jshint?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because of this https://plus.google.com/+DouglasCrockfordEsq/posts/F3SM7uoVo7x
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 jslint
I don't think anyone agrees with everything in it but I think once you open up the ability to pick and choose it leads to harder team conversations about what you take and what you don't
then |
} | ||
} | ||
}; | ||
self.objectForEach = ko.utils.objectForEach; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I say remove self.objectForEach
and replace with ko.utils.objectForEach
everywhere.
Mixing usage of self.objectForEach
with ko.utils.arrayFilter
, ko.utils.arrayMap
and the likes makes no sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, can we do this as part of another PR, there's already a lot of changes not related to jslint here, and I would like to strict to that scope.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep.
🚢 🇮🇹 |
Adds jslint, and linted files.
This PR adds jslint using the lib grunt-jslint
here are the directives:
it runs as a dependency for the
ci
task, or it can be run standalone usinggrunt jslint
.closes #52