{"action":"opened","issue":{"url":"https://api.github.com/repos/jshint/jshint/issues/2482","labels_url":"https://api.github.com/repos/jshint/jshint/issues/2482/labels{/name}","comments_url":"https://api.github.com/repos/jshint/jshint/issues/2482/comments","events_url":"https://api.github.com/repos/jshint/jshint/issues/2482/events","html_url":"https://github.com/jshint/jshint/issues/2482","id":90801414,"number":2482,"title":".jshintrc's globals and predef options aren't powerful enough","user":{"login":"Mingling94","id":4606838,"avatar_url":"https://avatars.githubusercontent.com/u/4606838?v=3","gravatar_id":"","url":"https://api.github.com/users/Mingling94","html_url":"https://github.com/Mingling94","followers_url":"https://api.github.com/users/Mingling94/followers","following_url":"https://api.github.com/users/Mingling94/following{/other_user}","gists_url":"https://api.github.com/users/Mingling94/gists{/gist_id}","starred_url":"https://api.github.com/users/Mingling94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mingling94/subscriptions","organizations_url":"https://api.github.com/users/Mingling94/orgs","repos_url":"https://api.github.com/users/Mingling94/repos","events_url":"https://api.github.com/users/Mingling94/events{/privacy}","received_events_url":"https://api.github.com/users/Mingling94/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-24T23:04:04Z","updated_at":"2015-06-24T23:04:04Z","closed_at":null,"body":"I feel like one should be able to use jshint without adding jshint-script to the code e.g. `// jshint undef:true`\r\n\r\nThis way, jshint, as another tool in the bag of tools a developer needs to learn on each project, doesn't present itself at the top of each code-file and impact learning.\r\n\r\nCopied and pasted from an issue on a private repo I'm working on:\r\nLinting produces the following currently:\r\n```\r\napp/js/UI.js: line 7, col 5, 'fs' is defined but never used.\r\napp/js/UI.js: line 8, col 5, 'path' is defined but never used.\r\n\r\napp/js/pluginManager.js: line 5, col 1, 'UI' is not defined.\r\napp/js/pluginManager.js: line 8, col 21, 'path' is not defined.\r\napp/js/pluginManager.js: line 15, col 9, 'fs' is not defined.\r\napp/js/pluginManager.js: line 37, col 25, 'path' is not defined.\r\napp/js/pluginManager.js: line 50, col 27, 'path' is not defined.\r\napp/js/pluginManager.js: line 66, col 31, 'path' is not defined.\r\n\r\n8 errors\r\n```\r\nand when these variables are added to .jshintrc options as 'global' or 'predef', they get flagged as being redefined:\r\n```\r\napp/js/UI.js: line 7, col 5, Redefinition of 'fs'.\r\napp/js/UI.js: line 8, col 5, Redefinition of 'path'.\r\napp/js/UI.js: line 11, col 5, Redefinition of 'UI'.\r\napp/js/UI.js: line 7, col 5, 'fs' is defined but never used.\r\napp/js/UI.js: line 8, col 5, 'path' is defined but never used.\r\n\r\n5 errors\r\n```\r\n\r\nHaving to edit the code itself is not acceptable because .jshintrc is a development tool. Having .jshint-script be in the code when the distributables themselves don't come with jshint is harmless, but illogical and obfuscates the code from the POV of a new dev coming on-board"}}