{"id":29428283,"url":"https://github.com/fandsdev/eslint-config-fans","last_synced_at":"2026-03-07T16:04:19.865Z","repository":{"id":301588545,"uuid":"1009736222","full_name":"fandsdev/eslint-config-fans","owner":"fandsdev","description":"Opinionated and flexible ESLint shareable config by FANS","archived":false,"fork":false,"pushed_at":"2026-02-04T13:06:41.000Z","size":786,"stargazers_count":54,"open_issues_count":8,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-05T00:08:00.988Z","etag":null,"topics":["astro","eslint","eslint-config","eslint-flat-config","nuxt","oxfmt","oxlint","oxlint-config","sharable-config","vue"],"latest_commit_sha":null,"homepage":"https://eslint-config.fans.dev","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/fandsdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"buy_me_a_coffee":"euaaaio"}},"created_at":"2025-06-27T16:13:24.000Z","updated_at":"2026-02-04T18:10:50.000Z","dependencies_parsed_at":"2025-06-27T17:28:25.822Z","dependency_job_id":"9579b698-27a1-4240-a346-de5f6f80f796","html_url":"https://github.com/fandsdev/eslint-config-fans","commit_stats":null,"previous_names":["euaaaio/eslint-config-fans"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/fandsdev/eslint-config-fans","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fandsdev%2Feslint-config-fans","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fandsdev%2Feslint-config-fans/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fandsdev%2Feslint-config-fans/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fandsdev%2Feslint-config-fans/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fandsdev","download_url":"https://codeload.github.com/fandsdev/eslint-config-fans/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fandsdev%2Feslint-config-fans/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30221193,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T14:02:48.375Z","status":"ssl_error","status_checked_at":"2026-03-07T14:02:43.192Z","response_time":53,"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":["astro","eslint","eslint-config","eslint-flat-config","nuxt","oxfmt","oxlint","oxlint-config","sharable-config","vue"],"created_at":"2025-07-12T15:00:42.678Z","updated_at":"2026-03-07T16:04:19.824Z","avatar_url":"https://github.com/fandsdev.png","language":"JavaScript","funding_links":["https://buymeacoffee.com/euaaaio"],"categories":[],"sub_categories":[],"readme":"# ESLint Config Fans\n\n\u003cimg align=\"right\" width=\"100\" height=\"87\" title=\"ESLint Config Fans logo\"\n     src=\"https://github.com/fandsdev/eslint-config-fans/blob/546c9e682629694b9b068d2ef139246d325665ed/img/logo.svg\"\u003e\n\nOpinionated and flexible ESLint config with [TypeScript][typescript-eslint],\n[Vue][vue], [Astro][astro] support and [oxlint][oxlint] integration.\n\n- **Modern**: ESLint flat config with pregenerated TypeScript definitions\n- **Strict**: Opinionated and rigorous linting rules for better code quality\n- **Flexible**: Framework-agnostic with optional plugins\n- **Zero-config**: Works out of the box, customize as needed\n- **Fast**: Optional [oxlint][oxlint] integration (50-100x faster)\n- **Actively maintained** and **production-tested** across diverse\n  client projects at [FANS][fans] — both new and existing\n\n**Default plugins:** [`@eslint/js`][eslint-js], [`import-x`][import-x],\n[`promise`][promise], [`n`][node], [`de-morgan`][de-morgan],\n[`unicorn`][unicorn]\n\n**Optional plugins:** [`@typescript-eslint`][typescript-eslint], [`vue`][vue],\n[`astro`][astro], [`vitest`][vitest], [`prettier`][prettier],\n[`@stylistic`][stylistic], [`perfectionist`][perfectionist],\n[`vuejs-accessibility`][vue-a11y], [`eslint-plugin-query`][eslint-plugin-query]\n\n[**Inspect rules**][inspector] · [**View oxlint unsupported rules**][unsupported-rules]\n\n\n## Table of Contents\n\n- [Table of Contents](#table-of-contents)\n- [Usage](#usage)\n- [Customization](#customization)\n\t- [Available Options](#available-options)\n\t- [Ignores](#ignores)\n\t- [Strict Mode](#strict-mode)\n\t- [Formatting (Prettier and Stylistic)](#formatting)\n\t- [Custom Configurations and Overrides](#custom-configurations-and-overrides)\n- [Framework Support](#framework-support)\n\t- [Vue](#vue)\n\t- [Nuxt](#nuxt)\n\t- [Astro](#astro)\n- [Oxlint Support](#oxlint-support)\n- [Inspect](#inspect)\n- [Inspired By](#inspired-by)\n- [Contributing](#contributing)\n\n\n## Usage\n\nInstall the package:\n\n```bash\npnpm add -D eslint-config-fans eslint\n```\n\nCreate `eslint.config.js` in your project root:\n\n```javascript\nimport { defineConfig } from 'eslint-config-fans'\n\nexport default defineConfig({\n  // Enable features based on your project\n  typescript: true,\n  vue: true,\n  prettier: true,\n})\n```\n\n\n## Customization\n\n### Available Options\n\n```typescript\ninterface DefineConfigOptions {\n  // Custom ignore patterns\n  ignores?: string[]\n\n  // Control strictness level\n  strict?: boolean // default: true\n\n  // Enable TypeScript support\n  typescript?: boolean // default: false\n\n  // Enable Vue.js support\n  vue?: boolean | VueOptions // default: false\n\n  // Enable Astro support\n  astro?: boolean // default: false\n\n  // Enable test files support (Vitest)\n  test?: boolean // default: false\n\n  // Enable stylistic formatting rules\n  stylistic?: boolean | StylisticOptions // default: false\n\n  // Enable Prettier integration\n  prettier?: boolean // default: false\n\n  // Enable unicorn rules (opinionated best practices)\n  unicorn?: boolean // default: true\n\n  // Enable import/export sorting\n  perfectionist?: boolean // default: false\n\n  // Enable oxlint support for better performance\n  oxlint?: boolean | OxlintOptions // default: false\n\n  // Enable TanStack Query support\n  query?: boolean // default: false\n}\n```\n\n\n### Ignores\n\nBy default, the config ignores common directories and files, and automatically\nrespects your `.gitignore` patterns. You can extend the ignore patterns:\n\n```javascript\nexport default defineConfig({\n  ignores: [\n    'custom-dist/**',\n    'legacy-code/**',\n  ]\n})\n```\n\n\n### Strict Mode\n\nBy default, the config operates in strict mode, which enables more opinionated\nlinting rules for better code quality. When disabled, the configuration becomes\nless strict and more permissive:\n\n```javascript\nexport default defineConfig({\n  strict: false,\n})\n```\n\nFor new projects, we recommend keeping strict mode enabled.\nFor legacy codebases or gradual adoption, you may want\nto start with `strict: false` and enable it later.\n\n\n### Formatting\n\n#### Prettier vs Stylistic\n\nYou can choose between Prettier and ESLint Stylistic for code formatting:\n\n- **Prettier** (`prettier: true`): Uses Prettier for formatting,\n  disables conflicting stylistic rules\n- **Stylistic** (`stylistic: true`): Uses ESLint Stylistic rules for formatting\n  (ignored when Prettier is enabled)\n\n\n#### Stylistic Options\n\nWhen using `stylistic: true`, you can customize formatting rules.\nSee [StylisticOptions][stylistic-options] for all available options:\n\n```javascript\nexport default defineConfig({\n  stylistic: {\n    indent: 2,\n    quotes: 'single',\n    semi: false,\n  }\n})\n```\n\n\n#### Prettier Configuration\n\nPrettier can be configured through standard `.prettierrc` files\nor `prettier.config.js`. The ESLint config will automatically detect\nand respect your Prettier settings.\n\n\n### Custom Configurations and Overrides\n\nYou can extend the configuration with additional ESLint configs\nand use exported globs for precise file targeting:\n\n```javascript\nimport { defineConfig, GLOB_TS } from 'eslint-config-fans'\n\nexport default defineConfig(\n  {\n    typescript: true,\n  },\n  {\n    files: [GLOB_TS],\n    rules: {\n      '@typescript-eslint/no-misused-promises': 'off',\n    },\n  }\n)\n```\n\n[**Available globs**][globs]\n\n\n## Framework Support\n\n### Vue\n\nFull support for [Vue][vue] projects with [vue-accessibility][vue-a11y]\nand TypeScript integration:\n\n```javascript\nexport default defineConfig({\n  typescript: true,\n  vue: {\n    // Enable vue-a11y rules\n    a11y: true,\n\n    // Ignore undefined components for the `vue/no-undef-components` rule\n    extendUndefComponents: ['CustomComponent'],\n  }\n})\n```\n\nThis enables linting for `.vue` files with proper TypeScript support\nand Vue-specific rules.\n\n\n### Nuxt\n\nFull compatibility with [Nuxt ESLint][nuxt-eslint]:\n\n```javascript\nimport { defineConfig } from 'eslint-config-fans'\nimport withNuxt from './.nuxt/eslint.config.mjs'\n\nexport default withNuxt(\n  defineConfig(\n    {\n      typescript: true,\n      vue: {\n        a11y: true,\n      },\n    },\n  ),\n)\n```\n\n\n### Astro\n\nFull support for [Astro][astro-site] projects with TypeScript integration:\n\n```javascript\nexport default defineConfig({\n  typescript: true,\n  astro: true,\n})\n```\n\nThis enables linting for `.astro` files with proper TypeScript support\nand Astro-specific rules.\n\n\n## Oxlint Support\n\nThis config includes built-in support for [oxlint][oxlint] — a blazing-fast\nJavaScript linter written in Rust by [void(0)][voidzero].\nOxlint is **50-100 times faster** than ESLint and designed\nfor performance-critical workflows, making it perfect for large codebases\nand CI environments.\n\n\u003e **Note:** Oxlint doesn’t support all ESLint rules yet.\n\u003e Check the [generated list of unsupported rules][unsupported-rules] to see\n\u003e which rules from this config are not available in oxlint.\n\n\n### Enabling Oxlint\n\n1. **Install oxlint:**\n   ```bash\n   pnpm add -D oxlint\n   ```\n\n2. **Create your ESLint config** as described above\n\n3. **Generate oxlint configuration** from your ESLint config:\n   ```bash\n   pnpx @oxlint/migrate ./eslint.config.js\n   ```\n\n4. **Enable oxlint** in your configuration:\n   ```javascript\n   export default defineConfig({\n     typescript: true,\n     vue: true,\n     oxlint: true, // Enable oxlint support\n   })\n   ```\n\n   For TypeScript projects, you might want to enable DTS checking:\n   ```javascript\n   export default defineConfig({\n     typescript: true,\n     oxlint: {\n       dts: true, // Check .d.ts files with TypeScript rules\n     },\n   })\n   ```\n\n\n## Inspect\n\nYou can inspect your ESLint configuration using the interactive configuration inspector:\n\n```bash\npnpx @eslint/config-inspector --config eslint.config.js\n```\n\nOr add it as a script to your `package.json`:\n\n```json\n{\n  \"scripts\": {\n    \"lint:inspect\": \"pnpx @eslint/config-inspector --config eslint.config.js\"\n  }\n}\n```\n\n\n## Inspired By\n\nThis configuration is inspired by and builds upon the excellent work of:\n\n- [@logux/eslint-config][logux-config]\n- [@sxzz/eslint-config][sxzz-config]\n- [@antfu/eslint-config][antfu-config]\n\n\n## Contributing\n\nThis package can be installed directly from the repository, thanks to our\npure JavaScript implementation with TypeScript definitions provided\nvia `.d.ts` files — no compilation step required.\n\n```bash\npnpm add -D github:fandsdev/eslint-config-fans\n```\n\nAll versions follow [Semantic Versioning][semver].\n\n\n[fans]: https://fans.dev/\n[globs]: https://github.com/fandsdev/eslint-config-fans/blob/main/src/globs.js\n[eslint-js]: https://eslint.org/docs/latest/rules/\n[typescript-eslint]: https://typescript-eslint.io/\n[import-x]: https://github.com/un-es/eslint-plugin-import-x\n[promise]: https://github.com/eslint-community/eslint-plugin-promise\n[node]: https://github.com/eslint-community/eslint-plugin-n\n[de-morgan]: https://github.com/jonathanharrell/eslint-plugin-de-morgan\n[unicorn]: https://github.com/sindresorhus/eslint-plugin-unicorn\n[vue]: https://eslint.vuejs.org/\n[nuxt-eslint]: https://eslint.nuxt.com/\n[astro]: https://ota-meshi.github.io/eslint-plugin-astro/\n[vitest]: https://github.com/vitest-dev/eslint-plugin-vitest\n[prettier]: https://github.com/prettier/eslint-plugin-prettier\n[stylistic]: https://eslint.style/\n[perfectionist]: https://perfectionist.dev/\n[vue-a11y]: https://vue-a11y.github.io/eslint-plugin-vuejs-accessibility/\n[flat-config]: https://eslint.org/docs/latest/use/configure/configuration-files#configuration-file\n[eslint-typegen]: https://github.com/antfu/eslint-typegen\n[inspector]: https://eslint-config.fans.dev/\n[stylistic-options]: https://github.com/eslint-stylistic/eslint-stylistic/blob/main/packages/eslint-plugin/dts/options.d.ts\n[astro-site]: https://astro.build/\n[oxlint]: https://oxc.rs/docs/guide/usage/linter.html\n[voidzero]: https://voidzero.dev/\n[unsupported-rules]: ./docs/oxlint/UNSUPPORTED-RULES.md\n[antfu-config]: https://github.com/antfu/eslint-config\n[sxzz-config]: https://github.com/sxzz/eslint-config\n[logux-config]: https://github.com/logux/eslint-config\n[semver]: https://semver.org/\n[eslint-plugin-query]: https://tanstack.com/query/latest/docs/eslint/eslint-plugin-query\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffandsdev%2Feslint-config-fans","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffandsdev%2Feslint-config-fans","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffandsdev%2Feslint-config-fans/lists"}