{"id":28713214,"url":"https://github.com/andreaspitzer/my-xo","last_synced_at":"2025-10-13T08:04:21.345Z","repository":{"id":76025318,"uuid":"159383197","full_name":"andreaspitzer/my-xo","owner":"andreaspitzer","description":"An opinionated xo config","archived":false,"fork":false,"pushed_at":"2022-02-05T16:44:17.000Z","size":279,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-12T18:16:31.917Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andreaspitzer.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-11-27T18:47:30.000Z","updated_at":"2022-02-05T16:44:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"4f681ab9-0025-437c-835a-1e10da446761","html_url":"https://github.com/andreaspitzer/my-xo","commit_stats":null,"previous_names":["andreaspitzer/my-xo"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/andreaspitzer/my-xo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreaspitzer%2Fmy-xo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreaspitzer%2Fmy-xo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreaspitzer%2Fmy-xo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreaspitzer%2Fmy-xo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andreaspitzer","download_url":"https://codeload.github.com/andreaspitzer/my-xo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreaspitzer%2Fmy-xo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259901385,"owners_count":22929225,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-15T00:08:40.685Z","updated_at":"2025-10-13T08:04:16.296Z","avatar_url":"https://github.com/andreaspitzer.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# An opinionated `xo` config\n![](https://postinstaller-badge.now.sh/@andreaspizsa/xo)\n![](https://badgen.net/xo/status/@andreaspizsa/xo) ![](https://badgen.net/xo/indent/@andreaspizsa/xo) ![](https://badgen.net/xo/semi/@andreaspizsa/xo)\n\n## Install\n\n```sh\nnpm add -D @andreaspizsa/eslint-config-xo\n```\n\nAutomatically adds the package to `xo.extends` using [postinstaller](https://github.com/postinstaller/postinstaller).\n\n## Settings\n\n```json\n{\n  \"semicolon\": false,\n  \"space\": true,\n  \"func-names\": \"off\",\n  \"no-negated-condition\": \"warn\",\n  \"operator-linebreak\": [\n    \"error\",\n    \"before\",\n    {\n      \"overrides\": {\n        \"x?\": \"ignore\",\n        \"x:\": \"ignore\"\n      }\n    }\n  ]\n}\n```\n\n#### Allows Named Functions\n\n```js\nfunction a() {\n  return function namedFunction() { // standard xo would complain here\n    return b\n  }\n}\n```\n\n#### Allows Negated Conditions\n\nNegated conditions are fine if there’s a rather short block - often a one-liner - followed by a longer block. Getting the \"short block\" out of the way reduces cognitive load.\n\n**Good**\n```js\nfunction a(b) {\n  if(!b) {\n    log('b is empty')\n  } else {\n    // do\n    // something\n    // more complicated\n    // in a longer\n    // block\n  }\n}\n```\n\nBy default, xo favors this:\n\n**Bad**\n\n```js\nfunction a(b) {\n  if(b) {\n    // do\n    // something\n    // more complicated\n    // in a longer\n    // block\n  } else {\n    log('b is empty')\n  }\n}\n```\n\n#### Operator Line Break\n\nI prefer\n\n**Good**\n\n```js\n  const result = isThisConditionActuallyTrue()\n    ? doThisOperation()\n    : elseThisOperation()\n```\n\nover\n\n**Bad**\n```js\n  const result = isThisConditionActuallyTrue() ?\n    doThisOperation() :\n    elseThisOperation()\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreaspitzer%2Fmy-xo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandreaspitzer%2Fmy-xo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreaspitzer%2Fmy-xo/lists"}