{"id":22799994,"url":"https://github.com/dadi/code-standards","last_synced_at":"2025-09-01T12:38:49.629Z","repository":{"id":57105374,"uuid":"192798010","full_name":"dadi/code-standards","owner":"dadi","description":"Configs for linters and formatters used in DADI projects.","archived":false,"fork":false,"pushed_at":"2019-06-27T12:56:30.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-04-26T03:21:20.351Z","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/dadi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-19T20:12:12.000Z","updated_at":"2019-06-27T12:56:31.000Z","dependencies_parsed_at":"2022-08-20T23:50:10.053Z","dependency_job_id":null,"html_url":"https://github.com/dadi/code-standards","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dadi%2Fcode-standards","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dadi%2Fcode-standards/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dadi%2Fcode-standards/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dadi%2Fcode-standards/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dadi","download_url":"https://codeload.github.com/dadi/code-standards/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246365644,"owners_count":20765549,"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":"2024-12-12T07:10:44.164Z","updated_at":"2025-03-30T19:17:39.052Z","avatar_url":"https://github.com/dadi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DADI code standards\n\nConfigs for linters and formatters used in DADI projects.\n\n## Setting up\n\n1. Copy `.editorconfig`, `.eslintrc` and `.prettierrc` to the root of the repository\n\n1. Install the required dependencies\n\n   ```\n   npm i @dadi/eslint-config @dadi/prettier-config eslint husky lint-staged prettier --save-dev\n   ```\n\n1. Add the following blocks to `package.json`:\n\n   ```\n   \"husky\": {\n     \"hooks\": {\n       \"pre-commit\": \"lint-staged\"\n     }\n   },\n   \"lint-staged\": {\n     \"*.{js,jsx,md,html,css}\": [\n       \"prettier --write\",\n       \"git add\"\n     ]\n   }\n   ```\n\n1. Add the following to your `test` npm script:\n\n   ```\n   eslint --ext js,jsx . \u0026\u0026 prettier --check '**/*.{js,jsx,md,html,css}'\n   ```\n\n1. If you want to reformat an existing repository, run:\n\n   ```\n   ./node_modules/.bin/eslint --fix --ext js,jsx . \u0026\u0026 ./node_modules/.bin/prettier --write '**/*.{js,jsx,md,html,css}'\n   ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdadi%2Fcode-standards","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdadi%2Fcode-standards","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdadi%2Fcode-standards/lists"}