{"action":"created","issue":{"url":"https://api.github.com/repos/Financial-Times/next-build-tools/issues/327","labels_url":"https://api.github.com/repos/Financial-Times/next-build-tools/issues/327/labels{/name}","comments_url":"https://api.github.com/repos/Financial-Times/next-build-tools/issues/327/comments","events_url":"https://api.github.com/repos/Financial-Times/next-build-tools/issues/327/events","html_url":"https://github.com/Financial-Times/next-build-tools/issues/327","id":127231601,"number":327,"title":"Custom way of configuring ESLint is incompatible with third party tools","user":{"login":"callumlocke","id":250617,"avatar_url":"https://avatars.githubusercontent.com/u/250617?v=3","gravatar_id":"","url":"https://api.github.com/users/callumlocke","html_url":"https://github.com/callumlocke","followers_url":"https://api.github.com/users/callumlocke/followers","following_url":"https://api.github.com/users/callumlocke/following{/other_user}","gists_url":"https://api.github.com/users/callumlocke/gists{/gist_id}","starred_url":"https://api.github.com/users/callumlocke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/callumlocke/subscriptions","organizations_url":"https://api.github.com/users/callumlocke/orgs","repos_url":"https://api.github.com/users/callumlocke/repos","events_url":"https://api.github.com/users/callumlocke/events{/privacy}","received_events_url":"https://api.github.com/users/callumlocke/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-01-18T14:00:48Z","updated_at":"2016-01-18T14:22:11Z","closed_at":null,"body":"cc @AlbertoElias\r\n\r\n### problem\r\n\r\nTools that interact with ESLint, such as [as-you-type lint highlighters](https://atom.io/packages/linter), don't work in a Next app or Origami component without some hacking.\r\n\r\n### why\r\n\r\nnbt and obt keep their ESLint configs in custom locations. The `nbt/obt verify` tasks know about this, but the `eslint` command doesn't.\r\n\r\n### proposed fix\r\n\r\nEmbrace ESLint's standard approaches for explicit [shared configs](http://eslint.org/docs/developer-guide/shareable-configs) and [inheritance](http://eslint.org/docs/user-guide/configuring#extending-configuration-files):\r\n\r\n- Publish our configs on npm. For example, we could have three modules:\r\n  - `eslint-config-ft` – base config (for rules we want to enforce universally, like `eqeqeq: 2` – i.e. anything that [this](https://github.com/Financial-Times/origami-build-tools/blob/master/config/.eslintrc) and [this](https://github.com/Financial-Times/next-build-tools/blob/master/config/eslint.json) have in common)\r\n  - `eslint-config-ft-browser` – extends the base config with `browser: true` and any browser-specific rules\r\n  - `eslint-config-ft-node` – extends the base config with `\"node\": true` and any node-specific rules\r\n- Next apps would have in their package.json: `\"eslintConfig\": {\"extends\": \"ft-node\"}`\r\n- Origami components (and `n-*` components?) would have in their package.json: `\"eslintConfig\": {\"extends\": \"ft-browser\"}`\r\n- Update nbt and obt to stop them setting a custom config path when running eslint (just let eslint figure it out)\r\n\r\nI think the easiest way to do this would be with a major version bump in both origami-build-tools and next-build-tools, so it's a clean break from the old way."},"comment":{"url":"https://api.github.com/repos/Financial-Times/next-build-tools/issues/comments/172538996","html_url":"https://github.com/Financial-Times/next-build-tools/issues/327#issuecomment-172538996","issue_url":"https://api.github.com/repos/Financial-Times/next-build-tools/issues/327","id":172538996,"user":{"login":"callumlocke","id":250617,"avatar_url":"https://avatars.githubusercontent.com/u/250617?v=3","gravatar_id":"","url":"https://api.github.com/users/callumlocke","html_url":"https://github.com/callumlocke","followers_url":"https://api.github.com/users/callumlocke/followers","following_url":"https://api.github.com/users/callumlocke/following{/other_user}","gists_url":"https://api.github.com/users/callumlocke/gists{/gist_id}","starred_url":"https://api.github.com/users/callumlocke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/callumlocke/subscriptions","organizations_url":"https://api.github.com/users/callumlocke/orgs","repos_url":"https://api.github.com/users/callumlocke/repos","events_url":"https://api.github.com/users/callumlocke/events{/privacy}","received_events_url":"https://api.github.com/users/callumlocke/received_events","type":"User","site_admin":false},"created_at":"2016-01-18T14:22:11Z","updated_at":"2016-01-18T14:22:11Z","body":"> adding something to every module is very costly\r\n\r\nthe new stuff in package.json wouldn't need to be done until a given module is having its obt/nbt dependency upgraded, at which point it's being updated anyway\r\n\r\n> the benefits of running eslint in the cli are quite limited\r\n\r\nI suppose it's subjective, but personally I really value having linting in my editor, it helps me no end"}}