{"id":18400543,"url":"https://github.com/dsi-hug/eslint-config","last_synced_at":"2025-04-07T06:33:33.725Z","repository":{"id":41298741,"uuid":"357971374","full_name":"DSI-HUG/eslint-config","owner":"DSI-HUG","description":"✨  ESLint shareable configuration with great defaults","archived":false,"fork":false,"pushed_at":"2025-04-03T15:01:11.000Z","size":1485,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-04-03T15:44:08.170Z","etag":null,"topics":["angular","code","cypress","es6","eslint","eslintconfig","javascript","jslint","lint","linter","quality","rxjs","style","typescript"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DSI-HUG.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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}},"created_at":"2021-04-14T16:27:16.000Z","updated_at":"2025-04-03T15:00:45.000Z","dependencies_parsed_at":"2023-02-16T07:15:18.528Z","dependency_job_id":"e3176a0d-08f1-4c07-84dc-7901fbe0c2ed","html_url":"https://github.com/DSI-HUG/eslint-config","commit_stats":{"total_commits":190,"total_committers":2,"mean_commits":95.0,"dds":"0.0052631578947368585","last_synced_commit":"f79a5965ee3c4663ca40826af5f1f859783dc4eb"},"previous_names":[],"tags_count":90,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DSI-HUG%2Feslint-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DSI-HUG%2Feslint-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DSI-HUG%2Feslint-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DSI-HUG%2Feslint-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DSI-HUG","download_url":"https://codeload.github.com/DSI-HUG/eslint-config/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247607763,"owners_count":20965945,"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":["angular","code","cypress","es6","eslint","eslintconfig","javascript","jslint","lint","linter","quality","rxjs","style","typescript"],"created_at":"2024-11-06T02:34:31.011Z","updated_at":"2025-04-07T06:33:33.718Z","avatar_url":"https://github.com/DSI-HUG.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n    @hug/eslint-config\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cbr/\u003e\n    \u003ca href=\"https://www.hug.ch\"\u003e\n        \u003cimg src=\"https://cdn.hug.ch/svgs/hug/hug-logo-horizontal.svg\" alt=\"hug-logo\" height=\"54px\" /\u003e\n    \u003c/a\u003e\n    \u003cbr/\u003e\u003cbr/\u003e\n    \u003ci\u003eESLint shareable configuration with great defaults\u003c/i\u003e\n    \u003cbr/\u003e\u003cbr/\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://www.npmjs.com/package/@hug/eslint-config\"\u003e\n        \u003cimg src=\"https://img.shields.io/npm/v/@hug/eslint-config.svg?color=blue\u0026logo=npm\" alt=\"npm version\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://npmcharts.com/compare/@hug/eslint-config?minimal=true\"\u003e\n        \u003cimg src=\"https://img.shields.io/npm/dw/@hug/eslint-config.svg?color=blue\u0026logo=npm\" alt=\"npm donwloads\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/dsi-hug/eslint-config/blob/main/LICENSE\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/license-GPLv3-ff69b4.svg\" alt=\"license GPLv3\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/dsi-hug/eslint-config/actions/workflows/ci_tests.yml\"\u003e\n        \u003cimg src=\"https://github.com/dsi-hug/eslint-config/actions/workflows/ci_tests.yml/badge.svg\" alt=\"build status\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/dsi-hug/eslint-config/blob/main/CONTRIBUTING.md#-submitting-a-pull-request-pr\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/PRs-welcome-brightgreen.svg\" alt=\"PRs welcome\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003chr/\u003e\n\n## Installation\n\n```sh\nnpm install @hug/eslint-config --save-dev\n```\n\n```sh\nyarn add eslint@8.x @hug/eslint-config --dev\n```\n\n\u003cdetails\u003e\n    \u003csummary\u003e\u003ci\u003ePrior to version 20.2.0\u003c/i\u003e\u003c/summary\u003e\n\n\u003e \u003cbr/\u003e\n\u003e\n\u003e Create a `tsconfig.eslint.json` file at the root of your project\n\u003e\n\u003e ```jsonc\n\u003e {\n\u003e     \"extends\": \"./tsconfig.json\",\n\u003e     \"compilerOptions\": {\n\u003e         \"types\": [\n\u003e             \"node\",\n\u003e             \"jasmine\"\n\u003e             //\n\u003e             // In case you are using WebdriverIO\n\u003e             //   \"@wdio/globals/types\"\n\u003e             //\n\u003e             // In case you are using Cypress\n\u003e             //   \"cypress\"\n\u003e             //\n\u003e             // Any other types that are required by your tests\n\u003e             //   ...\n\u003e         ]\n\u003e     },\n\u003e     \"include\": [\"src/**/*.ts\", \"e2e/**/*.ts\"]\n\u003e }\n\u003e ```\n\n\u003c/details\u003e\n\u003cdetails\u003e\n    \u003csummary\u003e\u003ci\u003eFor Angular \u003e= 10.x \u003c= 11.x\u003c/i\u003e\u003c/summary\u003e\n\n\u003e \u003cbr/\u003e\n\u003e\n\u003e ```sh\n\u003e npm install @hug/eslint-config@2.x --save-dev\n\u003e ```\n\u003e\n\u003e ```sh\n\u003e yarn add eslint@7.x @hug/eslint-config@2.x --dev\n\u003e ```\n\n\u003c/details\u003e\n\u003cdetails\u003e\n    \u003csummary\u003e\u003ci\u003eMigrating from tslint\u003c/i\u003e\u003c/summary\u003e\n\n\u003e \u003cbr/\u003e\n\u003e\n\u003e 1. Remove `tslint` and `codelyzer` from your dependencies\n\u003e 2. Remove any `tslint.json` configuration files\n\u003e 3. Add `eslint` as a dev dependency\n\u003e 4. Have a look at our [Angular project example][ng-example] and modify all your `tsconfig` files accordingly\n\n\u003c/details\u003e\n\n\u003chr/\u003e\n\n## Requirements\n\n\u003e As of now this configuration is intented to work with **Angular projects** only.\n\n\u003e Projects running under `Angular 10.x` can safely ignore `@angular-eslint` warnings during installation.\n\n-   an **Angular \u003e= 10.x** project\n\n## Usage\n\n1. Create an `.eslintrc.json` file at the root of your project\n\n```jsonc\n{\n    \"root\": true,\n    \"extends\": [\n        /**\n         *  Possible values: 'recommended (strict) | moderate (less stricter)'\n         */\n        \"@hug/eslint-config/recommended\"\n    ]\n}\n```\n\n2. Modify your existing `angular.json`\n\n```json\n\"architect\": {\n    \"lint\": {\n        \"builder\": \"@angular-eslint/builder:lint\",\n        \"options\": {\n            \"lintFilePatterns\": [\n                \"**/*.js\",\n                \"**/*.json\",\n                \"**/*.ts\",\n                \"**/*.html\"\n            ]\n        }\n    }\n}\n```\n\n3. Run `ng lint`\n\n\u003cbr/\u003e\n\n_You can also skip steps `2` and `3` and simply run:_\n\n```\neslint *.{js,json,ts,html}\n```\n\n## Rules\n\nThis configuration exports a recommended set of rules that enforces good practices.\n\nThey may or may not served you well as they are mainly designed to be used by the [HUG organization's team][dsi-hug].\n\nThe rules applies as follow:\n\n| Files        | Rules                                                                                           |\n| :----------- | :---------------------------------------------------------------------------------------------- |\n| \\*_/_.ts     | `es6`, `typescript`, `angular`, `rxjs`, `no-secrets`                                            |\n| \\*_/_.js     | `es6`, `no-secrets`                                                                             |\n| \\*_/_.mjs    | `es6`, `no-secrets`                                                                             |\n| \\*_/_.html   | `angular-template`                                                                              |\n| \\*_/_.json   | `no-secrets`                                                                                    |\n| e2e/\\*_/_.ts | `es6`, `typescript`, `no-secrets`, [`cypress`, `chai-friendly` - in case you are using Cypress] |\n\n## Development\n\nSee the [developer docs][developer].\n\n## Contributing\n\n#### \u003e Want to Help?\n\nWant to file a bug, contribute some code or improve documentation? Excellent!\n\nBut please read up first on the guidelines for [contributing][contributing], and learn about submission process, coding rules and more.\n\n#### \u003e Code of Conduct\n\nPlease read and follow the [Code of Conduct][codeofconduct], and help us keep this project open and inclusive.\n\n## Credits\n\nCopyright (C) 2021 [HUG - Hôpitaux Universitaires Genève][dsi-hug]\n\n[![love@hug](https://img.shields.io/badge/@hug-%E2%9D%A4%EF%B8%8Flove-magenta)][dsi-hug]\n\n[angular-eslint]: https://github.com/angular-eslint/angular-eslint\n[ng-example]: https://github.com/dsi-hug/eslint-config/blob/main/examples/angular\n[cypress]: https://www.cypress.io/\n[developer]: https://github.com/dsi-hug/eslint-config/blob/main/DEVELOPER.md\n[contributing]: https://github.com/dsi-hug/eslint-config/blob/main/CONTRIBUTING.md\n[codeofconduct]: https://github.com/dsi-hug/eslint-config/blob/main/CODE_OF_CONDUCT.md\n[dsi-hug]: https://github.com/dsi-hug\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdsi-hug%2Feslint-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdsi-hug%2Feslint-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdsi-hug%2Feslint-config/lists"}