{"id":20613907,"url":"https://github.com/shlroland/lint-config","last_synced_at":"2025-06-23T05:07:19.522Z","repository":{"id":40482532,"uuid":"464521635","full_name":"shlroland/lint-config","owner":"shlroland","description":"a collection for lint config","archived":false,"fork":false,"pushed_at":"2025-06-16T17:51:26.000Z","size":48929,"stargazers_count":4,"open_issues_count":11,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-16T18:48:56.007Z","etag":null,"topics":["eslint","husky","lint","lint-staged","prettier"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/shlroland.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-02-28T14:46:32.000Z","updated_at":"2025-01-27T01:18:06.000Z","dependencies_parsed_at":"2025-05-05T11:29:26.723Z","dependency_job_id":"8d1c8b27-b461-4071-85db-7e2c7f9e7dd6","html_url":"https://github.com/shlroland/lint-config","commit_stats":null,"previous_names":[],"tags_count":93,"template":false,"template_full_name":null,"purl":"pkg:github/shlroland/lint-config","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shlroland%2Flint-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shlroland%2Flint-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shlroland%2Flint-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shlroland%2Flint-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shlroland","download_url":"https://codeload.github.com/shlroland/lint-config/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shlroland%2Flint-config/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260220896,"owners_count":22976847,"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":["eslint","husky","lint","lint-staged","prettier"],"created_at":"2024-11-16T11:11:22.977Z","updated_at":"2025-06-23T05:07:14.509Z","avatar_url":"https://github.com/shlroland.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @shlroland/lint-config\n\n## setting lint config will be easy and fast\n\na collection of\n\n- eslint\n- cz(czg) + commitlint\n- lint-staged\n- husky\n- prettier\n\n## Usage\n\n### Wizard Setup\n\nexecute the following command in your terminal, the lint tools will be installed and configured automatically.\n\n```bash\npnpm dlx @shlroland/lint-cli\n```\n\n#### parameters\n\n- `None` : no parameters means default lint tools will be installed and configured automatically.\n  - `-I`: select lint tools interactively instead of using default settings automatically.\n- `install` : only install lint tools.\n  - `-I`: install lint tools interactively.\n- `config` : only config lint tools.\n  - `-I`: config lint tools interactively.\n  - `-f`: skip all prompts and override the existing configuration.\n\n\u003e [!IMPORTANT]\n\u003e Wizard Setup only install default lint tools and configure them according to the default settings.\n\u003e After executing the completion command, adjustments may need to be made according to project requirements\n\n### Manual Setup\n\n#### eslint\n\n`@shlroland/eslint-config` is based on [`@antfu/eslint-config`][antfu-eslint-config] and extends some rules.\n\n##### install\n\n```bash\npnpm add -D eslint @shlroland/eslint-config eslint-plugin-format\n```\n\n##### config\n\ncreate `eslint.config.js`\n\n```js\n// for \"type\": \"module\"\nimport { shlroland } from '@shlroland/eslint-config'\nexport default shlroland()\n```\n\n```js\n// for \"type\": \"commonjs\"\nconst { shlroland } = require('@shlroland/eslint-config')\nmodule.exports = shlroland()\n```\n\n#### cz(czg) + commitlint\n\nuse [`czg`](https://cz-git.qbb.sh/) to generate commit messages. And use [`commitlint`](https://commitlint.js.org/) to lint commit messages.\n\n##### install\n\n```bash\npnpm add -D @commitlint/cli czg @shlroland/cz-config\n```\n\n##### config\n\ncreate `commitlint.config.js`\n\n```js\n// for \"type\": \"module\"\nimport { config } from '@shlroland/cz-config/commitlint'\nexport default config\n\n// for \"type\": \"commonjs\"\nmodule.exports = require('@shlroland/cz-config')\n```\n\n#### lint-staged\n\n##### install\n\n```bash\npnpm add -D lint-staged @shlroland/lint-staged\n```\n\n##### config\n\ncreate `lint-staged.config.js`\n\n```js\n// for \"type\": \"module\"\nimport config from '@shlroland/lint-staged'\nexport default config\n\n// for \"type\": \"commonjs\"\nmodule.exports = require('@shlroland/lint-staged')\n```\n\n### husky\n\n#### config\n\nfollow the [husky](https://typicode.github.io/husky/) official documentation to config.\nAnd copy the husky config from [`@shlroland/husky-config`](./packages/husky/index.ts) to your project.\n\n#### prettier(not recommended)\n\n\u003e it is not recommended use `prettier` to format code, since following the philosophy of [`@antfu/eslint-config`][antfu-eslint-config].\n\n##### install\n\n```bash\npnpm add -D prettier @shlroland/prettier-config\n```\n\n##### config\n\ncreate `prettier.config.js`\n\n```js\n// for \"type\": \"module\"\nimport config from '@shlroland/prettier-config'\nexport default config\n\n// for \"type\": \"commonjs\"\nmodule.exports = require('@shlroland/prettier-config')\n```\n\nInspired by\n\n- [@c4605/toolconfs](https://www.npmjs.com/package/@c4605/toolconfs)\n- [@antfu/eslint-config](https://github.com/antfu/eslint-config)\n- [@fantasticit/code-lint](https://github.com/fantasticit/code-lint)\n\n[antfu-eslint-config]: https://github.com/antfu/eslint-config\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshlroland%2Flint-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshlroland%2Flint-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshlroland%2Flint-config/lists"}