{"id":19857690,"url":"https://github.com/markmur/checkpoints","last_synced_at":"2025-02-28T21:47:42.226Z","repository":{"id":57197682,"uuid":"138708480","full_name":"markmur/checkpoints","owner":"markmur","description":"A CLI tool to easily add linting, code formatting and precommit checks to new or existing JavaScript projects","archived":false,"fork":false,"pushed_at":"2018-11-12T13:41:02.000Z","size":162,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-15T12:07:49.654Z","etag":null,"topics":["cli","linter","precommit","prettier"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/markmur.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-26T08:31:34.000Z","updated_at":"2019-05-29T16:46:18.000Z","dependencies_parsed_at":"2022-09-16T13:10:43.871Z","dependency_job_id":null,"html_url":"https://github.com/markmur/checkpoints","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markmur%2Fcheckpoints","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markmur%2Fcheckpoints/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markmur%2Fcheckpoints/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markmur%2Fcheckpoints/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markmur","download_url":"https://codeload.github.com/markmur/checkpoints/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240801097,"owners_count":19859729,"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":["cli","linter","precommit","prettier"],"created_at":"2024-11-12T14:19:27.373Z","updated_at":"2025-02-28T21:47:42.203Z","avatar_url":"https://github.com/markmur.png","language":"JavaScript","readme":"# 👮🏻 Checkpoints 👮🏻\n\nAdd linting, code formatting and precommit checks to an existing project.\n\n```\nyarn global add checkpoints\n```\n\n## Why?\n\nAdding linting, prettier and precommit checks multiple times a day to new/existing repos is no fun and often it can be difficult to recall the correct dependencies to install. This project aims to mitigate those problems.\n\n\u003e Note: There are plans to add a `checkpoints config` action, which would allow users to specify their own `xo` and `prettier` configurations. For now though the project is limited to the configs specified below.\n\n## Things to Note\n\nThis project uses `yarn` to install dependencies. There are plans in place to add the option to use NPM but for now it's limited to Yarn.\n\n## Installation\n\n```sh\nyarn global add checkpoints\n```\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/markmur/checkpoints/raw/master/img/checkpoints.png?raw=true\" alt=\"Checkpoints\" /\u003e\n\u003c/p\u003e\n\n## Usage\n\n```sh\ncheckpoints\n```\n\n## Options\n\n- [xo](#xo)\n- [xo-react](#xo-react)\n- [prettier](#prettier)\n- [precommit](#precommit)\n\n### xo\n\n[XO](https://github.com/xojs/xo) is a linter which sits on top of ESLint and abstracts much of the configuration.\n\n##### Config\n\nThe following is the default config that will be added to your `package.json` file:\n\n```json\n\"xo\": {\n  \"parser\": \"babel-eslint\",\n  \"envs\": [\"browser\", \"node\"],\n  \"prettier\": true,\n  \"space\": true,\n  \"rules\": {\n    \"camelcase\": [\n      2,\n      {\n        \"properties\": \"never\"\n      }\n    ]\n  }\n}\n```\n\n##### Dependencies\n\n```\nxo\nbabel-eslint\neslint-config-xo\n```\n\n---\n\n### xo-react\n\nThe `xo-react` action adds everything from the `xo` action but configures it for React.\n\n##### Config\n\nThe following is added to the above `xo` configuration:\n\n```\n\"extends\": [\"react\"],\n\"plugins\": [\"react\"]\n```\n\n##### Dependencies\n\n```\neslint-config-xo-react \neslint-plugin-react\n```\n\n---\n\n### Prettier\n\n##### Config\n\n```json\n{\n  \"prettier\": {\n    \"semi\": true,\n    \"singleQuote\": true,\n    \"trailingComma\": \"none\",\n    \"bracketSpacing\": true\n  }\n}\n```\n\n##### Dependencies\n\n```\nprettier\nprettier-eslint\neslint-config-prettier\n```\n\n---\n\n### Precommit\n\nThe `precommit` action uses `pre-commit` and `lint-staged` to lint your repo prior to git commits.\n\n##### Config\n\n```json\n{\n  \"scripts\": {\n    \"lint-staged\": \"lint-staged\"\n  },\n  \"lint-staged\": {\n    \"**/*.js\": [\n      \"prettier --write\",\n      \"git add\",\n      \"xo\"\n    ]\n  },\n  \"precommit\": {\n    \"run\": [\n      \"lint-staged\"\n    ]\n  }\n}\n```\n\n##### Dependencies\n\n```\nlint-staged\npre-commit\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkmur%2Fcheckpoints","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkmur%2Fcheckpoints","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkmur%2Fcheckpoints/lists"}