{"action":"created","issue":{"url":"https://api.github.com/repos/standard/standard/issues/1082","repository_url":"https://api.github.com/repos/standard/standard","labels_url":"https://api.github.com/repos/standard/standard/issues/1082/labels{/name}","comments_url":"https://api.github.com/repos/standard/standard/issues/1082/comments","events_url":"https://api.github.com/repos/standard/standard/issues/1082/events","html_url":"https://github.com/standard/standard/issues/1082","id":301228222,"number":1082,"title":"eslint-plugin-node/no-deprecated-api thinks one of my webpack aliases is a deprecated node library","user":{"login":"dyegolara","id":15898975,"avatar_url":"https://avatars0.githubusercontent.com/u/15898975?v=4","gravatar_id":"","url":"https://api.github.com/users/dyegolara","html_url":"https://github.com/dyegolara","followers_url":"https://api.github.com/users/dyegolara/followers","following_url":"https://api.github.com/users/dyegolara/following{/other_user}","gists_url":"https://api.github.com/users/dyegolara/gists{/gist_id}","starred_url":"https://api.github.com/users/dyegolara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dyegolara/subscriptions","organizations_url":"https://api.github.com/users/dyegolara/orgs","repos_url":"https://api.github.com/users/dyegolara/repos","events_url":"https://api.github.com/users/dyegolara/events{/privacy}","received_events_url":"https://api.github.com/users/dyegolara/received_events","type":"User","site_admin":false},"labels":[{"id":929062857,"url":"https://api.github.com/repos/standard/standard/labels/stale","name":"stale","color":"ffffff","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-02-28T23:49:58Z","updated_at":"2018-05-30T07:57:26Z","closed_at":"2018-05-30T07:57:26Z","author_association":"NONE","body":"I have this in my webpack config:\r\n```\r\nalias: {\r\n      utils: path.resolve(__dirname, 'src/utils/'),\r\n      api: path.resolve(__dirname, 'src/api/'),\r\n      app: path.resolve(__dirname, 'src/app/'),\r\n      actions: path.resolve(__dirname, 'src/actions/'),\r\n      stores: path.resolve(__dirname, 'src/stores/'),\r\n      shared: path.resolve(__dirname, 'src/shared/'),\r\n      constants: path.resolve(__dirname, 'src/constants/')\r\n    }\r\n```\r\n\r\nand I am importing some of my declared constants like this in several files: \r\n```\r\nimport { ADMIN_ROLE_KEY, EMPLOYEE_ROLE_KEY, EVALUATOR_ROLE_KEY } from 'constants'\r\n```\r\n\r\nThe problem is I'm getting this warning:\r\n\r\n`'constants' module was deprecated since v6.3. Use 'constants' property of each module instead. (node/no-deprecated-api)`\r\n\r\nThis started happening today since I updated to v11.0.0 (and I noticed it because the tests in my CI always run the latest version of `standard`). I know I can disable the rule on each line but I wonder if is it there a more clever way to do it.\r\n\r\n(I know this is not an issue but more like a `help wanted`)\r\nThanks in advance 🙂."},"comment":{"url":"https://api.github.com/repos/standard/standard/issues/comments/393066599","html_url":"https://github.com/standard/standard/issues/1082#issuecomment-393066599","issue_url":"https://api.github.com/repos/standard/standard/issues/1082","id":393066599,"user":{"login":"LinusU","id":189580,"avatar_url":"https://avatars0.githubusercontent.com/u/189580?v=4","gravatar_id":"","url":"https://api.github.com/users/LinusU","html_url":"https://github.com/LinusU","followers_url":"https://api.github.com/users/LinusU/followers","following_url":"https://api.github.com/users/LinusU/following{/other_user}","gists_url":"https://api.github.com/users/LinusU/gists{/gist_id}","starred_url":"https://api.github.com/users/LinusU/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LinusU/subscriptions","organizations_url":"https://api.github.com/users/LinusU/orgs","repos_url":"https://api.github.com/users/LinusU/repos","events_url":"https://api.github.com/users/LinusU/events{/privacy}","received_events_url":"https://api.github.com/users/LinusU/received_events","type":"User","site_admin":false},"created_at":"2018-05-30T07:57:25Z","updated_at":"2018-05-30T07:57:25Z","author_association":"CONTRIBUTOR","body":"I personally wouldn't recommend using aliases that way, since you might conflict with some other built-in module. Might not be the answer you want to hear but I've personally found that aliases introduce more problems than they solve...\r\n\r\nMaking ESLint aware of webpack-configuration is _probably_ something that will never happen, although you can always open an issue with them if you want this to happen. If support lands in ESLint it would trickle down to standard as well."}}
{"actor":{"display_login":"LinusU"}}