javascript - jshint and variable names out of my control -
i'm handling oauth response twitter in angular page reads parameter this:
var oauthtoken = $location.search().oauth_token; jshint complain because
line 13 col 0 identifier 'oauth_token' not in camel case. alternatively can write
var oauthtoken = $location.search()['oauth_token']; but jshint complain
line 13 col 40 ['oauth_token'] better written in dot notation. is there recommended way handle these without using //jshint ignore:line comment?
var oauth_token = 'oauth_token'; var oauthtoken = $location.search()[oauth_token]; ofc choose more appropriate name variables
Comments
Post a Comment