{"id":15574525,"url":"https://github.com/dolmios/eslint-config-dolmios","last_synced_at":"2025-06-24T13:36:41.390Z","repository":{"id":57686116,"uuid":"481491856","full_name":"dolmios/eslint-config-dolmios","owner":"dolmios","description":"A simple ESLint setup using @typescript-eslint.","archived":false,"fork":false,"pushed_at":"2025-06-06T18:38:04.000Z","size":628,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-10T09:04:36.768Z","etag":null,"topics":["core-web-vitals","eslint","nextjs","prettier","react","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/eslint-config-dolmios","language":"JavaScript","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/dolmios.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"zenodo":null}},"created_at":"2022-04-14T06:29:01.000Z","updated_at":"2025-06-06T18:38:06.000Z","dependencies_parsed_at":"2023-11-20T21:25:31.272Z","dependency_job_id":"836d42d1-1b6c-4ab4-a8fa-536357271f30","html_url":"https://github.com/dolmios/eslint-config-dolmios","commit_stats":{"total_commits":41,"total_committers":1,"mean_commits":41.0,"dds":0.0,"last_synced_commit":"258a79eebbd4a9d335c97304ba3448973c5b76b9"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dolmios%2Feslint-config-dolmios","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dolmios%2Feslint-config-dolmios/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dolmios%2Feslint-config-dolmios/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dolmios%2Feslint-config-dolmios/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dolmios","download_url":"https://codeload.github.com/dolmios/eslint-config-dolmios/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dolmios%2Feslint-config-dolmios/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259196164,"owners_count":22820106,"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":["core-web-vitals","eslint","nextjs","prettier","react","typescript"],"created_at":"2024-10-02T18:17:55.719Z","updated_at":"2025-06-24T13:36:41.349Z","avatar_url":"https://github.com/dolmios.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# eslint-config-dolmios\n\u003e A comprehensive ESLint (9) setup using [@typescript-eslint](https://typescript-eslint.io), integrated with Prettier and tailored TSConfig setups for modern JavaScript and TypeScript projects. This config is designed for my projects, but feel free to use it as a starting point for your own projects.\n\n\n## Install\n```sh\npnpm  add  eslint-config-dolmios\n```\n\n## Usage\nThis ESLint configuration is designed for use with ESLint v9, which uses a flat config format. Follow the steps below to integrate it into your project.\n\n### Setting Up ESLint\n1.  **Create an ESLint Configuration File**: In the root of your project, create a file named  `eslint.config.js`.\n\n2.  **Import and Extend the Configuration**: Add the following content to  `eslint.config.js`  to use the  `eslint-config-dolmios`  configuration:\n\n\n```js\nimport dolmios from \"eslint-config-dolmios\";\n\nexport default [\n  ...dolmios,\n  // Add any project-specific overrides here\n];\n```\n\n### Features\n\n- **TypeScript Support**: Comprehensive TypeScript linting with strict type checking\n- **React Best Practices**: Rules for React and React Hooks\n- **Accessibility**: A11y rules to ensure your app is accessible\n- **Next.js Optimization**: Includes Next.js Core Web Vitals rules for performance optimization\n- **Code Organization**: Perfectionist plugin for consistent code organization\n- **Modern JavaScript**: Enforces modern JavaScript practices\n\n### Next.js Compatibility\n\nThis configuration automatically detects your Next.js project structure and adjusts accordingly:\n\n- **App Router Support**: Works with Next.js App Router projects\n- **Pages Router Support**: Works with Next.js Pages Router projects\n- **Non-Next.js Projects**: Works with regular React projects without Next.js\n\nThe configuration automatically detects:\n- If you're using Next.js (by checking for `next.config.js`)\n- If you're using App Router (by checking for an `app` directory)\n- If you're using Pages Router (by checking for `pages` or `src/pages` directories)\n\nRules like `no-html-link-for-pages` are only enabled when a Pages Router is detected.\n\n---\n\n### Usage with Prettier\nPrettier is configured to work seamlessly with this ESLint setup. To include Prettier, add the configuration to your  `package.json`:\n\n```js\n\"prettier\": \"eslint-config-dolmios/configs/prettier\"\n```\n\n#### Extending Prettier\nIf you need to extend the Prettier configuration, you can do so by creating a  `.prettierrc.js`  file and exporting your modifications:\n\nFor more details, refer to the [Prettier documentation](https://prettier.io/docs/en/configuration.html#sharing-configurations).\n\n```js\nmodule.exports = {\n  ...require(\"eslint-config-dolmios/configs/prettier\"),\n  parser: \"babel\",\n};\n```\n\n---\n\n### Usage with TSConfig\nThis config also exports two TSConfig setups, `base` and `lib` respectively. The _base_ config is generally suitable. To include either, extend your `tsconfig.json`.\n\n\n```\n\n\"extends\": \"eslint-config-dolmios/configs/tsconfig\"\n\n```\n\n  \n\n## Configurations\nYou can view the ESLint configuration in the reference notes: [reference.txt](./reference.txt). \n\n## Acknowledgments\nThis configuration leverages several third-party libraries to enhance linting and formatting capabilities:\n\n-   **[@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint)**: Provides TypeScript-specific linting rules.\n-   **[eslint-plugin-react-hooks](https://www.npmjs.com/package/eslint-plugin-react-hooks)**: Enforces the rules of React Hooks.\n-   **[eslint-plugin-jsx-a11y](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y)**: Static AST checker for accessibility rules on JSX elements.\n-   **[eslint-plugin-next](https://github.com/vercel/next.js/tree/canary/packages/eslint-plugin-next)**: Provides Next.js specific linting rules.\n-   **[eslint-plugin-perfectionist](https://github.com/azat-io/eslint-plugin-perfectionist)**: Handles sorting of imports, objects, and other elements for a consistent codebase.\n-   **[eslint-config-prettier](https://github.com/prettier/eslint-config-prettier)**: Disables ESLint rules that might conflict with Prettier.\n\n## License\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdolmios%2Feslint-config-dolmios","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdolmios%2Feslint-config-dolmios","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdolmios%2Feslint-config-dolmios/lists"}