{"id":13596799,"url":"https://github.com/privatenumber/eslint-plugin-fix-later","last_synced_at":"2025-03-16T15:31:04.619Z","repository":{"id":223678088,"uuid":"742742616","full_name":"privatenumber/eslint-plugin-fix-later","owner":"privatenumber","description":"ESLint plugin to suppresses ESLint errors as warnings for future resolution","archived":false,"fork":false,"pushed_at":"2024-08-17T10:57:58.000Z","size":129,"stargazers_count":18,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2024-10-19T01:11:25.398Z","etag":null,"topics":["errors","eslint","fix","later","plugin","suppress","warnings"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/privatenumber.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},"funding":{"github":"privatenumber"}},"created_at":"2024-01-13T08:22:45.000Z","updated_at":"2024-08-17T10:08:54.000Z","dependencies_parsed_at":"2024-02-21T14:31:11.017Z","dependency_job_id":"24adb5c4-ae84-4bc7-964a-91f6eab5fbb0","html_url":"https://github.com/privatenumber/eslint-plugin-fix-later","commit_stats":null,"previous_names":["privatenumber/eslint-plugin-fix-later"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/privatenumber%2Feslint-plugin-fix-later","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/privatenumber%2Feslint-plugin-fix-later/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/privatenumber%2Feslint-plugin-fix-later/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/privatenumber%2Feslint-plugin-fix-later/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/privatenumber","download_url":"https://codeload.github.com/privatenumber/eslint-plugin-fix-later/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221665219,"owners_count":16860198,"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":["errors","eslint","fix","later","plugin","suppress","warnings"],"created_at":"2024-08-01T16:02:48.365Z","updated_at":"2024-10-27T10:49:29.555Z","avatar_url":"https://github.com/privatenumber.png","language":"TypeScript","funding_links":["https://github.com/sponsors/privatenumber"],"categories":["TypeScript"],"sub_categories":[],"readme":"# 📌 eslint-plugin-fix-later\n\nThis plugin automatically suppresses ESLint errors with \"fix later\" comments, turning them into warnings for future resolution.\n\n\u003cbr\u003e\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003cth align=\"center\"\u003e\nBefore\n\u003c/th\u003e\n\u003cth align=\"center\"\u003e\nAfter auto-fix\n\u003c/th\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\n\n```js\nconsole.log(data)\n```\n\u003cp align=\"center\"\u003e\n\n❌ **Error** `no-console Unexpected console statement`\n\u003c/p\u003e\n\u003c/td\u003e\n\u003ctd\u003e\n\n```js\n// eslint-disable-next-line no-console -- Fix later\nconsole.log(data)\n```\n\u003cp align=\"center\"\u003e\n\n⚠️ **Warning** `[REMINDER] Fix later`\n\u003c/p\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n\u003cbr\u003e\n\n\u003e [!TIP]\n\u003e Use the `git blame` feature documented below to tag the author in the \"fix later\" comment.\n\n\n## Why?\n\nIn large projects with many developers, ESLint helps keep code consistent and high-quality. But, updating the ESLint config with new rules can be challenging when it surfaces many new errors. This would be too much for one dev to fix, and potentially risky if it's outside of their familiarity.\n\nThis plugin solves this by temporarily suppressing these errors into \"fix later\" warnings, allowing the right dev to address them when ready. This keeps the project moving forward without sacrificing code quality.\n\n## Install\n```\npnpm i -D eslint-plugin-fix-later\n```\n\n## Setup\n\nIn your ESLint config:\n\n```json5\n{\n    plugins: [\n        // ...\n        'fix-later',\n    ],\n    rules: {\n        // ...\n        'fix-later/fix-later': ['warn', {\n            // Options...\n        }]\n    }\n}\n```\n\n### Recommended workflow\n\n1. **Activate this plugin**\n\n\tSet up the `fix-later` rule to emit a _warning_ (as opposed to `errors`).\n\n2. **Automate linting on commit**\n\n\tUse [simple-git-hooks](https://github.com/toplenboren/simple-git-hooks) \u0026 [lint-staged](https://github.com/lint-staged/lint-staged) to auto-lint changed files when committing\n\n3. **Disallow linting warnings on commit**\n\n\tConfigure your commit hook to reject warnings: `eslint --max-warnings=0`\n\n\tThis encourages devs working in the file to address outstanding warnings if they can. If not, they can commit with `--no-verify`.\n\n4. **Disallow linting errors on CI**\n\n\tOn CI, run ESLint with warnings allowed: `eslint .`\n\n\tThis approach prevents errors from slipping through while accommodating \"fix later\" notes.\n\n### Suppressing auto-fixable errors (ESLint v8+)\n\nPass in the [`--fix-type=directive`](https://eslint.org/docs/latest/use/command-line-interface#--fix-type) flag to ESLint to only apply the fix-later auto-fix.\n\n## Options\n\n### includeWarnings\n\nType: `boolean`\n\nDefault: `false`\n\nWhether to suppress warnings in addition to errors.\n\n### insertDisableComment\n\nType: `'above-line' | 'end-of-line'`\n\nDefault: `'end-of-line'`\n\nWhether to put the `eslint-disable` comment on the same line or on the line above.\n\n### commentTemplate\n\nType: string\n\nDefault: `'Fix later'`\n\nThe template for the `eslint-disable` comment. The `{{ eslint-disable }}` handlebar is required to interpolate the `eslint-disable` type into.\n\n#### Git blame\n\nYou can get the `git blame` author of the errorneous code:\n```\nPlease fix: {{ blame.author }} \u003c{{ blame.author-mail }}\u003e\n```\n\nWhich will create the following comment:\n```\n// eslint-disable-line -- Please fix: John Doe \u003cjohn@doe.org\u003e\n```\n\nAll properties from `git blame` are available:\n\n```json5\n{\n    \"author\": \"John Doe\",\n    \"author-mail\": \"john@doe.org\",\n    \"author-time\": \"1708498454\",\n    \"author-tz\": \"+0100\",\n    \"committer\": \"John Doe\",\n    \"committer-mail\": \"\u003cjohn@doe.org\u003e\",\n    \"committer-time\": \"1708498454\",\n    \"committer-tz\": \"+0100\"\n}\n```\n\n#### CODEOWNER\n\nYou can get the [CODEOWNER](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners) of the file:\n\n```\nPlease fix: {{ codeowner }}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprivatenumber%2Feslint-plugin-fix-later","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprivatenumber%2Feslint-plugin-fix-later","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprivatenumber%2Feslint-plugin-fix-later/lists"}