{"action":"opened","issue":{"url":"https://api.github.com/repos/vuejs/eslint-plugin-vue/issues/742","repository_url":"https://api.github.com/repos/vuejs/eslint-plugin-vue","labels_url":"https://api.github.com/repos/vuejs/eslint-plugin-vue/issues/742/labels{/name}","comments_url":"https://api.github.com/repos/vuejs/eslint-plugin-vue/issues/742/comments","events_url":"https://api.github.com/repos/vuejs/eslint-plugin-vue/issues/742/events","html_url":"https://github.com/vuejs/eslint-plugin-vue/issues/742","id":394831048,"node_id":"MDU6SXNzdWUzOTQ4MzEwNDg=","number":742,"title":"vue/multiline-html-element-content-newline message","user":{"login":"daluvi","id":1266472,"node_id":"MDQ6VXNlcjEyNjY0NzI=","avatar_url":"https://avatars0.githubusercontent.com/u/1266472?v=4","gravatar_id":"","url":"https://api.github.com/users/daluvi","html_url":"https://github.com/daluvi","followers_url":"https://api.github.com/users/daluvi/followers","following_url":"https://api.github.com/users/daluvi/following{/other_user}","gists_url":"https://api.github.com/users/daluvi/gists{/gist_id}","starred_url":"https://api.github.com/users/daluvi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daluvi/subscriptions","organizations_url":"https://api.github.com/users/daluvi/orgs","repos_url":"https://api.github.com/users/daluvi/repos","events_url":"https://api.github.com/users/daluvi/events{/privacy}","received_events_url":"https://api.github.com/users/daluvi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-29T22:56:16Z","updated_at":"2018-12-29T22:56:16Z","closed_at":null,"author_association":"NONE","body":"### description\r\nin this rule happen that the message was passed by an object to context.report. but the message \r\nnot defined because the index of the object isn't 'message', is 'messageId', and the {workspace}/node_modules/eslint/lib/eslint.js, was expected a message type string and not object\r\n\r\n##### Here happen two thing;\r\n1. in {workspace}/node_modules/eslint/lib/eslint.js was been expect a literal message\r\n2. this rule expect that message must be resolved by eslint.js\r\n\r\n### My packages are this:\r\n* babel-eslint \"^9.0.0\"\r\n* eslint \"^3.19.0\"\r\n* eslint-config-airbnb \"^15.0.1\"\r\n* eslint-import-resolver-webpack \"^0.10.1\"\r\n* eslint-plugin-import \"^2.3.0\"\r\n* eslint-plugin-jsx-a11y \"^5.0.3\"\r\n* eslint-plugin-vue \"^5.0.0-beta.3\"\r\n\r\n### My solution is:\r\n```js\r\nif (beforeLineBreaks !== 1) {\r\n  context.report({\r\n    node: template.getLastToken(node.startTag),\r\n    loc: {\r\n      start: node.startTag.loc.end,\r\n      end: contentFirst.loc.start\r\n    },\r\n    // messageId: 'unexpectedAfterClosingBracket'\r\n    message: 'Expected 1 line break after opening tag (`<{{name}}>`), but {{actual}} line breaks found.',\r\n    data: {\r\n      name: node.rawName,\r\n      actual: getPhrase(beforeLineBreaks)\r\n    },\r\n    fix (fixer) {\r\n      const range = [node.startTag.range[1], contentFirst.range[0]]\r\n      return fixer.replaceTextRange(range, '\\n')\r\n    }\r\n  })\r\n}\r\n\r\nif (afterLineBreaks !== 1) {\r\n  context.report({\r\n    node: template.getFirstToken(node.endTag),\r\n    loc: {\r\n      start: contentLast.loc.end,\r\n      end: node.endTag.loc.start\r\n    },\r\n    // messageId: 'unexpectedBeforeOpeningBracket'\r\n    message: 'Expected 1 line break before closing tag (`</{{name}}>`), but {{actual}} line breaks found.',\r\n    data: {\r\n      name: node.name,\r\n      actual: getPhrase(afterLineBreaks)\r\n    },\r\n    fix (fixer) {\r\n      const range = [contentLast.range[1], node.endTag.range[0]]\r\n      return fixer.replaceTextRange(range, '\\n')\r\n    }\r\n  })\r\n}\r\n```\r\n\r\nif this wasn't a solution, tell me why"}}
{"actor":{"display_login":"daluvi"}}