{"action":"opened","issue":{"url":"https://api.github.com/repos/eslint/eslint/issues/5757","repository_url":"https://api.github.com/repos/eslint/eslint","labels_url":"https://api.github.com/repos/eslint/eslint/issues/5757/labels{/name}","comments_url":"https://api.github.com/repos/eslint/eslint/issues/5757/comments","events_url":"https://api.github.com/repos/eslint/eslint/issues/5757/events","html_url":"https://github.com/eslint/eslint/issues/5757","id":145132185,"number":5757,"title":"Add `commentPattern` option to `no-fallthrough` rule","user":{"login":"alvov","id":6191154,"avatar_url":"https://avatars.githubusercontent.com/u/6191154?v=3","gravatar_id":"","url":"https://api.github.com/users/alvov","html_url":"https://github.com/alvov","followers_url":"https://api.github.com/users/alvov/followers","following_url":"https://api.github.com/users/alvov/following{/other_user}","gists_url":"https://api.github.com/users/alvov/gists{/gist_id}","starred_url":"https://api.github.com/users/alvov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alvov/subscriptions","organizations_url":"https://api.github.com/users/alvov/orgs","repos_url":"https://api.github.com/users/alvov/repos","events_url":"https://api.github.com/users/alvov/events{/privacy}","received_events_url":"https://api.github.com/users/alvov/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/eslint/eslint/labels/triage","name":"triage","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-04-01T09:25:38Z","updated_at":"2016-04-01T09:25:38Z","closed_at":null,"body":"**What version of ESLint are you using?**\r\n2.5.3\r\n**What rule do you want to change?**\r\n`no-fallthrough`\r\n**What code should be flagged as incorrect with this change?**\r\n```\r\n/*eslint no-fallback: [\"error\", { \"commentPattern\": \"break[\\\\s\\\\w]*omitted\" }]*/\r\nswitch(foo) {\r\n    case 0: a();\r\n    /* fallthrough */\r\n    default: c();\r\n}\r\n```\r\n**What happens when the rule is applied to this code now?**\r\nErrors:\r\n`Expected a 'break' statement before 'case'.`\r\n`Expected a 'break' statement before 'default'.`\r\n\r\nIt seems useful to be able to customize the comment pattern for intentional fallthrough (default pattern for now is `/falls?\\s?through/i`), especially when one tends to write comments in a language other than english. Consider:\r\n```\r\n/*eslint no-fallback: [\"error\", { \"commentPattern\": \"break\" }]*/\r\nswitch (foo) {\r\n    case 0: a();\r\n    // break пропущен умышленно!\r\n    case 1: b();\r\n}\r\n```"}}