diff options
author | Timmy Willison <timmywillisn@gmail.com> | 2013-04-09 11:45:09 -0400 |
---|---|---|
committer | Timmy Willison <timmywillisn@gmail.com> | 2013-04-09 11:59:31 -0400 |
commit | 0fa52c11cbfe70780648b99717f1dd3502befaff (patch) | |
tree | 9cd6bfc3b17ae21385aeebd32205d7281934fa17 /src | |
parent | 0afc92bd73a61a0279a419647458e6ed89638ae0 (diff) | |
download | jquery-0fa52c11cbfe70780648b99717f1dd3502befaff.tar.gz jquery-0fa52c11cbfe70780648b99717f1dd3502befaff.zip |
Update jshintrc to conform to new style guide. Conform to onevar and unused in tests. Fixes #13755.
Diffstat (limited to 'src')
-rw-r--r-- | src/.jshintrc | 12 | ||||
-rw-r--r-- | src/data.js | 12 |
2 files changed, 12 insertions, 12 deletions
diff --git a/src/.jshintrc b/src/.jshintrc index ef8723031..71e505e1d 100644 --- a/src/.jshintrc +++ b/src/.jshintrc @@ -1,18 +1,18 @@ { + "boss": true, "curly": true, + "eqeqeq": true, + "eqnull": true, "expr": true, - "newcap": false, + "immed": true, + "noarg": true, "quotmark": "double", + "smarttabs": true, "trailing": true, "undef": true, "unused": true, - "latedef": false, - "eqeqeq": true, - "maxerr": 100, - "eqnull": true, "sub": true, - "boss": true, "browser": true, "es5": true, diff --git a/src/data.js b/src/data.js index acb3fa265..0fd35033a 100644 --- a/src/data.js +++ b/src/data.js @@ -333,12 +333,12 @@ function dataAttr( elem, key, data ) { if ( typeof data === "string" ) { try { data = data === "true" ? true : - data === "false" ? false : - data === "null" ? null : - // Only convert to a number if it doesn't change the string - +data + "" === data ? +data : - rbrace.test( data ) ? - JSON.parse( data ) : data; + data === "false" ? false : + data === "null" ? null : + // Only convert to a number if it doesn't change the string + +data + "" === data ? +data : + rbrace.test( data ) ? JSON.parse( data ) : + data; } catch( e ) {} // Make sure we set the data so it isn't changed later |