{"id":20688598,"url":"https://github.com/leedomjs/eslint-config","last_synced_at":"2026-02-01T11:34:34.636Z","repository":{"id":189152284,"uuid":"680088095","full_name":"leedomjs/eslint-config","owner":"leedomjs","description":"🔧「ESLint配置预设」Leedom's ESLint config presets","archived":false,"fork":false,"pushed_at":"2025-04-29T15:48:31.000Z","size":197,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-03T23:16:26.610Z","etag":null,"topics":["eslint","eslint-config"],"latest_commit_sha":null,"homepage":"","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/leedomjs.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":"2023-08-18T10:05:30.000Z","updated_at":"2025-04-29T15:48:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"4257455f-998a-454c-bc72-ec273cc2aaa6","html_url":"https://github.com/leedomjs/eslint-config","commit_stats":null,"previous_names":["leedomjs/eslint-config"],"tags_count":27,"template":false,"template_full_name":null,"purl":"pkg:github/leedomjs/eslint-config","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leedomjs%2Feslint-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leedomjs%2Feslint-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leedomjs%2Feslint-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leedomjs%2Feslint-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leedomjs","download_url":"https://codeload.github.com/leedomjs/eslint-config/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leedomjs%2Feslint-config/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28977318,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T11:31:13.034Z","status":"ssl_error","status_checked_at":"2026-02-01T11:30:25.558Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","eslint-config"],"created_at":"2024-11-16T23:06:14.500Z","updated_at":"2026-02-01T11:34:34.620Z","avatar_url":"https://github.com/leedomjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @leedomjs/eslint-config\n\n\u003e Inspired by [@antfu/eslint-config](https://github.com/antfu/eslint-config)\n\n[![npm](https://img.shields.io/npm/v/@leedomjs/eslint-config?color=333\u0026label=)](https://www.npmjs.com/package/@leedomjs/eslint-config)\n\n- Support Vue 2 \u0026 3\n- Single quotes, no semi\n- Auto fix for formatting\n- Also lint for TypeScript, json\n- Order tailwindcss classnames\n- Only one-line of config\n\n## Usage\n\n### Install\n\n```bash\npnpm add -D eslint @leedomjs/eslint-config\n```\n\n### Config `.eslintrc`\n\n```json\n{\n  \"extends\": \"@leedomjs\"\n}\n````\n\n### Add scripts for `package.json`\n\nFor example:\n\n```json\n{\n  \"scripts\": {\n    \"lint\": \"eslint .\",\n    \"lint:fix\": \"eslint . --fix\"\n  }\n}\n```\n\n### VS Code support (auto fix)\n\nInstall [VS Code ESLint extension](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)\n\nAdd the following settings to your `settings.json`:\n\n```jsonc\n{\n  \"editor.formatOnSave\": false,\n  \"editor.codeActionsOnSave\": {\n    \"source.fixAll.eslint\": true,\n    \"source.organizeImports\": false\n  },\n\n  // The following is optional.\n  // It's better to put under project setting `.vscode/settings.json`\n  // to avoid conflicts with working with different eslint configs.\n  \"eslint.validate\": [\n    \"javascript\",\n    \"javascriptreact\",\n    \"typescript\",\n    \"typescriptreact\",\n    \"vue\",\n    \"html\",\n    \"vue-html\",\n    \"jsx\",\n    \"json\",\n    \"jsonc\",\n    \"json5\",\n    \"markdown\",\n    \"yaml\"\n  ]\n}\n```\n\n### Lint and auto-fix before every commit\n\nIf you want to apply lint and auto-fix before every commit, you could do this:\n\n#### 1. [husky](https://github.com/typicode/husky) + [`lint-staged`](https://github.com/okonet/lint-staged)\n\n```bash\npnpm dlx husky-init \u0026\u0026 pnpm install -D husky lint-staged\n```\n\nand add the following to your `package.json`:\n\n```jsonc\n{\n  \"scripts\": {\n    // This script will be added automatically when husky is installed successfully.\n    \"prepare\": \"husky install\"\n  },\n  \"lint-staged\": {\n    \"*\": \"eslint --fix\"\n  }\n}\n```\n\nthen add the following to your `pre-commit`:\n\n\u003e .husky/pre-commit\n\n```sh\n#!/usr/bin/env sh\n. \"$(dirname -- \"$0\")/_/husky.sh\"\n\n# remove the default script\n# npx test\n\n# add this script\nnpx lint-staged\n```\n\n#### 2. [simple-git-hooks](https://github.com/toplenboren/simple-git-hooks) + [`lint-staged`](https://github.com/okonet/lint-staged)\n\nIf your project is small-sized, and you need quickly set up hooks and forget about it, `simple-git-hook` will be a good choice.\n\n```bash\npnpm install -D simple-git-hooks lint-staged\n```\n\nand add the following to your `package.json`:\n\n```jsonc\n{\n  \"simple-git-hooks\": {\n    \"pre-commit\": \"npx lint-staged\"\n  },\n  \"lint-staged\": {\n    \"*\": \"eslint . --fix\"\n  }\n}\n```\n\nthen run the CLI script to update the git hooks with the commands from the config:\n\n```bash\n# [Optional] These 2 steps can be skipped for non-husky users\ngit config core.hooksPath .git/hooks/\nrm -rf .git/hooks\n\n# Update ./git/hooks\nnpx simple-git-hooks\n```\n\n## Tips\n\nYou can override the rules in your `.eslintrc` file.\n\n  ```jsonc\n  {\n    \"extends\": \"@leedomjs\",\n    \"rules\": {\n      // your rules...\n    }\n  }\n  ```\n\nNo framework used, just for javascript, you can also use the package `@leedomjs/eslint-config-basic`\n  ```jsonc\n  // .eslintrc\n  {\n    \"extends\": \"@leedomjs/eslint-config-basic\"\n  }\n  ```\n\nIf you are using `tailwindcss` , you can also add the package `@leedomjs/eslint-config-tailwindcss` which depend on [`eslint-plugin-tailwindcss`](https://github.com/francoismassart/eslint-plugin-tailwindcss) , so you don't need to add [`prettier-plugin-tailwindcss`](https://github.com/tailwindlabs/prettier-plugin-tailwindcss) and [`prettier`](https://github.com/prettier/prettier) extra.\n  ```jsonc\n  // .eslintrc\n  {\n    \"extends\": [\n      \"@leedomjs/eslint-config-tailwindcss\",\n      ...\n    ]\n  }\n  ```\n\n## License\n[MIT](https://github.com/leedomjs/eslint-config/blob/main/LICENSE) License © 2023-present [Leedom](https://github.com/leedom92)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleedomjs%2Feslint-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleedomjs%2Feslint-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleedomjs%2Feslint-config/lists"}