{"action":"created","comment":{"url":"https://api.github.com/repos/jshint/jshint/pulls/comments/33827589","id":33827589,"diff_hunk":"@@ -2930,3 +2930,71 @@ exports.module.declarationRestrictions = function( test ) {\n \n   test.done();\n };\n+\n+exports.esversion = function(test) {\n+  var code = [\n+    \"// jshint esversion: 3\",\n+    \"// jshint esversion: 4\",\n+    \"// jshint esversion: 5\",\n+    \"// jshint esversion: 6\",\n+    \"// jshint esversion: 2015\"\n+  ];\n+\n+  TestRun(test, \"Value\")\n+    .addError(2, \"Bad option value.\")\n+    .test(code);\n+\n+  var es5code = [\n+    \"var a = {\",\n+    \"  get b() {}\",\n+    \"};\"\n+  ];\n+\n+  TestRun(test, \"ES5 syntax as ES3\")\n+    .addError(2, \"get/set are ES5 features.\")\n+    .test(es5code, { esversion: 3 });\n+\n+  TestRun(test, \"ES5 syntax as ES5\")\n+    .test(es5code); // esversion: 5 (default)\n+\n+  TestRun(test, \"ES5 syntax as ES6\")\n+    .test(es5code, { esversion: 6 });\n+\n+  var es6code = [\n+    \"var a = {\",\n+    \"  ['b']: 1\",\n+    \"};\"\n+  ];\n+\n+  TestRun(test, \"ES6 syntax as ES3\")\n+    .addError(2, \"'computed property names' is only available in ES6 (use 'esversion: 6').\")\n+    .test(es6code, { esversion: 3 });\n+\n+  TestRun(test, \"ES6 syntax as ES5\")\n+    .addError(2, \"'computed property names' is only available in ES6 (use 'esversion: 6').\")\n+    .test(es6code); // esversion: 5 (default)\n+\n+  TestRun(test, \"ES6 syntax as ES6\")\n+    .test(es6code, { esversion: 6 });\n+\n+\n+  TestRun(test, \"precedence over `es3`\") // TODO: Remove in JSHint 3\n+    .test(es6code, { esversion: 6, es3: true });\n+\n+  TestRun(test, \"precedence over `es5`\") // TODO: Remove in JSHint 3\n+    .addError(0, \"ES5 option is now set per default\")\n+    .test(es6code, { esversion: 6, es5: true });\n+\n+  TestRun(test, \"precedence over `esnext`\") // TODO: Remove in JSHint 3","path":"tests/unit/options.js","position":77,"original_position":77,"commit_id":"c162dd2c024ad05a9a0c409cb953788130a91c03","original_commit_id":"c162dd2c024ad05a9a0c409cb953788130a91c03","user":{"login":"lukeapage","id":309321,"avatar_url":"https://avatars.githubusercontent.com/u/309321?v=3","gravatar_id":"","url":"https://api.github.com/users/lukeapage","html_url":"https://github.com/lukeapage","followers_url":"https://api.github.com/users/lukeapage/followers","following_url":"https://api.github.com/users/lukeapage/following{/other_user}","gists_url":"https://api.github.com/users/lukeapage/gists{/gist_id}","starred_url":"https://api.github.com/users/lukeapage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukeapage/subscriptions","organizations_url":"https://api.github.com/users/lukeapage/orgs","repos_url":"https://api.github.com/users/lukeapage/repos","events_url":"https://api.github.com/users/lukeapage/events{/privacy}","received_events_url":"https://api.github.com/users/lukeapage/received_events","type":"User","site_admin":false},"body":"not sure what the precedence is for TODO's, a core team member probably has an opionion","created_at":"2015-07-02T22:06:44Z","updated_at":"2015-07-02T22:06:44Z","html_url":"https://github.com/jshint/jshint/pull/2519#discussion_r33827589","pull_request_url":"https://api.github.com/repos/jshint/jshint/pulls/2519","_links":{"self":{"href":"https://api.github.com/repos/jshint/jshint/pulls/comments/33827589"},"html":{"href":"https://github.com/jshint/jshint/pull/2519#discussion_r33827589"},"pull_request":{"href":"https://api.github.com/repos/jshint/jshint/pulls/2519"}}},"pull_request":{"url":"https://api.github.com/repos/jshint/jshint/pulls/2519","id":39127468,"html_url":"https://github.com/jshint/jshint/pull/2519","diff_url":"https://github.com/jshint/jshint/pull/2519.diff","patch_url":"https://github.com/jshint/jshint/pull/2519.patch","issue_url":"https://api.github.com/repos/jshint/jshint/issues/2519","number":2519,"state":"open","locked":false,"title":"`esversion` option","user":{"login":"nicolo-ribaudo","id":7000710,"avatar_url":"https://avatars.githubusercontent.com/u/7000710?v=3","gravatar_id":"","url":"https://api.github.com/users/nicolo-ribaudo","html_url":"https://github.com/nicolo-ribaudo","followers_url":"https://api.github.com/users/nicolo-ribaudo/followers","following_url":"https://api.github.com/users/nicolo-ribaudo/following{/other_user}","gists_url":"https://api.github.com/users/nicolo-ribaudo/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolo-ribaudo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolo-ribaudo/subscriptions","organizations_url":"https://api.github.com/users/nicolo-ribaudo/orgs","repos_url":"https://api.github.com/users/nicolo-ribaudo/repos","events_url":"https://api.github.com/users/nicolo-ribaudo/events{/privacy}","received_events_url":"https://api.github.com/users/nicolo-ribaudo/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-07-02T21:24:53Z","updated_at":"2015-07-02T22:06:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d62de14dd0b936db486f37903f3cb3daafaae845","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jshint/jshint/pulls/2519/commits","review_comments_url":"https://api.github.com/repos/jshint/jshint/pulls/2519/comments","review_comment_url":"https://api.github.com/repos/jshint/jshint/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jshint/jshint/issues/2519/comments","statuses_url":"https://api.github.com/repos/jshint/jshint/statuses/c162dd2c024ad05a9a0c409cb953788130a91c03","head":{"label":"nicolo-ribaudo:esversion-option","ref":"esversion-option","sha":"c162dd2c024ad05a9a0c409cb953788130a91c03","user":{"login":"nicolo-ribaudo","id":7000710,"avatar_url":"https://avatars.githubusercontent.com/u/7000710?v=3","gravatar_id":"","url":"https://api.github.com/users/nicolo-ribaudo","html_url":"https://github.com/nicolo-ribaudo","followers_url":"https://api.github.com/users/nicolo-ribaudo/followers","following_url":"https://api.github.com/users/nicolo-ribaudo/following{/other_user}","gists_url":"https://api.github.com/users/nicolo-ribaudo/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolo-ribaudo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolo-ribaudo/subscriptions","organizations_url":"https://api.github.com/users/nicolo-ribaudo/orgs","repos_url":"https://api.github.com/users/nicolo-ribaudo/repos","events_url":"https://api.github.com/users/nicolo-ribaudo/events{/privacy}","received_events_url":"https://api.github.com/users/nicolo-ribaudo/received_events","type":"User","site_admin":false},"repo":{"id":35377641,"name":"jshint","full_name":"nicolo-ribaudo/jshint","owner":{"login":"nicolo-ribaudo","id":7000710,"avatar_url":"https://avatars.githubusercontent.com/u/7000710?v=3","gravatar_id":"","url":"https://api.github.com/users/nicolo-ribaudo","html_url":"https://github.com/nicolo-ribaudo","followers_url":"https://api.github.com/users/nicolo-ribaudo/followers","following_url":"https://api.github.com/users/nicolo-ribaudo/following{/other_user}","gists_url":"https://api.github.com/users/nicolo-ribaudo/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolo-ribaudo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolo-ribaudo/subscriptions","organizations_url":"https://api.github.com/users/nicolo-ribaudo/orgs","repos_url":"https://api.github.com/users/nicolo-ribaudo/repos","events_url":"https://api.github.com/users/nicolo-ribaudo/events{/privacy}","received_events_url":"https://api.github.com/users/nicolo-ribaudo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nicolo-ribaudo/jshint","description":"JSHint is a tool that helps to detect errors and potential problems in your JavaScript code","fork":true,"url":"https://api.github.com/repos/nicolo-ribaudo/jshint","forks_url":"https://api.github.com/repos/nicolo-ribaudo/jshint/forks","keys_url":"https://api.github.com/repos/nicolo-ribaudo/jshint/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nicolo-ribaudo/jshint/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nicolo-ribaudo/jshint/teams","hooks_url":"https://api.github.com/repos/nicolo-ribaudo/jshint/hooks","issue_events_url":"https://api.github.com/repos/nicolo-ribaudo/jshint/issues/events{/number}","events_url":"https://api.github.com/repos/nicolo-ribaudo/jshint/events","assignees_url":"https://api.github.com/repos/nicolo-ribaudo/jshint/assignees{/user}","branches_url":"https://api.github.com/repos/nicolo-ribaudo/jshint/branches{/branch}","tags_url":"https://api.github.com/repos/nicolo-ribaudo/jshint/tags","blobs_url":"https://api.github.com/repos/nicolo-ribaudo/jshint/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nicolo-ribaudo/jshint/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nicolo-ribaudo/jshint/git/refs{/sha}","trees_url":"https://api.github.com/repos/nicolo-ribaudo/jshint/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nicolo-ribaudo/jshint/statuses/{sha}","languages_url":"https://api.github.com/repos/nicolo-ribaudo/jshint/languages","stargazers_url":"https://api.github.com/repos/nicolo-ribaudo/jshint/stargazers","contributors_url":"https://api.github.com/repos/nicolo-ribaudo/jshint/contributors","subscribers_url":"https://api.github.com/repos/nicolo-ribaudo/jshint/subscribers","subscription_url":"https://api.github.com/repos/nicolo-ribaudo/jshint/subscription","commits_url":"https://api.github.com/repos/nicolo-ribaudo/jshint/commits{/sha}","git_commits_url":"https://api.github.com/repos/nicolo-ribaudo/jshint/git/commits{/sha}","comments_url":"https://api.github.com/repos/nicolo-ribaudo/jshint/comments{/number}","issue_comment_url":"https://api.github.com/repos/nicolo-ribaudo/jshint/issues/comments{/number}","contents_url":"https://api.github.com/repos/nicolo-ribaudo/jshint/contents/{+path}","compare_url":"https://api.github.com/repos/nicolo-ribaudo/jshint/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nicolo-ribaudo/jshint/merges","archive_url":"https://api.github.com/repos/nicolo-ribaudo/jshint/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nicolo-ribaudo/jshint/downloads","issues_url":"https://api.github.com/repos/nicolo-ribaudo/jshint/issues{/number}","pulls_url":"https://api.github.com/repos/nicolo-ribaudo/jshint/pulls{/number}","milestones_url":"https://api.github.com/repos/nicolo-ribaudo/jshint/milestones{/number}","notifications_url":"https://api.github.com/repos/nicolo-ribaudo/jshint/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nicolo-ribaudo/jshint/labels{/name}","releases_url":"https://api.github.com/repos/nicolo-ribaudo/jshint/releases{/id}","created_at":"2015-05-10T15:59:36Z","updated_at":"2015-05-10T15:59:36Z","pushed_at":"2015-07-02T21:23:38Z","git_url":"git://github.com/nicolo-ribaudo/jshint.git","ssh_url":"git@github.com:nicolo-ribaudo/jshint.git","clone_url":"https://github.com/nicolo-ribaudo/jshint.git","svn_url":"https://github.com/nicolo-ribaudo/jshint","homepage":"http://jshint.com","size":9007,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"jshint:master","ref":"master","sha":"ab73e010677ad6c34e21b8854fd5a43f7f1ca766","user":{"login":"jshint","id":1335450,"avatar_url":"https://avatars.githubusercontent.com/u/1335450?v=3","gravatar_id":"","url":"https://api.github.com/users/jshint","html_url":"https://github.com/jshint","followers_url":"https://api.github.com/users/jshint/followers","following_url":"https://api.github.com/users/jshint/following{/other_user}","gists_url":"https://api.github.com/users/jshint/gists{/gist_id}","starred_url":"https://api.github.com/users/jshint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jshint/subscriptions","organizations_url":"https://api.github.com/users/jshint/orgs","repos_url":"https://api.github.com/users/jshint/repos","events_url":"https://api.github.com/users/jshint/events{/privacy}","received_events_url":"https://api.github.com/users/jshint/received_events","type":"Organization","site_admin":false},"repo":{"id":1272666,"name":"jshint","full_name":"jshint/jshint","owner":{"login":"jshint","id":1335450,"avatar_url":"https://avatars.githubusercontent.com/u/1335450?v=3","gravatar_id":"","url":"https://api.github.com/users/jshint","html_url":"https://github.com/jshint","followers_url":"https://api.github.com/users/jshint/followers","following_url":"https://api.github.com/users/jshint/following{/other_user}","gists_url":"https://api.github.com/users/jshint/gists{/gist_id}","starred_url":"https://api.github.com/users/jshint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jshint/subscriptions","organizations_url":"https://api.github.com/users/jshint/orgs","repos_url":"https://api.github.com/users/jshint/repos","events_url":"https://api.github.com/users/jshint/events{/privacy}","received_events_url":"https://api.github.com/users/jshint/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jshint/jshint","description":"JSHint is a tool that helps to detect errors and potential problems in your JavaScript code","fork":false,"url":"https://api.github.com/repos/jshint/jshint","forks_url":"https://api.github.com/repos/jshint/jshint/forks","keys_url":"https://api.github.com/repos/jshint/jshint/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jshint/jshint/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jshint/jshint/teams","hooks_url":"https://api.github.com/repos/jshint/jshint/hooks","issue_events_url":"https://api.github.com/repos/jshint/jshint/issues/events{/number}","events_url":"https://api.github.com/repos/jshint/jshint/events","assignees_url":"https://api.github.com/repos/jshint/jshint/assignees{/user}","branches_url":"https://api.github.com/repos/jshint/jshint/branches{/branch}","tags_url":"https://api.github.com/repos/jshint/jshint/tags","blobs_url":"https://api.github.com/repos/jshint/jshint/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jshint/jshint/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jshint/jshint/git/refs{/sha}","trees_url":"https://api.github.com/repos/jshint/jshint/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jshint/jshint/statuses/{sha}","languages_url":"https://api.github.com/repos/jshint/jshint/languages","stargazers_url":"https://api.github.com/repos/jshint/jshint/stargazers","contributors_url":"https://api.github.com/repos/jshint/jshint/contributors","subscribers_url":"https://api.github.com/repos/jshint/jshint/subscribers","subscription_url":"https://api.github.com/repos/jshint/jshint/subscription","commits_url":"https://api.github.com/repos/jshint/jshint/commits{/sha}","git_commits_url":"https://api.github.com/repos/jshint/jshint/git/commits{/sha}","comments_url":"https://api.github.com/repos/jshint/jshint/comments{/number}","issue_comment_url":"https://api.github.com/repos/jshint/jshint/issues/comments{/number}","contents_url":"https://api.github.com/repos/jshint/jshint/contents/{+path}","compare_url":"https://api.github.com/repos/jshint/jshint/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jshint/jshint/merges","archive_url":"https://api.github.com/repos/jshint/jshint/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jshint/jshint/downloads","issues_url":"https://api.github.com/repos/jshint/jshint/issues{/number}","pulls_url":"https://api.github.com/repos/jshint/jshint/pulls{/number}","milestones_url":"https://api.github.com/repos/jshint/jshint/milestones{/number}","notifications_url":"https://api.github.com/repos/jshint/jshint/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jshint/jshint/labels{/name}","releases_url":"https://api.github.com/repos/jshint/jshint/releases{/id}","created_at":"2011-01-19T22:28:53Z","updated_at":"2015-07-02T21:42:33Z","pushed_at":"2015-07-02T21:24:54Z","git_url":"git://github.com/jshint/jshint.git","ssh_url":"git@github.com:jshint/jshint.git","clone_url":"https://github.com/jshint/jshint.git","svn_url":"https://github.com/jshint/jshint","homepage":"http://jshint.com","size":19793,"stargazers_count":5221,"watchers_count":5221,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1077,"mirror_url":null,"open_issues_count":311,"forks":1077,"open_issues":311,"watchers":5221,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jshint/jshint/pulls/2519"},"html":{"href":"https://github.com/jshint/jshint/pull/2519"},"issue":{"href":"https://api.github.com/repos/jshint/jshint/issues/2519"},"comments":{"href":"https://api.github.com/repos/jshint/jshint/issues/2519/comments"},"review_comments":{"href":"https://api.github.com/repos/jshint/jshint/pulls/2519/comments"},"review_comment":{"href":"https://api.github.com/repos/jshint/jshint/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jshint/jshint/pulls/2519/commits"},"statuses":{"href":"https://api.github.com/repos/jshint/jshint/statuses/c162dd2c024ad05a9a0c409cb953788130a91c03"}}}}