{"id":16113111,"url":"https://github.com/cuppachino/eslint-config","last_synced_at":"2025-03-16T08:32:40.894Z","repository":{"id":101182926,"uuid":"608949416","full_name":"cuppachino/eslint-config","owner":"cuppachino","description":"Lint TypeScript with ESLint, format with Prettier. Type-safe. Zero-conflict.","archived":false,"fork":false,"pushed_at":"2024-05-09T10:21:11.000Z","size":111,"stargazers_count":3,"open_issues_count":13,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-11T20:39:26.889Z","etag":null,"topics":["changesets","eslint","eslint-config","eslint-prettier-config","eslint-typescript","format","jsdoc","lint","prettier","tsdoc","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@cuppachino/eslint-config","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/cuppachino.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2023-03-03T03:42:54.000Z","updated_at":"2024-05-19T22:20:39.000Z","dependencies_parsed_at":"2023-12-26T17:15:34.268Z","dependency_job_id":"3e427295-db52-4ec3-ae05-e3f858e1d4ff","html_url":"https://github.com/cuppachino/eslint-config","commit_stats":{"total_commits":48,"total_committers":3,"mean_commits":16.0,"dds":"0.27083333333333337","last_synced_commit":"f9edeaee71ff31c5df094f0e4fe04237fbaf02b1"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuppachino%2Feslint-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuppachino%2Feslint-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuppachino%2Feslint-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuppachino%2Feslint-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cuppachino","download_url":"https://codeload.github.com/cuppachino/eslint-config/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243806071,"owners_count":20350775,"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":["changesets","eslint","eslint-config","eslint-prettier-config","eslint-typescript","format","jsdoc","lint","prettier","tsdoc","typescript"],"created_at":"2024-10-09T20:10:19.871Z","updated_at":"2025-03-16T08:32:40.495Z","avatar_url":"https://github.com/cuppachino.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @cuppachino/eslint-config\n\n![Discord](https://img.shields.io/discord/1080840305441525766?color=5865f2\u0026label=\u0026logo=discord\u0026logoColor=ffffff)\n[![Release](https://github.com/cuppachino/eslint-config/actions/workflows/release.yml/badge.svg?branch=main)](https://github.com/cuppachino/eslint-config/actions/workflows/release.yml)\n![License](https://img.shields.io/github/license/cuppachino/eslint-config?color=ffca4a)\n![npm (scoped)](https://img.shields.io/npm/v/@cuppachino/eslint-config?color=%23fb3e44)\n![npm](https://img.shields.io/npm/dw/@cuppachino/eslint-config)\n\n- [x] **Extendable**... fully customized [ESLint](https://eslint.org/) configuration\n\n- [x] **Optimized**... for explosive [**TypeScript**](https://www.typescriptlang.org/) development\n\n- [x] **Consistent**... comment doc formatting with [jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) and [tsdoc](https://tsdoc.org/)\n\n- [x] **Seamless**... integration with [Prettier](https://prettier.io/)\n\n- [x] **Granular**... keep Prettier and ESLint separate without conflict\n\n## Using this package in your project\n\n### Install\n\n```ps\npnpm add -D eslint @cuppachino/eslint-config\n```\n\nCreate a `tsconfig.eslint.json` at the root of your project and extend your own `tsconfig.json`:\n\n```jsonc\n{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    \"noEmit\": true\n  },\n  \"include\": [\n    \"pkg/\",\n    // \"src/\",\n    //  \"./vite.config.ts\",\n    // \"./apps/*/tsconfig.json\"\n  ],\n}\n```\n\n### Configure\n\nCreate a `.eslintrc.cjs` file in the root of your project and extend the config:\n\n\u003e or `.eslintrc.js` or `.eslintrc.json`\n\n```js\nmodule.exports = {\n  \n  /* 1️⃣ focus eslint to not look outside of your project */\n  root: true, \n\n  /* 2️⃣ extend your config with the package */\n  extends: ['@cuppachino/eslint-config'], \n\n  /* 3️⃣ point your own tsconfig(s) */\n  parserOptions: {\n    tsconfigRootDir: __dirname,\n    project: [\n      './tsconfig.eslint.json', // REQUIRED\n      './apps/*/tsconfig.json',\n      './packages/*/tsconfig.json'\n    ]\n  },\n  settings: {\n    'import/resolver': {\n      typescript: {\n        alwaysTryTypes: true,\n        project: [\n          './tsconfig.eslint.json', // REQUIRED\n          './apps/*/tsconfig.json',\n          './packages/*/tsconfig.json'\n        ]\n      }\n    }\n  },\n\n  /* ⭐ Override rules here */\n  rules: {\n    // ...\n  }\n}\n```\n\nIf you extend additional configs after `@cuppachino/eslint-config`, you may introduce conflicts between Prettier and ESLint. You can work around this by always including the config last ***OR*** by manually adding the `eslint-config-prettier` package to your project and adding `\"prettier\"` to the end of your `extends` array.\n\n```js\n// ❌ NOT OK\nextends: [\n  '@cuppachino/eslint-config',\n  'plugin:react/recommended',\n]\n```\n\n```js\n// ✅ OK\nextends: [\n  'plugin:react/recommended',\n  '@cuppachino/eslint-config',\n]\n```\n\n```js\n// ✅ OK\nextends: [\n  '@cuppachino/eslint-config',\n  'plugin:react/recommended',\n  'prettier'\n]\n```\n\n## IDE Integration\n\n### TypeScript ![npm dev dependency version (scoped)](https://img.shields.io/npm/dependency-version/@cuppachino/eslint-config/dev/typescript?style=flat-square\u0026label)\n\nMake sure to use your workspace's version of TypeScript and your `tsconfig.json` for type checking!\n\n![typescript-workspace-version](https://github.com/cuppachino/eslint-config/blob/faaed332bd057b3f1b22eb875e2d10e66d4c1cdc/typescript-use-workspace-version.png)\n\n### ESLint ![npm (prod) dependency version (scoped)](https://img.shields.io/npm/dependency-version/@cuppachino/eslint-config/eslint?style=flat-square\u0026label)\n\nTo highlight code **quality** errors in vscode, you can use [dbaeumer.vscode-eslint](https://github.com/Microsoft/vscode-eslint).\n\nAdd the following scripts to your package.json for usage in your pipeline:\n\n```jsonc\n{\n  \"scripts\": {\n    \"lint:check\": \"eslint\",\n    \"lint\": \"eslint --fix\"\n  }\n}\n```\n\n### Prettier ![npm (peer) dependency version (scoped)](https://img.shields.io/npm/dependency-version/@cuppachino/eslint-config/dev/prettier?style=flat-square\u0026label)\n\nFollow the setup directions for [rvest.vs-code-prettier-eslint](https://github.com/idahogurl/vs-code-prettier-eslint). This will allow you to fix linting errors with eslint and format your code with prettier, on save, in one step.\n\nThese scripts can be used to format your entire project:\n\n```jsonc\n{\n  \"scripts\": {\n    \"format\": \"prettier --check .\",\n    \"format:fix\": \"prettier --write .\"\n  }\n}\n```\n\n## Development Cycle\n\n\u003e If you have the previously mentioned extensions installed, you should be able to use them during development.\n\n### Install Dependencies\n\nThis package is managed with [PNPM](https://pnpm.js.org/). To get started, run the following commands:\n\n```ps\ncd YOUR-eslint-config\npnpm install\n```\n\n### Change, Commit, Merge \u0026 Release \u0026 Publish\n\n1. After you make changes and save, create a new changeset and follow the cli prompts:\n\n    ```ps\n    cd YOUR-eslint-config\n    pnpm new\n    ```\n\n2. Push your changes to a new branch and open a PR.\n\n3. Once your PR is merged, changesets will automatically create a new\nrelease and publish it to NPM.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcuppachino%2Feslint-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcuppachino%2Feslint-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcuppachino%2Feslint-config/lists"}