{"id":32026018,"url":"https://github.com/nicksp/eslint-config","last_synced_at":"2026-03-08T05:31:44.543Z","repository":{"id":318387197,"uuid":"1054445112","full_name":"nicksp/eslint-config","owner":"nicksp","description":"Nick's ESLint config preset","archived":false,"fork":false,"pushed_at":"2026-02-27T13:46:56.000Z","size":472,"stargazers_count":2,"open_issues_count":6,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-27T15:08:26.368Z","etag":null,"topics":["eslint","eslint-config","eslint-flat-config"],"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/nicksp.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"ko_fi":"plekhanov","buy_me_a_coffee":"plekhanov"}},"created_at":"2025-09-10T21:06:45.000Z","updated_at":"2026-02-23T13:09:07.000Z","dependencies_parsed_at":"2025-10-06T23:15:01.610Z","dependency_job_id":"7ed8a1e2-238e-4194-a106-46bed7efebc0","html_url":"https://github.com/nicksp/eslint-config","commit_stats":null,"previous_names":["nicksp/eslint-config"],"tags_count":13,"template":true,"template_full_name":null,"purl":"pkg:github/nicksp/eslint-config","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicksp%2Feslint-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicksp%2Feslint-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicksp%2Feslint-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicksp%2Feslint-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nicksp","download_url":"https://codeload.github.com/nicksp/eslint-config/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicksp%2Feslint-config/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30246724,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-08T00:58:18.660Z","status":"online","status_checked_at":"2026-03-08T02:00:06.215Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","eslint-flat-config"],"created_at":"2025-10-16T13:01:41.145Z","updated_at":"2026-03-08T05:31:44.521Z","avatar_url":"https://github.com/nicksp.png","language":"TypeScript","funding_links":["https://ko-fi.com/plekhanov","https://buymeacoffee.com/plekhanov"],"categories":[],"sub_categories":[],"readme":"# @nicksp/eslint-config\n\n[![npm version][npm-version-src]][npm-version-href]\n[![npm downloads][npm-downloads-src]][npm-downloads-href]\n[![Node.js CI status][ci-src]][ci-href]\n[![pkg.pr.new][cr-src]][cr-href]\n\nShared ESLint config I use on my personal projects. Based on [antfu's config](https://github.com/antfu/eslint-config).\n\n## Difference\n\n- Format with Prettier\n- Only the tools I use are supported\n- More stricter rules\n- Simpler setup\n\n## Highlights\n\n- Play well with TypeScript and Prettier\n- Target tools I use personally on the majority of the projects: React, Next, Astro and Vitest\n- Sort imports, `package.json`, `tsconfig.json`\n- [ESLint flat config](https://eslint.org/docs/latest/use/configure/configuration-files) for better organization and composition\n- Respects `.gitignore` by default\n- Reasonable defaults, best practices, only one-line of config\n- Requires ESLint v9.5.0+\n\n## Setup\n\n```shell\npnpm add -D eslint@latest @nicksp/eslint-config\n```\n\nCreate `eslint.config.mjs` in your project root:\n\n```js\nimport { defineConfig } from '@nicksp/eslint-config'\n\nexport default defineConfig()\n```\n\nAdd scripts for `package.json`:\n\n```json\n{\n  \"scripts\": {\n    \"lint\": \"eslint\",\n    \"lint:fix\": \"eslint --fix\",\n    \"format\": \"prettier --write \\\"**/*.{js,cjs,mjs,jsx,ts,tsx,astro,css,json,md}\\\"\"\n  }\n}\n```\n\nConfigure VS Code for auto-fix on save in `.vscode/settings.json`:\n\n```jsonc\n{\n  // Use the Prettier formatter\n  \"editor.defaultFormatter\": \"esbenp.prettier-vscode\",\n  \"editor.formatOnSave\": true,\n\n  // Autosave files on focus change\n  \"files.autoSave\": \"onFocusChange\",\n  // Don’t autosave files with syntax errors\n  \"files.autoSaveWhenNoErrors\": true,\n\n  // Auto fix\n  \"editor.codeActionsOnSave\": {\n    \"source.fixAll.eslint\": \"explicit\",\n    \"source.organizeImports\": \"never\"\n  },\n\n  // Silent the stylistic rules in your IDE, but still auto fix them\n  \"eslint.rules.customizations\": [\n    { \"rule\": \"style/*\", \"severity\": \"off\", \"fixable\": true },\n    { \"rule\": \"format/*\", \"severity\": \"off\", \"fixable\": true },\n    { \"rule\": \"*-indent\", \"severity\": \"off\", \"fixable\": true },\n    { \"rule\": \"*-spacing\", \"severity\": \"off\", \"fixable\": true },\n    { \"rule\": \"*-spaces\", \"severity\": \"off\", \"fixable\": true },\n    { \"rule\": \"*-order\", \"severity\": \"off\", \"fixable\": true },\n    { \"rule\": \"*-dangle\", \"severity\": \"off\", \"fixable\": true },\n    { \"rule\": \"*-newline\", \"severity\": \"off\", \"fixable\": true },\n    { \"rule\": \"*quotes\", \"severity\": \"off\", \"fixable\": true },\n    { \"rule\": \"*semi\", \"severity\": \"off\", \"fixable\": true }\n  ],\n\n  // Enable eslint for all supported languages\n  \"eslint.validate\": [\n    \"javascript\",\n    \"javascriptreact\",\n    \"typescript\",\n    \"typescriptreact\",\n    \"html\",\n    \"markdown\",\n    \"json\",\n    \"json5\",\n    \"jsonc\",\n    \"yaml\",\n    \"toml\",\n    \"xml\",\n    \"gql\",\n    \"graphql\",\n    \"astro\",\n    \"css\",\n    \"less\",\n    \"scss\",\n    \"pcss\",\n    \"postcss\"\n  ]\n}\n```\n\n## Usage\n\n```js\n// eslint.config.js\nimport { defineConfig } from '@nicksp/eslint-config'\n\nexport default defineConfig(\n  {\n    // Type of the project. 'lib' for libraries, the default is 'app'\n    type: 'lib',\n\n    // Formatting with Prettier is enabled by default, you can disable it\n    prettier: false,\n\n    // TypeScript is autodetected, you can also explicitly enable it\n    typescript: true,\n\n    // Disable jsx support\n    jsx: false,\n\n    // You can configure each integration individually as well\n    yaml: {\n      overrides: {\n        // ...\n      },\n    },\n\n    ignores: [\n      '**/fixtures',\n      // ...globs\n    ]\n  },\n\n  // You can have multiple config overrides\n  {\n    files: ['**/*.ts'],\n    rules: {},\n  },\n  {\n    rules: {},\n  },\n)\n\n// Advanced config\n// See more at https://github.com/antfu/eslint-flat-config-utils\n.prepend(\n  // some configs before the main config\n).removeRules('foo/bar')\n```\n\n### Optional configs\n\nThese are optional configs for specific use cases.\n\nRunning `npx eslint` should prompt you to install the required dependencies, otherwise, you can install them manually.\n\n```js\n// eslint.config.js\nimport { defineConfig } from '@nicksp/eslint-config'\n\nexport default defineConfig({\n  // Enable React support\n  react: true,\n\n  // Enable Next.js support\n  nextjs: true,\n\n  // Enable Astro support\n  astro: true,\n})\n```\n\n## Other Projects You Might Like\n\n- [nicksp/dotfiles](https://github.com/nicksp/dotfiles/) - My dotfiles and VS Code settings\n- [nicksp/prettier-config](https://github.com/nicksp/prettier-config) - My Prettier config\n- [nicksp/renovate-config](https://github.com/nicksp/renovate-config) - My Renovate config\n- [nicksp/workflows](https://github.com/nicksp/workflows) - Reusable GitHub Actions workflows\n\n## License\n\n[MIT](LICENSE) License \u0026copy; 2025 [Nick Plekhanov](https://plekhanov.me)\n\n\u003c!-- Badges --\u003e\n[npm-version-src]: \u003chttps://img.shields.io/npm/v/@nicksp/eslint-config.svg\u003e\n[npm-version-href]: \u003chttps://npmjs.com/package/@nicksp/eslint-config\u003e\n[npm-downloads-src]: \u003chttps://img.shields.io/npm/dm/@nicksp/eslint-config\u003e\n[npm-downloads-href]: \u003chttps://www.npmcharts.com/compare/@nicksp/eslint-config?interval=30\u003e\n[ci-src]: \u003chttps://github.com/nicksp/eslint-config/workflows/CI/badge.svg\u003e\n[ci-href]: \u003chttps://github.com/nicksp/eslint-config/actions/workflows/ci.yml\u003e\n[cr-src]: \u003chttps://pkg.pr.new/badge/nicksp/eslint-config\u003e\n[cr-href]: \u003chttps://pkg.pr.new/~/nicksp/eslint-config\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicksp%2Feslint-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnicksp%2Feslint-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicksp%2Feslint-config/lists"}