{"action":"created","issue":{"url":"https://api.github.com/repos/babel/babel-eslint/issues/487","repository_url":"https://api.github.com/repos/babel/babel-eslint","labels_url":"https://api.github.com/repos/babel/babel-eslint/issues/487/labels{/name}","comments_url":"https://api.github.com/repos/babel/babel-eslint/issues/487/comments","events_url":"https://api.github.com/repos/babel/babel-eslint/issues/487/events","html_url":"https://github.com/babel/babel-eslint/issues/487","id":235571089,"node_id":"MDU6SXNzdWUyMzU1NzEwODk=","number":487,"title":"Class properties resulting in false positive","user":{"login":"damianobarbati","id":2225869,"node_id":"MDQ6VXNlcjIyMjU4Njk=","avatar_url":"https://avatars2.githubusercontent.com/u/2225869?v=4","gravatar_id":"","url":"https://api.github.com/users/damianobarbati","html_url":"https://github.com/damianobarbati","followers_url":"https://api.github.com/users/damianobarbati/followers","following_url":"https://api.github.com/users/damianobarbati/following{/other_user}","gists_url":"https://api.github.com/users/damianobarbati/gists{/gist_id}","starred_url":"https://api.github.com/users/damianobarbati/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/damianobarbati/subscriptions","organizations_url":"https://api.github.com/users/damianobarbati/orgs","repos_url":"https://api.github.com/users/damianobarbati/repos","events_url":"https://api.github.com/users/damianobarbati/events{/privacy}","received_events_url":"https://api.github.com/users/damianobarbati/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":55,"created_at":"2017-06-13T14:20:00Z","updated_at":"2018-10-07T19:13:38Z","closed_at":null,"author_association":"NONE","body":"In the following JS I get a \"no-undef\" on webpack compilation because of `inputPicks` and `contextTypes` static class properties but it does not happen firing ESLint from command line.\r\n\r\n```\r\nexport default class Input extends React.Component {\r\n    static contextTypes = {\r\n        formName: PropTypes.string.isRequired,\r\n    }\r\n\r\n    static inputPicks = ['minLength', 'maxLength', 'pattern']\r\n\r\n    constructor(props) {\r\n        super(props, context);\r\n    }\r\n...and so on\r\n```\r\n\r\nPackage.json\r\n```\r\n    \"eslintConfig\": {\r\n        \"parser\": \"babel-eslint\",\r\n        \"parserOptions\": {\r\n            \"ecmaVersion\": 2017,\r\n            \"sourceType\": \"module\",\r\n            \"impliedStrict\": true,\r\n            \"ecmaFeatures\": {\r\n                \"jsx\": true,\r\n                \"experimentalObjectRestSpread\": true\r\n            }\r\n        },\r\n        \"env\": {\r\n            \"browser\": true,\r\n            \"node\": true,\r\n            \"jest\": true,\r\n            \"es6\": true\r\n        },\r\n        \"plugins\": [\r\n            \"import\",\r\n            \"react\",\r\n            \"jest\"\r\n        ],\r\n        \"extends\": [\r\n            \"eslint:recommended\",\r\n            \"plugin:react/recommended\",\r\n            \"plugin:jest/recommended\"\r\n        ],\r\n        \"rules\": {\r\n            \"no-console\": \"off\",\r\n            \"no-unused-vars\": \"off\",\r\n            \"no-unsafe-finally\": \"off\",\r\n            \"react/no-unescaped-entities\": \"off\",\r\n            \"react/prop-types\": \"off\"\r\n        }\r\n    },\r\n```\r\nDependencies:\r\n```\r\n    \"devDependencies\": {\r\n        \"autobind-decorator\": \"^1.3.4\",\r\n        \"autoprefixer\": \"^7.1.1\",\r\n        \"babel-core\": \"^6.7.4\",\r\n        \"babel-eslint\": \"^7.1.1\",\r\n        \"babel-loader\": \"7.0.0\",\r\n        \"babel-plugin-react-css-modules\": \"^2.6.0\",\r\n        \"babel-plugin-syntax-class-properties\": \"^6.13.0\",\r\n        \"babel-plugin-transform-decorators-legacy\": \"^1.3.4\",\r\n        \"babel-polyfill\": \"^6.20.0\",\r\n        \"babel-preset-env\": \"2.0.0-alpha.3\",\r\n        \"babel-preset-react\": \"^6.5.0\",\r\n        \"babel-preset-stage-0\": \"^6.16.0\",\r\n        \"babili\": \"^0.1.2\",\r\n        \"babili-webpack-plugin\": \"^0.1.1\",\r\n        \"clean-webpack-plugin\": \"0.1.16\",\r\n        \"compression-webpack-plugin\": \"^0.4.0\",\r\n        \"css-loader\": \"^0.28.4\",\r\n        \"cssnano\": \"^3.10.0\",\r\n        \"eslint\": \"^4.0.0\",\r\n        \"eslint-loader\": \"^1.6.1\",\r\n        \"eslint-plugin-import\": \"^2.2.0\",\r\n        \"eslint-plugin-jest\": \"^20.0.3\",\r\n        \"eslint-plugin-react\": \"^7.0.1\",\r\n        \"extract-text-webpack-plugin\": \"^2.1.0\",\r\n        \"favicons-webpack-plugin\": \"^0.0.7\",\r\n        \"file-loader\": \"^0.11.1\",\r\n        \"history\": \"^4.6.1\",\r\n        \"html-webpack-plugin\": \"^2.25.0\",\r\n        \"img-loader\": \"^2.0.0\",\r\n        \"json-loader\": \"^0.5.4\",\r\n        \"material-ui\": \"^0.18.1\",\r\n        \"material-ui-community-icons\": \"^0.15.0\",\r\n        \"node-sass\": \"^4.1.1\",\r\n        \"open-browser-webpack-plugin\": \"^0.0.5\",\r\n        \"postcss-load-config\": \"^1.1.0\",\r\n        \"postcss-loader\": \"^2.0.5\",\r\n        \"postcss-scss\": \"^1.0.0\",\r\n        \"query-string\": \"^4.3.4\",\r\n        \"react\": \"^15.4.1\",\r\n        \"react-addons-perf\": \"^15.4.2\",\r\n        \"react-create-app\": \"^1.0.3\",\r\n        \"react-create-store\": \"^1.0.4\",\r\n        \"react-dimensions\": \"^1.3.0\",\r\n        \"react-dom\": \"^15.4.1\",\r\n        \"react-ga\": \"^2.2.0\",\r\n        \"react-highcharts\": \"^12.0.0\",\r\n        \"react-moment\": \"^0.2.4\",\r\n        \"react-redux\": \"^5.0.1\",\r\n        \"react-router\": \"^4.1.1\",\r\n        \"react-router-dom\": \"^4.1.1\",\r\n        \"react-router-redux\": \"next\",\r\n        \"react-sizeme\": \"^2.3.2\",\r\n        \"react-svg-inline\": \"^2.0.0\",\r\n        \"react-swipeable-views\": \"^0.12.3\",\r\n        \"react-tap-event-plugin\": \"^2.0.0\",\r\n        \"react-transition-group\": \"^1.1.3\",\r\n        \"recompose\": \"^0.23.4\",\r\n        \"redux\": \"^3.6.0\",\r\n        \"redux-action-buffer\": \"^1.0.1\",\r\n        \"redux-actions\": \"^2.0.3\",\r\n        \"redux-devtools-extension\": \"^2.13.2\",\r\n        \"redux-logger\": \"^3.0.6\",\r\n        \"redux-persist\": \"^4.1.0\",\r\n        \"redux-persist-crosstab\": \"^3.5.2\",\r\n        \"redux-promise\": \"^0.5.3\",\r\n        \"redux-thunk\": \"^2.1.0\",\r\n        \"sass-loader\": \"^6.0.5\",\r\n        \"string-replace-loader\": \"^1.2.0\",\r\n        \"style-loader\": \"^0.18.2\",\r\n        \"stylelint-config-sass-guidelines\": \"^2.1.0\",\r\n        \"stylelint-config-standard\": \"^16.0.0\",\r\n        \"stylelint-scss\": \"^1.4.4\",\r\n        \"stylelint-webpack-plugin\": \"^0.7.0\",\r\n        \"url-loader\": \"^0.5.8\",\r\n        \"webpack\": \"^2.5.1\",\r\n        \"webpack-bundle-analyzer\": \"^2.8.2\",\r\n        \"webpack-chunk-hash\": \"^0.4.0\",\r\n        \"webpack-notifier\": \"^1.5.0\"\r\n    }\r\n```"},"comment":{"url":"https://api.github.com/repos/babel/babel-eslint/issues/comments/427678751","html_url":"https://github.com/babel/babel-eslint/issues/487#issuecomment-427678751","issue_url":"https://api.github.com/repos/babel/babel-eslint/issues/487","id":427678751,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNzY3ODc1MQ==","user":{"login":"croraf","id":19698636,"node_id":"MDQ6VXNlcjE5Njk4NjM2","avatar_url":"https://avatars3.githubusercontent.com/u/19698636?v=4","gravatar_id":"","url":"https://api.github.com/users/croraf","html_url":"https://github.com/croraf","followers_url":"https://api.github.com/users/croraf/followers","following_url":"https://api.github.com/users/croraf/following{/other_user}","gists_url":"https://api.github.com/users/croraf/gists{/gist_id}","starred_url":"https://api.github.com/users/croraf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/croraf/subscriptions","organizations_url":"https://api.github.com/users/croraf/orgs","repos_url":"https://api.github.com/users/croraf/repos","events_url":"https://api.github.com/users/croraf/events{/privacy}","received_events_url":"https://api.github.com/users/croraf/received_events","type":"User","site_admin":false},"created_at":"2018-10-07T19:13:38Z","updated_at":"2018-10-07T19:13:38Z","author_association":"NONE","body":"Same issue:\r\n```\r\n    \"eslint\": \"^4.13.1\",\r\n    \"babel-eslint\": \"^10.0.1\",\r\nnode: 10.10.0\r\n```\r\n\r\n```\r\nclass CustomDialog extends React.Component {\r\n    state = {  // <----[eslint] 'state' is not defined. (no-undef)\r\n        open: false,\r\n    };\r\n```\r\n\r\n"}}
{"actor":{"display_login":"croraf"}}