{"id":17045324,"url":"https://github.com/phanect/eslint-plugin-editorconfig","last_synced_at":"2025-04-12T15:22:21.659Z","repository":{"id":33106888,"uuid":"151874511","full_name":"phanect/eslint-plugin-editorconfig","owner":"phanect","description":"An ESLint plugin to enforce EditorConfig rules (Sorry, ESLint v9 support is not ready yet)","archived":false,"fork":false,"pushed_at":"2024-10-27T03:39:51.000Z","size":340,"stargazers_count":37,"open_issues_count":19,"forks_count":5,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-10T06:40:18.186Z","etag":null,"topics":["editorconfig","eslint","eslint-plugin"],"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/phanect.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-06T19:28:07.000Z","updated_at":"2025-02-15T02:23:19.000Z","dependencies_parsed_at":"2024-04-15T04:59:51.282Z","dependency_job_id":"823391af-7377-43cc-87f4-b97767bbc749","html_url":"https://github.com/phanect/eslint-plugin-editorconfig","commit_stats":{"total_commits":121,"total_committers":4,"mean_commits":30.25,"dds":"0.19834710743801653","last_synced_commit":"740a6da2e7cd1aca21267df7c454675089c25e22"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phanect%2Feslint-plugin-editorconfig","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phanect%2Feslint-plugin-editorconfig/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phanect%2Feslint-plugin-editorconfig/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phanect%2Feslint-plugin-editorconfig/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phanect","download_url":"https://codeload.github.com/phanect/eslint-plugin-editorconfig/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248586561,"owners_count":21129063,"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":["editorconfig","eslint","eslint-plugin"],"created_at":"2024-10-14T09:37:06.159Z","updated_at":"2025-04-12T15:22:21.634Z","avatar_url":"https://github.com/phanect.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# eslint-plugin-editorconfig\n\nAn ESLint plugin to enforce EditorConfig rules\n\n[![GitHub Actions Status](https://github.com/phanect/eslint-plugin-editorconfig/actions/workflows/actions.yml/badge.svg)](https://github.com/phanect/eslint-plugin-editorconfig/actions/workflows/actions.yml) [![NPM Version](https://img.shields.io/npm/v/eslint-plugin-editorconfig.svg)](https://npmjs.org/package/eslint-plugin-editorconfig)\n\n## Requirements\n\n- ESLint v8\n  - ESLint v9 and flat config support is not ready yet. Even if you use legacy .eslintrc.\\*, it does not work on v9. Sorry! :pray:\n- Node.js v{18, 20, 22}\n\n## Install\n\n```bash\n$ npm install --save-dev eslint@8 eslint-plugin-editorconfig\n```\n\nor\n\n```bash\n$ yarn add --dev eslint@8 eslint-plugin-editorconfig\n```\n\nIf you use [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint), you need to install `@typescript-eslint/eslint-plugin` too.\n\n```bash\n$ npm install --save-dev @typescript-eslint/eslint-plugin\n```\n\n## Usage\n\n### eslint.config.* (Flat Config)\n\nUnfortunately, eslint-plugin-editorconfig does not work properly with Flat Config for now, even if you use `@eslint/eslintrc` for compatibility.\nPlease wait for the next version.\n\n### .eslintrc.*\n\nLike other ESLint plugins,\n\n- add rules in the `rules`\n- add `\"editorconfig\"` in the `plugins`\n\nin your .eslintrc*\n\n```json\n{\n  // ...\n  \"rules\": {\n    \"editorconfig/charset\": \"error\",\n    \"editorconfig/eol-last\": \"error\",\n    \"editorconfig/indent\": \"error\",\n    \"editorconfig/linebreak-style\": \"error\",\n    \"editorconfig/no-trailing-spaces\": \"error\"\n  },\n  \"plugins\": [ \"editorconfig\" ]\n}\n```\n\nOr you can extend `plugin:editorconfig/all` instead of adding rules.\n\n```json\n{\n  // ...\n  \"extends\": [ \"plugin:editorconfig/all\" ],\n  \"plugins\": [ \"editorconfig\" ]\n}\n```\n\n## Conflicting ESLint rules\n\nFollowing rules may conflict `editorconfig/*` rule.\nIt is recommended to disable them.\n\n- `eol-last`\n- `indent`\n- `linebreak-style`\n- `no-trailing-spaces`\n- `unicode-bom`\n- `@typescript-eslint/eol-last`\n- `@typescript-eslint/indent`\n- `@typescript-eslint/linebreak-style`\n- `@typescript-eslint/no-trailing-spaces`\n- `@typescript-eslint/unicode-bom`\n\nIf above rules are specified in your .eslintrc, just remove them.\nIf they are specified in the extended config, consider adding `plugin:editorconfig/noconflict` to your `extends`.\n\n```json\n{\n  \"extends\": [\n    \"@phanect/phanective\",\n    \"plugin:editorconfig/noconflict\"\n  ],\n  // ...\n}\n```\n\nIf you extend `plugin:editorconfig/all`, the rules above are turned off too, so you don't have to add `plugin:editorconfig/noconflict` in addition to `plugin:editorconfig/all`.\n\n### Rules\n\nInternally, eslint-plugin-editorconfig uses the existing ESLint and typescript-eslint rules to verify/fix the code.\nSome rules allow passing options.\n\nAll the citation in the docs is from the backend ESLint rule document otherwise noted.\n\n| Rule                                                                | Description                                                     | Fixable |\n| ------------------------------------------------------------------- | --------------------------------------------------------------- | -- |\n| [editorconfig/charset](docs/rules/charset.md)                       | Enforce EditorConfig rules for charset                          | ✅ |\n| [editorconfig/eol-last](docs/rules/eol-last.md)                     | Enforce EditorConfig rules for the newlines at the end of files | ✅ |\n| [editorconfig/indent](docs/rules/indent.md)                         | Enforce EditorConfig rules for indentation                      | ✅ |\n| [editorconfig/linebreak-style](docs/rules/linebreak-style.md)       | Enforce EditorConfig rules for linebreak style                  | ✅ |\n| [editorconfig/no-trailing-spaces](docs/rules/no-trailing-spaces.md) | Enforce EditorConfig rules for trailing spaces                  | ✅ |\n\n## License \u0026 Credit\n\n[MIT](./LICENSE)\n\nThis plugin includes code derived from [klona](https://github.com/lukeed/klona).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphanect%2Feslint-plugin-editorconfig","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphanect%2Feslint-plugin-editorconfig","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphanect%2Feslint-plugin-editorconfig/lists"}