{"action":"created","comment":{"url":"https://api.github.com/repos/dabapps/eslint-config/pulls/comments/90643861","pull_request_review_id":11162867,"id":90643861,"diff_hunk":"@@ -1,44 +1,89 @@\n-# DabApps ESLint Configuration\n+# ESLint Config\n \n \n ## About\n-This repository includes 3 different configs that inherit from each other.\n-\n-  - Base\n-  - React (extends the `base`)\n-  - React Native (extends `react`, `base`)\n+This repository includes a collection of eslint configs that can be combined to lint just about any project, and a default config for all projects that follow our recent patterns.\n \n \n ## Install\n \n-Install a specific version of the eslint-config in your package.json. \n+Install a specific version of the eslint-config with NPM. You can see a full list of versions [here](https://github.com/dabapps/eslint-config/releases).\n+\n+```shell\n+npm i https://github.com/dabapps/eslint-config.git#v3.0.0 --save-dev\n+```\n+\n+This will update your package.json automatically.\n \n ```json\n \"devDependencies\": {\n-  \"eslint-config\": \"dabapps/eslint-config#2.0.0\",\n+  \"eslint-config\": \"https://github.com/dabapps/eslint-config.git#v3.0.0\",\n }\n ```\n \n-Then you have to choose between the different configs, depending on the project type. Currently there are 3 different configs.\n \n-  - base\n-  - react\n-  - react-native\n+## Configuration\n \n \n-## Running eslint\n+### NPM scripts\n \n-Add an `.eslintrc` file in the root of your project that extends a particular config.\n+Add the following scripts to your package.json\n+\n+```json\n+{\n+  \"scripts\": {\n+    \"lint\": \"npm run lint-src && npm run lint-tests\",\n+    \"lint-src\": \"eslint -c .eslintrc.json src/\",\n+    \"lint-tests\": \"eslint -c .eslintrc-test.json tests/\"\n+  }\n+}\n+```\n+\n+\n+### Default config\n+\n+Create an `.eslintrc.json` in the route of the project. For most projects you can use the default config like so:\n+\n+```json\n+{\n+  \"extends\": [\n+    \"eslint-config\"\n+  ]\n+}\n+```\n \n-    {\n-      \"extends\": \"eslint-config-dabapps/base/.eslintrc\", // For Base\n-      \"extends\": \"eslint-config-dabapps/react/.eslintrc\", // For React\n-      \"extends\": \"eslint-config-dabapps/react-native/.eslintrc\", // For React-Native\n-    }\n+Explanation of the default config below\n \n-It's recommeneded to then run this in your test script e.g.\n \n-    \"scripts\": {\n-      \"eslint\": \"eslint 'src/js/'\",\n-      \"test\": \"npm run eslint && npm run jest\",\n-    }\n+### Custom config\n+\n+But if you want to customise the project because, for example, this project is using a different ECMA version, module system, or framework, you can use a combination of the other configs available in this module. To replicate the default config for example, you could use the following:\n+\n+```json\n+{\n+  \"extends\": [\n+    \"eslint-config/commonjs\",\n+    \"eslint-config/browser\",","path":"README.md","position":90,"original_position":90,"commit_id":"dedba7977f7825bea30678c6d5408890895037f5","original_commit_id":"dedba7977f7825bea30678c6d5408890895037f5","user":{"login":"RealOrangeOne","id":6527489,"avatar_url":"https://avatars.githubusercontent.com/u/6527489?v=3","gravatar_id":"","url":"https://api.github.com/users/RealOrangeOne","html_url":"https://github.com/RealOrangeOne","followers_url":"https://api.github.com/users/RealOrangeOne/followers","following_url":"https://api.github.com/users/RealOrangeOne/following{/other_user}","gists_url":"https://api.github.com/users/RealOrangeOne/gists{/gist_id}","starred_url":"https://api.github.com/users/RealOrangeOne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RealOrangeOne/subscriptions","organizations_url":"https://api.github.com/users/RealOrangeOne/orgs","repos_url":"https://api.github.com/users/RealOrangeOne/repos","events_url":"https://api.github.com/users/RealOrangeOne/events{/privacy}","received_events_url":"https://api.github.com/users/RealOrangeOne/received_events","type":"User","site_admin":false},"body":"This is fine. Someone has actually published `eslint-config` to npm to contain their config (which really annoys me), but doing it like this is perfectly fine, provided this is also the value inside the package.json. NPM uses the value from the package.json, no matter what key you use inside the projects package.json (something I found out the hard way)","created_at":"2016-12-02T13:47:37Z","updated_at":"2016-12-02T13:47:37Z","html_url":"https://github.com/dabapps/eslint-config/pull/27#discussion_r90643861","pull_request_url":"https://api.github.com/repos/dabapps/eslint-config/pulls/27","_links":{"self":{"href":"https://api.github.com/repos/dabapps/eslint-config/pulls/comments/90643861"},"html":{"href":"https://github.com/dabapps/eslint-config/pull/27#discussion_r90643861"},"pull_request":{"href":"https://api.github.com/repos/dabapps/eslint-config/pulls/27"}}},"pull_request":{"url":"https://api.github.com/repos/dabapps/eslint-config/pulls/27","id":95686454,"html_url":"https://github.com/dabapps/eslint-config/pull/27","diff_url":"https://github.com/dabapps/eslint-config/pull/27.diff","patch_url":"https://github.com/dabapps/eslint-config/pull/27.patch","issue_url":"https://api.github.com/repos/dabapps/eslint-config/issues/27","number":27,"state":"open","locked":false,"title":"Sub modules","user":{"login":"JakeSidSmith","id":5850625,"avatar_url":"https://avatars.githubusercontent.com/u/5850625?v=3","gravatar_id":"","url":"https://api.github.com/users/JakeSidSmith","html_url":"https://github.com/JakeSidSmith","followers_url":"https://api.github.com/users/JakeSidSmith/followers","following_url":"https://api.github.com/users/JakeSidSmith/following{/other_user}","gists_url":"https://api.github.com/users/JakeSidSmith/gists{/gist_id}","starred_url":"https://api.github.com/users/JakeSidSmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JakeSidSmith/subscriptions","organizations_url":"https://api.github.com/users/JakeSidSmith/orgs","repos_url":"https://api.github.com/users/JakeSidSmith/repos","events_url":"https://api.github.com/users/JakeSidSmith/events{/privacy}","received_events_url":"https://api.github.com/users/JakeSidSmith/received_events","type":"User","site_admin":false},"body":"- [x] Break into smaller modules\r\n- [x] Remove ES6 config from base & react configs\r\n- [x] Allow importing configs without the need for the file name (add package.jsons in sub modules)\r\n- [x] Test on real javascript\r\n  - [x] Passing javascript\r\n  - [ ] Failing javascript\r\n- [x] Node env\r\n- [x] Jest env\r\n- [x] Mocha env\r\n- [x] Move test config & other crap outa react-native config\r\n- [ ] ES7 config?\r\n- [ ] Angular config\r\n- [ ] eslint-plugin-import\r\n- [x] More React / JSX rules In separate PR #28 \r\n- [ ] Additional indentation rules\r\n- [x] Unnecessary semi colons","created_at":"2016-11-29T12:53:46Z","updated_at":"2016-12-02T13:47:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2403fef7b793227f4c5bfdbd737c4673f0b7346c","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/dabapps/eslint-config/pulls/27/commits","review_comments_url":"https://api.github.com/repos/dabapps/eslint-config/pulls/27/comments","review_comment_url":"https://api.github.com/repos/dabapps/eslint-config/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dabapps/eslint-config/issues/27/comments","statuses_url":"https://api.github.com/repos/dabapps/eslint-config/statuses/dedba7977f7825bea30678c6d5408890895037f5","head":{"label":"dabapps:sub-modules","ref":"sub-modules","sha":"dedba7977f7825bea30678c6d5408890895037f5","user":{"login":"dabapps","id":445568,"avatar_url":"https://avatars.githubusercontent.com/u/445568?v=3","gravatar_id":"","url":"https://api.github.com/users/dabapps","html_url":"https://github.com/dabapps","followers_url":"https://api.github.com/users/dabapps/followers","following_url":"https://api.github.com/users/dabapps/following{/other_user}","gists_url":"https://api.github.com/users/dabapps/gists{/gist_id}","starred_url":"https://api.github.com/users/dabapps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dabapps/subscriptions","organizations_url":"https://api.github.com/users/dabapps/orgs","repos_url":"https://api.github.com/users/dabapps/repos","events_url":"https://api.github.com/users/dabapps/events{/privacy}","received_events_url":"https://api.github.com/users/dabapps/received_events","type":"Organization","site_admin":false},"repo":{"id":42923195,"name":"eslint-config","full_name":"dabapps/eslint-config","owner":{"login":"dabapps","id":445568,"avatar_url":"https://avatars.githubusercontent.com/u/445568?v=3","gravatar_id":"","url":"https://api.github.com/users/dabapps","html_url":"https://github.com/dabapps","followers_url":"https://api.github.com/users/dabapps/followers","following_url":"https://api.github.com/users/dabapps/following{/other_user}","gists_url":"https://api.github.com/users/dabapps/gists{/gist_id}","starred_url":"https://api.github.com/users/dabapps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dabapps/subscriptions","organizations_url":"https://api.github.com/users/dabapps/orgs","repos_url":"https://api.github.com/users/dabapps/repos","events_url":"https://api.github.com/users/dabapps/events{/privacy}","received_events_url":"https://api.github.com/users/dabapps/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dabapps/eslint-config","description":null,"fork":false,"url":"https://api.github.com/repos/dabapps/eslint-config","forks_url":"https://api.github.com/repos/dabapps/eslint-config/forks","keys_url":"https://api.github.com/repos/dabapps/eslint-config/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dabapps/eslint-config/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dabapps/eslint-config/teams","hooks_url":"https://api.github.com/repos/dabapps/eslint-config/hooks","issue_events_url":"https://api.github.com/repos/dabapps/eslint-config/issues/events{/number}","events_url":"https://api.github.com/repos/dabapps/eslint-config/events","assignees_url":"https://api.github.com/repos/dabapps/eslint-config/assignees{/user}","branches_url":"https://api.github.com/repos/dabapps/eslint-config/branches{/branch}","tags_url":"https://api.github.com/repos/dabapps/eslint-config/tags","blobs_url":"https://api.github.com/repos/dabapps/eslint-config/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dabapps/eslint-config/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dabapps/eslint-config/git/refs{/sha}","trees_url":"https://api.github.com/repos/dabapps/eslint-config/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dabapps/eslint-config/statuses/{sha}","languages_url":"https://api.github.com/repos/dabapps/eslint-config/languages","stargazers_url":"https://api.github.com/repos/dabapps/eslint-config/stargazers","contributors_url":"https://api.github.com/repos/dabapps/eslint-config/contributors","subscribers_url":"https://api.github.com/repos/dabapps/eslint-config/subscribers","subscription_url":"https://api.github.com/repos/dabapps/eslint-config/subscription","commits_url":"https://api.github.com/repos/dabapps/eslint-config/commits{/sha}","git_commits_url":"https://api.github.com/repos/dabapps/eslint-config/git/commits{/sha}","comments_url":"https://api.github.com/repos/dabapps/eslint-config/comments{/number}","issue_comment_url":"https://api.github.com/repos/dabapps/eslint-config/issues/comments{/number}","contents_url":"https://api.github.com/repos/dabapps/eslint-config/contents/{+path}","compare_url":"https://api.github.com/repos/dabapps/eslint-config/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dabapps/eslint-config/merges","archive_url":"https://api.github.com/repos/dabapps/eslint-config/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dabapps/eslint-config/downloads","issues_url":"https://api.github.com/repos/dabapps/eslint-config/issues{/number}","pulls_url":"https://api.github.com/repos/dabapps/eslint-config/pulls{/number}","milestones_url":"https://api.github.com/repos/dabapps/eslint-config/milestones{/number}","notifications_url":"https://api.github.com/repos/dabapps/eslint-config/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dabapps/eslint-config/labels{/name}","releases_url":"https://api.github.com/repos/dabapps/eslint-config/releases{/id}","deployments_url":"https://api.github.com/repos/dabapps/eslint-config/deployments","created_at":"2015-09-22T09:04:22Z","updated_at":"2016-11-14T17:11:41Z","pushed_at":"2016-12-02T09:38:06Z","git_url":"git://github.com/dabapps/eslint-config.git","ssh_url":"git@github.com:dabapps/eslint-config.git","clone_url":"https://github.com/dabapps/eslint-config.git","svn_url":"https://github.com/dabapps/eslint-config","homepage":null,"size":62,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":12,"forks":1,"open_issues":12,"watchers":0,"default_branch":"master"}},"base":{"label":"dabapps:master","ref":"master","sha":"fc1febee8850e3c6c7373b548339cab7c80238b5","user":{"login":"dabapps","id":445568,"avatar_url":"https://avatars.githubusercontent.com/u/445568?v=3","gravatar_id":"","url":"https://api.github.com/users/dabapps","html_url":"https://github.com/dabapps","followers_url":"https://api.github.com/users/dabapps/followers","following_url":"https://api.github.com/users/dabapps/following{/other_user}","gists_url":"https://api.github.com/users/dabapps/gists{/gist_id}","starred_url":"https://api.github.com/users/dabapps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dabapps/subscriptions","organizations_url":"https://api.github.com/users/dabapps/orgs","repos_url":"https://api.github.com/users/dabapps/repos","events_url":"https://api.github.com/users/dabapps/events{/privacy}","received_events_url":"https://api.github.com/users/dabapps/received_events","type":"Organization","site_admin":false},"repo":{"id":42923195,"name":"eslint-config","full_name":"dabapps/eslint-config","owner":{"login":"dabapps","id":445568,"avatar_url":"https://avatars.githubusercontent.com/u/445568?v=3","gravatar_id":"","url":"https://api.github.com/users/dabapps","html_url":"https://github.com/dabapps","followers_url":"https://api.github.com/users/dabapps/followers","following_url":"https://api.github.com/users/dabapps/following{/other_user}","gists_url":"https://api.github.com/users/dabapps/gists{/gist_id}","starred_url":"https://api.github.com/users/dabapps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dabapps/subscriptions","organizations_url":"https://api.github.com/users/dabapps/orgs","repos_url":"https://api.github.com/users/dabapps/repos","events_url":"https://api.github.com/users/dabapps/events{/privacy}","received_events_url":"https://api.github.com/users/dabapps/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dabapps/eslint-config","description":null,"fork":false,"url":"https://api.github.com/repos/dabapps/eslint-config","forks_url":"https://api.github.com/repos/dabapps/eslint-config/forks","keys_url":"https://api.github.com/repos/dabapps/eslint-config/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dabapps/eslint-config/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dabapps/eslint-config/teams","hooks_url":"https://api.github.com/repos/dabapps/eslint-config/hooks","issue_events_url":"https://api.github.com/repos/dabapps/eslint-config/issues/events{/number}","events_url":"https://api.github.com/repos/dabapps/eslint-config/events","assignees_url":"https://api.github.com/repos/dabapps/eslint-config/assignees{/user}","branches_url":"https://api.github.com/repos/dabapps/eslint-config/branches{/branch}","tags_url":"https://api.github.com/repos/dabapps/eslint-config/tags","blobs_url":"https://api.github.com/repos/dabapps/eslint-config/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dabapps/eslint-config/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dabapps/eslint-config/git/refs{/sha}","trees_url":"https://api.github.com/repos/dabapps/eslint-config/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dabapps/eslint-config/statuses/{sha}","languages_url":"https://api.github.com/repos/dabapps/eslint-config/languages","stargazers_url":"https://api.github.com/repos/dabapps/eslint-config/stargazers","contributors_url":"https://api.github.com/repos/dabapps/eslint-config/contributors","subscribers_url":"https://api.github.com/repos/dabapps/eslint-config/subscribers","subscription_url":"https://api.github.com/repos/dabapps/eslint-config/subscription","commits_url":"https://api.github.com/repos/dabapps/eslint-config/commits{/sha}","git_commits_url":"https://api.github.com/repos/dabapps/eslint-config/git/commits{/sha}","comments_url":"https://api.github.com/repos/dabapps/eslint-config/comments{/number}","issue_comment_url":"https://api.github.com/repos/dabapps/eslint-config/issues/comments{/number}","contents_url":"https://api.github.com/repos/dabapps/eslint-config/contents/{+path}","compare_url":"https://api.github.com/repos/dabapps/eslint-config/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dabapps/eslint-config/merges","archive_url":"https://api.github.com/repos/dabapps/eslint-config/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dabapps/eslint-config/downloads","issues_url":"https://api.github.com/repos/dabapps/eslint-config/issues{/number}","pulls_url":"https://api.github.com/repos/dabapps/eslint-config/pulls{/number}","milestones_url":"https://api.github.com/repos/dabapps/eslint-config/milestones{/number}","notifications_url":"https://api.github.com/repos/dabapps/eslint-config/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dabapps/eslint-config/labels{/name}","releases_url":"https://api.github.com/repos/dabapps/eslint-config/releases{/id}","deployments_url":"https://api.github.com/repos/dabapps/eslint-config/deployments","created_at":"2015-09-22T09:04:22Z","updated_at":"2016-11-14T17:11:41Z","pushed_at":"2016-12-02T09:38:06Z","git_url":"git://github.com/dabapps/eslint-config.git","ssh_url":"git@github.com:dabapps/eslint-config.git","clone_url":"https://github.com/dabapps/eslint-config.git","svn_url":"https://github.com/dabapps/eslint-config","homepage":null,"size":62,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":12,"forks":1,"open_issues":12,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dabapps/eslint-config/pulls/27"},"html":{"href":"https://github.com/dabapps/eslint-config/pull/27"},"issue":{"href":"https://api.github.com/repos/dabapps/eslint-config/issues/27"},"comments":{"href":"https://api.github.com/repos/dabapps/eslint-config/issues/27/comments"},"review_comments":{"href":"https://api.github.com/repos/dabapps/eslint-config/pulls/27/comments"},"review_comment":{"href":"https://api.github.com/repos/dabapps/eslint-config/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dabapps/eslint-config/pulls/27/commits"},"statuses":{"href":"https://api.github.com/repos/dabapps/eslint-config/statuses/dedba7977f7825bea30678c6d5408890895037f5"}}}}
{"actor":{"display_login":"RealOrangeOne"}}