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

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -