{"id":21822156,"url":"https://github.com/soybeanjs/eslint-config","last_synced_at":"2025-04-05T09:05:04.693Z","repository":{"id":59295405,"uuid":"528971007","full_name":"soybeanjs/eslint-config","owner":"soybeanjs","description":"SoybeanJS's eslint flat config presets with prettier","archived":false,"fork":false,"pushed_at":"2025-03-12T13:56:57.000Z","size":1514,"stargazers_count":57,"open_issues_count":0,"forks_count":13,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-28T23:35:51.106Z","etag":null,"topics":["eslint","prettier","react-eslint","react-native-eslint","solid-eslint","svelte-eslint","typescript-eslint","vue-eslint"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/soybeanjs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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":"2022-08-25T18:23:13.000Z","updated_at":"2025-03-23T09:28:41.000Z","dependencies_parsed_at":"2024-05-19T17:24:33.809Z","dependency_job_id":"586151e0-b13e-402d-a313-27b6cad02908","html_url":"https://github.com/soybeanjs/eslint-config","commit_stats":{"total_commits":219,"total_committers":3,"mean_commits":73.0,"dds":0.04109589041095896,"last_synced_commit":"4a04ad644ce63def3e244d189c295724fe0126a8"},"previous_names":[],"tags_count":78,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soybeanjs%2Feslint-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soybeanjs%2Feslint-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soybeanjs%2Feslint-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soybeanjs%2Feslint-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/soybeanjs","download_url":"https://codeload.github.com/soybeanjs/eslint-config/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247312077,"owners_count":20918344,"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","prettier","react-eslint","react-native-eslint","solid-eslint","svelte-eslint","typescript-eslint","vue-eslint"],"created_at":"2024-11-27T17:13:22.317Z","updated_at":"2025-04-05T09:05:04.571Z","avatar_url":"https://github.com/soybeanjs.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @soybeanjs/eslint-config\n\nEnglish | [中文](./README.zh_CN.md)\n\n**SoybeanJS's ESLint flat config presets with prettier.**\n\n- Default config Lint JavaScript and TypeScript.\n- Support Vue, React, ReactNative, Solid, Svelte and Astro on demand.\n- Use ESlint and Prettier to format HTML, CSS, LESS, SCSS, JSON, JSONC, YAML, TOML, Markdown.\n\n## Usage\n\n### Install\n\n```bash\npnpm i -D eslint typescript @soybeanjs/eslint-config\n```\n\n### ESLint config file\n\n- With [`\"type\": \"module\"`](https://nodejs.org/api/packages.html#type) in `package.json`\n\n- Create config file `eslint.config.js`\n\n- Import config from `@soybeanjs/eslint-config`\n\n```js\nimport { defineConfig } from '@soybeanjs/eslint-config';\n\nexport default defineConfig({\n  // options\n});\n```\n\n\u003e [!NOTE]\n\u003e See [Options](#options) for more details.\n\n### ESLint settings in VSCode\n\n```json\n{\n  \"editor.codeActionsOnSave\": {\n    \"source.fixAll.eslint\": \"explicit\",\n    \"source.organizeImports\": \"never\"\n  },\n  \"editor.formatOnSave\": false,\n  \"eslint.experimental.useFlatConfig\": true,\n  \"eslint.validate\": [\n    // \"javascript\", // support builtin\n    // \"javascriptreact\", // support builtin\n    // \"typescript\",  // support builtin\n    // \"typescriptreact\", // support builtin\n    // \"vue\", // support builtin\n    // add the languages you want to lint\n    \"svelte\",\n    \"astro\",\n    \"html\",\n    \"css\",\n    \"json\",\n    \"jsonc\",\n    \"yaml\"\n    \"toml\",\n    \"markdown\"\n  ],\n  \"prettier.enable\": false\n}\n```\n\n### Scripts in package.json\n\n```json\n{\n  \"scripts\": {\n    \"lint\": \"eslint . --fix\"\n  }\n}\n```\n\n## Options\n\n#### interface Options\n\n````typescript\ninterface Options {\n  /**\n   * The current working directory\n   *\n   * @default process.cwd()\n   */\n  cwd: string;\n  /** The globs to ignore lint */\n  ignores: string[];\n  /**\n   * Default prettier rules\n   *\n   * @default\n   * ```json\n   * {\n   *   \"printWidth\": 120,\n   *   \"singleQuote\": true,\n   *   \"trailingComma\": \"none\",\n   *   \"arrowParens\": \"avoid\",\n   *   \"htmlWhitespaceSensitivity\": \"ignore\"\n   * }\n   * ```\n   */\n  prettierRules: PartialPrettierExtendedOptions;\n  /**\n   * Whether to use prettierrc\n   *\n   * If true, the rules in prettierrc will override the default rules\n   *\n   * @default true\n   */\n  usePrettierrc: boolean;\n\n  /**\n   * @default\n   * {\n   *  \"html\": true,\n   *  \"css\": true,\n   *  \"json\": true,\n   * }\n   */\n  formatter: {\n    html?: boolean;\n    css?: boolean;\n    json?: boolean;\n    markdown?: boolean;\n    yaml?: boolean;\n    toml?: boolean;\n  };\n  vue?: VueOptions | boolean;\n  react?: RuleBaseOptions | boolean;\n  'react-native'?: RuleBaseOptions | boolean;\n  solid?: RuleBaseOptions | boolean;\n  svelte?: RuleBaseOptions | boolean;\n  astro?: RuleBaseOptions | boolean;\n}\n\ntype RuleBaseOptions\u003cT = NonNullable\u003cunknown\u003e\u003e = T \u0026 {\n  /** The glob patterns to lint */\n  files?: string[];\n};\n\ntype VueOptions = RuleBaseOptions\u003c{\n  /**\n   * The vue version\n   *\n   * @default 3\n   */\n  version?: 2 | 3;\n}\u003e;\n````\n\n## Thanks\n\n**Inspired by the following projects:**\n\n- [Antfu's eslint-config](https://github.com/antfu/eslint-config)\n- [Sxzz's eslint-config](https://github.com/sxzz/eslint-config)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoybeanjs%2Feslint-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoybeanjs%2Feslint-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoybeanjs%2Feslint-config/lists"}