{"action":"created","issue":{"url":"https://api.github.com/repos/babel/babel-eslint/issues/643","repository_url":"https://api.github.com/repos/babel/babel-eslint","labels_url":"https://api.github.com/repos/babel/babel-eslint/issues/643/labels{/name}","comments_url":"https://api.github.com/repos/babel/babel-eslint/issues/643/comments","events_url":"https://api.github.com/repos/babel/babel-eslint/issues/643/events","html_url":"https://github.com/babel/babel-eslint/issues/643","id":338382277,"node_id":"MDU6SXNzdWUzMzgzODIyNzc=","number":643,"title":"Regression in v8.2.4+ / v9.0.0.beta: optional chaining without assignments trigger no-unused-expressions","user":{"login":"lehni","id":213275,"node_id":"MDQ6VXNlcjIxMzI3NQ==","avatar_url":"https://avatars3.githubusercontent.com/u/213275?v=4","gravatar_id":"","url":"https://api.github.com/users/lehni","html_url":"https://github.com/lehni","followers_url":"https://api.github.com/users/lehni/followers","following_url":"https://api.github.com/users/lehni/following{/other_user}","gists_url":"https://api.github.com/users/lehni/gists{/gist_id}","starred_url":"https://api.github.com/users/lehni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lehni/subscriptions","organizations_url":"https://api.github.com/users/lehni/orgs","repos_url":"https://api.github.com/users/lehni/repos","events_url":"https://api.github.com/users/lehni/events{/privacy}","received_events_url":"https://api.github.com/users/lehni/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":17,"created_at":"2018-07-04T22:06:22Z","updated_at":"2018-09-03T20:58:17Z","closed_at":null,"author_association":"NONE","body":"Unfortunately, #595 didn't solve all issues with optional chaining for me, or new ones got introduced in the meantime. While some uses of optional chaining seem to work now, others are causing new linting errors with v8.2.4 and v8.2.5:\r\n\r\n```\r\nerror  Expected an assignment or function call and instead saw an expression  no-unused-expressions\r\n```\r\n\r\nThe statement in question is:\r\n\r\n```js\r\nthis.element?.destroy()\r\n```\r\n\r\nv8.2.1 is still the last version that I am able to use for optional chaining"},"comment":{"url":"https://api.github.com/repos/babel/babel-eslint/issues/comments/418192041","html_url":"https://github.com/babel/babel-eslint/issues/643#issuecomment-418192041","issue_url":"https://api.github.com/repos/babel/babel-eslint/issues/643","id":418192041,"node_id":"MDEyOklzc3VlQ29tbWVudDQxODE5MjA0MQ==","user":{"login":"lehni","id":213275,"node_id":"MDQ6VXNlcjIxMzI3NQ==","avatar_url":"https://avatars3.githubusercontent.com/u/213275?v=4","gravatar_id":"","url":"https://api.github.com/users/lehni","html_url":"https://github.com/lehni","followers_url":"https://api.github.com/users/lehni/followers","following_url":"https://api.github.com/users/lehni/following{/other_user}","gists_url":"https://api.github.com/users/lehni/gists{/gist_id}","starred_url":"https://api.github.com/users/lehni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lehni/subscriptions","organizations_url":"https://api.github.com/users/lehni/orgs","repos_url":"https://api.github.com/users/lehni/repos","events_url":"https://api.github.com/users/lehni/events{/privacy}","received_events_url":"https://api.github.com/users/lehni/received_events","type":"User","site_admin":false},"created_at":"2018-09-03T20:58:17Z","updated_at":"2018-09-03T20:58:17Z","author_association":"NONE","body":"If you can't wait for the release, you can already use it now:\r\n\r\n### `package.json`\r\n```js\r\n  \"devDependencies\": {\r\n    ...\r\n    \"eslint-plugin-babel\": \"github:lehni/eslint-plugin-babel#d0f79527a2b282fe9d05f6f0398b5c869d6077e8\",\r\n    ...\r\n  }\r\n```\r\n\r\n### `.eslintrc.js`\r\n```js\r\nmodule.exports = {\r\n  plugins: [\r\n    'babel'\r\n  ],\r\n  rules: {\r\n    ...\r\n    // https://github.com/babel/eslint-plugin-babel/pull/158\r\n    'no-unused-expressions': 'off',\r\n    'babel/no-unused-expressions': 'error',\r\n    ...\r\n  }\r\n}\r\n```\r\n"}}
{"actor":{"display_login":"lehni"}}