{"action":"created","issue":{"url":"https://api.github.com/repos/sindresorhus/eslint-plugin-unicorn/issues/169","repository_url":"https://api.github.com/repos/sindresorhus/eslint-plugin-unicorn","labels_url":"https://api.github.com/repos/sindresorhus/eslint-plugin-unicorn/issues/169/labels{/name}","comments_url":"https://api.github.com/repos/sindresorhus/eslint-plugin-unicorn/issues/169/comments","events_url":"https://api.github.com/repos/sindresorhus/eslint-plugin-unicorn/issues/169/events","html_url":"https://github.com/sindresorhus/eslint-plugin-unicorn/issues/169","id":310403396,"node_id":"MDU6SXNzdWUzMTA0MDMzOTY=","number":169,"title":"Rule proposal: Prevent abbreviations","user":{"login":"sindresorhus","id":170270,"node_id":"MDQ6VXNlcjE3MDI3MA==","avatar_url":"https://avatars1.githubusercontent.com/u/170270?v=4","gravatar_id":"","url":"https://api.github.com/users/sindresorhus","html_url":"https://github.com/sindresorhus","followers_url":"https://api.github.com/users/sindresorhus/followers","following_url":"https://api.github.com/users/sindresorhus/following{/other_user}","gists_url":"https://api.github.com/users/sindresorhus/gists{/gist_id}","starred_url":"https://api.github.com/users/sindresorhus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sindresorhus/subscriptions","organizations_url":"https://api.github.com/users/sindresorhus/orgs","repos_url":"https://api.github.com/users/sindresorhus/repos","events_url":"https://api.github.com/users/sindresorhus/events{/privacy}","received_events_url":"https://api.github.com/users/sindresorhus/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":52,"created_at":"2018-04-02T06:02:20Z","updated_at":"2018-12-12T19:01:44Z","closed_at":null,"author_association":"OWNER","body":"Using complete words result in more readable code. Not everyone knows all your abbreviations. You only write code once, but it's read many times.\r\n\r\nFor a start, we could go with these:\r\n\r\n- `err` => `error`\r\n- `cb` => `callback`\r\n- `opts` => `options`\r\n- `str` => `string`\r\n- `obj` => `object`\r\n- `num` => `number`\r\n- `val` => `value`\r\n- `e` => `event`/`error`\r\n- `el` => `element`\r\n- `req` => `request`\r\n- `res` => `response`/`result`\r\n- `btn` => `button`\r\n- `msg` => `message`\r\n- `len` => `length`\r\n- `env` => `environment`\r\n- `dev` => `development`\r\n- `prod` => `production`\r\n- `tmp` => `temporary`\r\n- `arg` => `argument`\r\n- `args` => `arguments`\r\n- `tbl` => `table`\r\n- `db` => `database`\r\n- `ctx` => `context`\r\n- `mod` => `module`\r\n\r\nAlso `i` => `index`, but I have a feeling, that it's going to be too controversial.\r\n\r\nSuggestions welcome for additional ones. Also looking for people's thoughts on this rule."},"comment":{"url":"https://api.github.com/repos/sindresorhus/eslint-plugin-unicorn/issues/comments/446703984","html_url":"https://github.com/sindresorhus/eslint-plugin-unicorn/issues/169#issuecomment-446703984","issue_url":"https://api.github.com/repos/sindresorhus/eslint-plugin-unicorn/issues/169","id":446703984,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NjcwMzk4NA==","user":{"login":"sholladay","id":3674950,"node_id":"MDQ6VXNlcjM2NzQ5NTA=","avatar_url":"https://avatars2.githubusercontent.com/u/3674950?v=4","gravatar_id":"","url":"https://api.github.com/users/sholladay","html_url":"https://github.com/sholladay","followers_url":"https://api.github.com/users/sholladay/followers","following_url":"https://api.github.com/users/sholladay/following{/other_user}","gists_url":"https://api.github.com/users/sholladay/gists{/gist_id}","starred_url":"https://api.github.com/users/sholladay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sholladay/subscriptions","organizations_url":"https://api.github.com/users/sholladay/orgs","repos_url":"https://api.github.com/users/sholladay/repos","events_url":"https://api.github.com/users/sholladay/events{/privacy}","received_events_url":"https://api.github.com/users/sholladay/received_events","type":"User","site_admin":false},"created_at":"2018-12-12T19:01:44Z","updated_at":"2018-12-12T19:01:44Z","author_association":"NONE","body":"For anyone who doesn't remember, `err` became popular in JavaScript because at the time, the community had an aversion to names that were simply a camelCase copy of a class. Back then, there were no true classes, no linter rules that could catch mistakes related to capitalization, and this convention made people feel more confident that a variable was definitely an error instance rather than a reference to `Error`, perhaps being a typo. These days, those concerns are basically moot. New language features and linter rules have made those problems way less common. We don't pass around classes nearly as often as we used to when there was more ceremony involved in setting up a prototype chain. I think it's about time everyone started using `error` instead of `err`."}}
{"actor":{"display_login":"sholladay"}}