{"id":25519652,"url":"https://github.com/aligent/ts-code-standards","last_synced_at":"2025-04-11T00:32:58.856Z","repository":{"id":260566061,"uuid":"881633346","full_name":"aligent/ts-code-standards","owner":"aligent","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-02T23:22:18.000Z","size":380,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-04-02T23:29:23.098Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aligent.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"docs/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-01T00:09:59.000Z","updated_at":"2025-04-02T23:22:14.000Z","dependencies_parsed_at":"2024-11-01T04:17:26.777Z","dependency_job_id":"f786d41a-3315-4557-931a-ea82f5e05017","html_url":"https://github.com/aligent/ts-code-standards","commit_stats":null,"previous_names":["aligent/ts-code-standards"],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aligent%2Fts-code-standards","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aligent%2Fts-code-standards/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aligent%2Fts-code-standards/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aligent%2Fts-code-standards/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aligent","download_url":"https://codeload.github.com/aligent/ts-code-standards/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248322773,"owners_count":21084336,"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-02-19T17:29:16.418Z","updated_at":"2025-04-11T00:32:58.827Z","avatar_url":"https://github.com/aligent.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TS Coding Standards\n\nStandard code quality tooling for projects written in TypeScript.\n\n## Usage\n\n### Install this package:\n\n```bash\n  # NPM\n  npm install -D @aligent/ts-code-standards\n  # Yarn\n  yarn add -D @aligent/ts-code-standards\n  # PNPM\n  pnpm add -D @aligent/ts-code-standards\n```\n\n### Copy the `.editorconfig` from this package into your own project:\n\n```bash\n  # Assuming your package is installed in `node_modules` folder\n  cp node_modules/@aligent/ts-code-standards/.editorconfig ./.editorconfig\n```\n\n### Add the following to your `prettier.config.js`:\n\n- For ES modules project:\n\n  ```javascript\n  import { prettierConfig } from '@aligent/ts-code-standards';\n\n  export default prettierConfig;\n  ```\n\n- For CommonJS project:\n\n  ```javascript\n  const { prettierConfig } = require('@aligent/ts-code-standards');\n\n  module.exports = prettierConfig;\n  ```\n\n### Install the ESLint and TypeScript configs:\n\n#### General Projects\n\n##### Add the following to your `eslint.config.js`:\n\n- For ES modules project:\n\n  ```javascript\n  import { eslintConfigs } from '@aligent/ts-code-standards';\n\n  export default [...eslintConfigs.base];\n  ```\n\n- For CommonJS project:\n\n  ```javascript\n  const { eslintConfigs } = require('@aligent/ts-code-standards');\n\n  module.exports = [...eslintConfigs.base];\n  ```\n\n##### Add the following to your `tsconfig.json`:\n\n```json\n{ \"extends\": \"@aligent/ts-code-standards/tsconfigs-base\" }\n```\n\n#### React Projects\n\n##### Add the following to your `eslint.config.js`:\n\n- For ES modules project:\n\n  ```javascript\n  import { eslintConfigs } from '@aligent/ts-code-standards';\n\n  export default [...eslintConfigs.react];\n  ```\n\n- For CommonJS project:\n\n  ```javascript\n  const { eslintConfigs } = require('@aligent/ts-code-standards');\n\n  module.exports = [...eslintConfigs.react];\n  ```\n\n##### Add the following to your `tsconfig.json`:\n\n```json\n{ \"extends\": \"@aligent/ts-code-standards/tsconfigs-react\" }\n```\n\n## Notes\n\n- You'll need to add `include`, `exclude`, `paths` etc. to your `tsconfig` file. These settings will be project specific.\n- Your project is considered as `ES modules` project if the `type` option in the nearest `package.json` is set to `module`. Otherwise, it's a CommonJS project. For more information on this, please check [CommonJS vs. ES modules in Node.js](https://blog.logrocket.com/commonjs-vs-es-modules-node-js/).\n- For backward compatibility, we also export `./tsconfigs/base.json` and `./tsconfigs/react.json`. However, you should update to the new syntax when configuring your `tsconfig.json` when possible.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faligent%2Fts-code-standards","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faligent%2Fts-code-standards","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faligent%2Fts-code-standards/lists"}