{"action":"created","issue":{"url":"https://api.github.com/repos/eslint/eslint/issues/3143","labels_url":"https://api.github.com/repos/eslint/eslint/issues/3143/labels{/name}","comments_url":"https://api.github.com/repos/eslint/eslint/issues/3143/comments","events_url":"https://api.github.com/repos/eslint/eslint/issues/3143/events","html_url":"https://github.com/eslint/eslint/issues/3143","id":96849787,"number":3143,"title":"New Rule suggestion: sort-dependencies","user":{"login":"JoaoHenriquePereira","id":4040094,"avatar_url":"https://avatars.githubusercontent.com/u/4040094?v=3","gravatar_id":"","url":"https://api.github.com/users/JoaoHenriquePereira","html_url":"https://github.com/JoaoHenriquePereira","followers_url":"https://api.github.com/users/JoaoHenriquePereira/followers","following_url":"https://api.github.com/users/JoaoHenriquePereira/following{/other_user}","gists_url":"https://api.github.com/users/JoaoHenriquePereira/gists{/gist_id}","starred_url":"https://api.github.com/users/JoaoHenriquePereira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoaoHenriquePereira/subscriptions","organizations_url":"https://api.github.com/users/JoaoHenriquePereira/orgs","repos_url":"https://api.github.com/users/JoaoHenriquePereira/repos","events_url":"https://api.github.com/users/JoaoHenriquePereira/events{/privacy}","received_events_url":"https://api.github.com/users/JoaoHenriquePereira/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/eslint/eslint/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-07-23T16:14:53Z","updated_at":"2015-07-27T22:08:22Z","closed_at":null,"body":"### Acronyms\r\nTBD - to be discussed\r\n### The use case for the rule - what is it trying to prevent or flag? Include code examples.\r\n\r\nThis rule would flag unordered dependencies preferably configurable.\r\n\r\n<strong>Env: Node</strong>\r\n\r\nDefault flagging: Symbols -> Upper case letters -> Lower case letters\r\n\r\n### Examples flagged\r\n\r\n#### es6\r\n```\r\nimport * as lib from './foo';\r\nimport { x, z , F } from './bar';\r\nimport _ from 'underscore'; \r\nimport y from './baz';\r\nimport A from './byz';\r\n```\r\n\r\n#### es5\r\n\r\n```\r\nconst lib = require('./foo');\r\nconst x = require('./bar');\r\nconst z = require('./bar');\r\nconst F = require('./bar');\r\nconst _ = require('underscore');\r\nconst y = require('./baz');\r\nconst A = require('./byz');\r\n```\r\n\r\n### Examples fixed\r\n#### es6\r\n```\r\nimport _ from 'underscore'; //TBD if * over _ or configurable\r\nimport * as lib from './foo';\r\nimport A from './byz';\r\nimport { x, z , F } from './bar'; //inline dependencies possible caveat TBD\r\nimport y from './baz';\r\n\r\n```\r\n\r\n#### es5\r\n\r\n```\r\nconst _ = require('underscore');\r\nconst A = require('./byz');\r\nconst F = require('./bar');\r\nconst lib = require('./foo');\r\nconst x = require('./bar');\r\nconst y = require('./baz');\r\nconst z = require('./bar');\r\n\r\n```\r\n\r\n\r\n### Whether the rule is trying to prevent an error or is purely stylistic.\r\n\r\nPurely stylistic\r\n\r\n### Why you believe this rule is generic enough to be included.\r\n\r\nThe rule would basically collect all dependencies and sort them. This is possible for both es5 and es6 using the same rule.  \r\n\r\n### Whether the rule should be on or off by default.\r\n\r\nOff by default\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/eslint/eslint/issues/comments/125360483","html_url":"https://github.com/eslint/eslint/issues/3143#issuecomment-125360483","issue_url":"https://api.github.com/repos/eslint/eslint/issues/3143","id":125360483,"user":{"login":"nzakas","id":38546,"avatar_url":"https://avatars.githubusercontent.com/u/38546?v=3","gravatar_id":"","url":"https://api.github.com/users/nzakas","html_url":"https://github.com/nzakas","followers_url":"https://api.github.com/users/nzakas/followers","following_url":"https://api.github.com/users/nzakas/following{/other_user}","gists_url":"https://api.github.com/users/nzakas/gists{/gist_id}","starred_url":"https://api.github.com/users/nzakas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nzakas/subscriptions","organizations_url":"https://api.github.com/users/nzakas/orgs","repos_url":"https://api.github.com/users/nzakas/repos","events_url":"https://api.github.com/users/nzakas/events{/privacy}","received_events_url":"https://api.github.com/users/nzakas/received_events","type":"User","site_admin":false},"created_at":"2015-07-27T22:08:22Z","updated_at":"2015-07-27T22:08:22Z","body":":+1:"}}