{"action":"created","issue":{"url":"https://api.github.com/repos/lo1tuma/eslint-plugin-mocha/issues/37","repository_url":"https://api.github.com/repos/lo1tuma/eslint-plugin-mocha","labels_url":"https://api.github.com/repos/lo1tuma/eslint-plugin-mocha/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/lo1tuma/eslint-plugin-mocha/issues/37/comments","events_url":"https://api.github.com/repos/lo1tuma/eslint-plugin-mocha/issues/37/events","html_url":"https://github.com/lo1tuma/eslint-plugin-mocha/issues/37","id":106209753,"number":37,"title":"Rule proposal: forbid top level before / after hooks ","user":{"login":"lo1tuma","id":169170,"avatar_url":"https://avatars.githubusercontent.com/u/169170?v=3","gravatar_id":"","url":"https://api.github.com/users/lo1tuma","html_url":"https://github.com/lo1tuma","followers_url":"https://api.github.com/users/lo1tuma/followers","following_url":"https://api.github.com/users/lo1tuma/following{/other_user}","gists_url":"https://api.github.com/users/lo1tuma/gists{/gist_id}","starred_url":"https://api.github.com/users/lo1tuma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lo1tuma/subscriptions","organizations_url":"https://api.github.com/users/lo1tuma/orgs","repos_url":"https://api.github.com/users/lo1tuma/repos","events_url":"https://api.github.com/users/lo1tuma/events{/privacy}","received_events_url":"https://api.github.com/users/lo1tuma/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/lo1tuma/eslint-plugin-mocha/labels/feature","name":"feature","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-09-13T10:47:22Z","updated_at":"2016-05-17T15:55:24Z","closed_at":null,"body":"Those should be only used in a describe block "},"comment":{"url":"https://api.github.com/repos/lo1tuma/eslint-plugin-mocha/issues/comments/219763967","html_url":"https://github.com/lo1tuma/eslint-plugin-mocha/issues/37#issuecomment-219763967","issue_url":"https://api.github.com/repos/lo1tuma/eslint-plugin-mocha/issues/37","id":219763967,"user":{"login":"atakiel","id":1836075,"avatar_url":"https://avatars.githubusercontent.com/u/1836075?v=3","gravatar_id":"","url":"https://api.github.com/users/atakiel","html_url":"https://github.com/atakiel","followers_url":"https://api.github.com/users/atakiel/followers","following_url":"https://api.github.com/users/atakiel/following{/other_user}","gists_url":"https://api.github.com/users/atakiel/gists{/gist_id}","starred_url":"https://api.github.com/users/atakiel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atakiel/subscriptions","organizations_url":"https://api.github.com/users/atakiel/orgs","repos_url":"https://api.github.com/users/atakiel/repos","events_url":"https://api.github.com/users/atakiel/events{/privacy}","received_events_url":"https://api.github.com/users/atakiel/received_events","type":"User","site_admin":false},"created_at":"2016-05-17T15:55:24Z","updated_at":"2016-05-17T15:55:24Z","body":"Perhaps the rule could warn for root level hooks if the file contains a describe block. This would spot possible unintentional root level hook definitions.\r\n\r\nBut as root level hooks are useful for many test cases, it would be handy to define root level hooks in a dedicated hooks file.\r\n\r\nPart of the functionality could possibly be behind an option. Disallow all by default, and only allow separate file by option."}}