{"id":26934149,"url":"https://github.com/benhigham/eslint-config","last_synced_at":"2026-03-13T06:05:44.078Z","repository":{"id":285425429,"uuid":"958024353","full_name":"benhigham/eslint-config","owner":"benhigham","description":"My personal ESLint configurations.","archived":false,"fork":false,"pushed_at":"2025-06-23T14:05:54.000Z","size":1031,"stargazers_count":0,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-30T05:44:20.394Z","etag":null,"topics":["codeguide","eslint","eslint-config","eslint-configurations","eslint-rules","eslintrc","format","formatter","formatting","lint","rules","standard","style","styleguide","tslint","tslint-rules"],"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/benhigham.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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":"2025-03-31T14:16:54.000Z","updated_at":"2025-05-26T22:08:07.000Z","dependencies_parsed_at":"2025-03-31T17:46:42.443Z","dependency_job_id":"256c92d0-aaa3-459b-ad94-a70cd25cff57","html_url":"https://github.com/benhigham/eslint-config","commit_stats":null,"previous_names":["benhigham/eslint-config"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/benhigham/eslint-config","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benhigham%2Feslint-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benhigham%2Feslint-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benhigham%2Feslint-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benhigham%2Feslint-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/benhigham","download_url":"https://codeload.github.com/benhigham/eslint-config/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benhigham%2Feslint-config/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264292945,"owners_count":23586062,"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":["codeguide","eslint","eslint-config","eslint-configurations","eslint-rules","eslintrc","format","formatter","formatting","lint","rules","standard","style","styleguide","tslint","tslint-rules"],"created_at":"2025-04-02T10:24:13.332Z","updated_at":"2026-03-13T06:05:44.073Z","avatar_url":"https://github.com/benhigham.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @benhigham/eslint-config\n\n[![npm version](https://img.shields.io/npm/v/@benhigham/eslint-config.svg)](https://www.npmjs.com/package/@benhigham/eslint-config)\n[![npm downloads](https://img.shields.io/npm/dm/@benhigham/eslint-config.svg)](https://www.npmjs.com/package/@benhigham/eslint-config)\n[![License](https://img.shields.io/github/license/benhigham/eslint-config)](LICENSE.md)\n\nA shareable ESLint configuration package with opinionated rules for JavaScript and TypeScript projects, built on top of [`eslint-config-xo`](https://github.com/xojs/eslint-config-xo) with additional plugins and custom configurations.\n\n## Features\n\n- **Comprehensive JavaScript \u0026 TypeScript Linting**: Strong base rules for both JavaScript and TypeScript projects\n- **Node.js \u0026 Browser Support**: Environment-specific rules for Node.js and browser projects\n- **React \u0026 Next.js Support**: Dedicated configurations for React and Next.js applications\n- **Accessibility**: Linting for accessibility best practices in JSX\n- **Promise \u0026 Async Code**: Enforces best practices for promises and async code\n- **Security**: Prevents use of secrets, unsanitized DOM manipulation, and unsafe patterns\n- **Code Quality \u0026 Consistency**: Includes rules for code quality, maintainability, and modern best practices\n- **Testing Support**: Built-in support for Vitest, Testing Library, and Playwright\n- **GraphQL Linting**: Schema and operation linting for GraphQL projects\n- **Tailwind CSS Integration**: Linting for Tailwind CSS class usage\n- **Prettier Compatibility**: Disables conflicting rules for seamless Prettier integration\n- **Documentation Linting**: Enforces standards for JSDoc and ESLint directive comments\n\n## Prerequisites\n\n- **Node.js** ≥ 22\n- **ESLint** ≥ 9\n\n## Installation\n\n```bash\n# npm\nnpm install --save-dev @benhigham/eslint-config\n\n# yarn\nyarn add --dev @benhigham/eslint-config\n\n# pnpm\npnpm add --save-dev @benhigham/eslint-config\n```\n\n## Usage\n\nAdd the configuration to your ESLint config file:\n\n### Basic Usage (JavaScript)\n\n```js\n// eslint.config.js\nimport benhighamEslintConfig from '@benhigham/eslint-config';\n\n/** @type {import('eslint').Linter.Config[]} */\nconst config = [...benhighamEslintConfig];\n\nexport default config;\n```\n\n### TypeScript\n\n```js\n// eslint.config.js\nimport benhighamEslintConfigTypescript from '@benhigham/eslint-config/typescript';\n\n/** @type {import('eslint').Linter.Config[]} */\nconst config = [...benhighamEslintConfigTypescript];\n\nexport default config;\n```\n\n### Browser\n\n```js\n// eslint.config.js\nimport benhighamEslintConfigBrowser from '@benhigham/eslint-config/browser';\n\n/** @type {import('eslint').Linter.Config[]} */\nconst config = [...benhighamEslintConfigBrowser];\n\nexport default config;\n```\n\n### React\n\n```js\n// eslint.config.js\nimport benhighamEslintConfigReact from '@benhigham/eslint-config/react';\n\n/** @type {import('eslint').Linter.Config[]} */\nconst config = [...benhighamEslintConfigReact];\n\nexport default config;\n```\n\n### Next.js\n\n```js\n// eslint.config.js\nimport benhighamEslintConfigNext from '@benhigham/eslint-config/next';\n\n/** @type {import('eslint').Linter.Config[]} */\nconst config = [...benhighamEslintConfigNext];\n\nexport default config;\n```\n\n### GraphQL Plugin\n\nFor schema configuration (server):\n\n```js\n// eslint.config.js\nimport { schemaConfig } from '@benhigham/eslint-config/plugins/graphql';\n\n/** @type {import('eslint').Linter.Config[]} */\nconst config = [...schemaConfig];\n\nexport default config;\n```\n\nFor operations configuration (client):\n\n```js\n// eslint.config.js\nimport { operationsConfig } from '@benhigham/eslint-config/plugins/graphql';\n\n/** @type {import('eslint').Linter.Config[]} */\nconst config = [...operationsConfig];\n\nexport default config;\n```\n\n### Playwright Plugin\n\n```js\n// eslint.config.js\nimport playwrightConfig from '@benhigham/eslint-config/plugins/playwright';\n\n/** @type {import('eslint').Linter.Config[]} */\nconst config = [\n  {\n    files: ['**/tests/**/*.?(c|m)[jt]s', '**/*.{test,spec}.?(c|m)[jt]s'],\n    ...playwrightConfig,\n  },\n];\n\nexport default config;\n```\n\n### Tailwind CSS Plugin\n\n```js\n// eslint.config.js\nimport tailwindcssConfig from '@benhigham/eslint-config/plugins/tailwindcss';\n\n/** @type {import('eslint').Linter.Config[]} */\nconst config = [tailwindcssConfig];\n\nexport default config;\n```\n\n## Included Plugins\n\nThis package includes rules and configurations from the following plugins:\n\n- **eslint-plugin-unicorn**: Various powerful ESLint rules\n- **eslint-plugin-import-x**: Enhanced import/export linting\n- **eslint-plugin-promise**: Best practices for JavaScript promises\n- **eslint-plugin-n**: Node.js-specific rules\n- **eslint-plugin-compat**: Ensures browser compatibility via Browserslist\n- **eslint-plugin-no-use-extend-native**: Prevents extending built-in native objects\n- **eslint-plugin-no-secrets**: Prevents committing secrets to code\n- **eslint-plugin-no-unsanitized**: Prevents unsanitized DOM manipulation\n- **eslint-plugin-depend**: Dependency management rules\n- **eslint-plugin-sonarjs**: Detects bugs and suspicious patterns\n- **@eslint-community/eslint-plugin-eslint-comments**: Best practices for ESLint directive comments\n- **eslint-plugin-jsdoc**: JSDoc comment linting\n- **eslint-plugin-jsx-a11y**: Accessibility rules for JSX\n- **@next/eslint-plugin-next**: Next.js-specific rules\n- **eslint-plugin-testing-library**: Testing Library rules (DOM and React)\n- **@vitest/eslint-plugin**: Vitest testing framework rules\n- **eslint-plugin-playwright**: Playwright testing rules\n- **@graphql-eslint/eslint-plugin**: GraphQL schema and operation linting\n- **eslint-plugin-tailwindcss**: Tailwind CSS class linting\n- **eslint-config-prettier**: Disables rules that conflict with Prettier\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenhigham%2Feslint-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenhigham%2Feslint-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenhigham%2Feslint-config/lists"}