{"id":14981500,"url":"https://github.com/figma/eslint-plugin-figma-plugins","last_synced_at":"2025-05-07T14:46:54.389Z","repository":{"id":215512654,"uuid":"722331248","full_name":"figma/eslint-plugin-figma-plugins","owner":"figma","description":"typescript-eslint rules for plugins","archived":false,"fork":false,"pushed_at":"2025-02-18T18:03:19.000Z","size":3720,"stargazers_count":30,"open_issues_count":3,"forks_count":1,"subscribers_count":41,"default_branch":"main","last_synced_at":"2025-04-26T14:02:50.097Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/figma.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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}},"created_at":"2023-11-22T23:07:17.000Z","updated_at":"2025-04-24T16:02:28.000Z","dependencies_parsed_at":"2024-02-15T01:39:11.301Z","dependency_job_id":"b6963259-0259-4a66-83c2-f66ede82d374","html_url":"https://github.com/figma/eslint-plugin-figma-plugins","commit_stats":{"total_commits":66,"total_committers":4,"mean_commits":16.5,"dds":0.3787878787878788,"last_synced_commit":"c17089fbcff8282712a26dd841e4b465b67b81cf"},"previous_names":["figma/eslint-plugin-figma-plugins"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/figma%2Feslint-plugin-figma-plugins","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/figma%2Feslint-plugin-figma-plugins/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/figma%2Feslint-plugin-figma-plugins/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/figma%2Feslint-plugin-figma-plugins/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/figma","download_url":"https://codeload.github.com/figma/eslint-plugin-figma-plugins/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252898675,"owners_count":21821665,"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":[],"created_at":"2024-09-24T14:03:43.608Z","updated_at":"2025-05-07T14:46:54.362Z","avatar_url":"https://github.com/figma.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# eslint-plugin-figma-plugins\n\nThis repository defines [typescript-eslint](https://typescript-eslint.io/) rules for [Figma plugin development](https://www.figma.com/plugin-docs/).\n\nThis tool helps you stay up to date with best practices and deprecations in the Figma Plugin API. You can use it to help identify, and in many cases automatically fix, issues in your plugin code. Like any ESLint plugin, it integrates with IDEs like VSCode to provide inline warnings and quick-fix functionality.\n\n### A quick look\n\n![An animation of VSCode quick fixes enabled by this plugin](./vscode-quickfix.gif)\n\n## Installation\n\n### Dependencies\n\nThis linter requires TypeScript, ESLint, typescript-eslint, and the Figma Plugin API type definitions. To install all of these, run:\n\n```\nnpm install -D typescript eslint@8 @typescript-eslint/parser@6 @typescript-eslint/eslint-plugin@6 @figma/plugin-typings\n```\n\n#### Notes on peer dependency versions\n\n- This plugin is not yet compatible with ESLint 9. Once [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint) has been [upgraded to support ESLint 9](https://github.com/typescript-eslint/typescript-eslint/pull/9002), we'll update this README with example configurations that use the new ESLint 9 flat configs.\n- This plugin has only been tested with typescript-eslint version 6.\n\n### Install the ESLint plugin package\n\n```\nnpm install -D @figma/eslint-plugin-figma-plugins\n```\n\n### Configure eslint\n\nConfigure typescript-eslint as normal using [these instructions](https://typescript-eslint.io/getting-started#step-1-installation).\n\nNext, update your ESLint config's `extends` array to include the `plugin:@figma/figma-plugins/recommended` ruleset. We also recommend the following rulesets:\n\n- `eslint:recommended`,\n- `plugin:@typescript-eslint/recommended`\n\nTo work with TypeScript code, ESLint also requires the following parser settings:\n\n```\n{\n  ...\n  parser: '@typescript-eslint/parser',\n  parserOptions: {\n    project: './tsconfig.json',\n  },\n  ...\n}\n```\n\nHere's a full example of `.eslintrc.js`:\n\n```\n/* eslint-env node */\nmodule.exports = {\n  extends: [\n    'eslint:recommended',\n    'plugin:@typescript-eslint/recommended',\n    'plugin:@figma/figma-plugins/recommended',\n  ],\n  parser: '@typescript-eslint/parser',\n  parserOptions: {\n    project: './tsconfig.json',\n  },\n  root: true\n}\n```\n\n### Restart the ESLint server\n\nIf you've run `npm install` and updated to a newer version of this package, remember to restart your IDE. In VSCode, you can restart the ESLint server independently by opening the command palette and choosing \"Restart ESLint Server\".\n\n## Usage\n\n### Linting and autofixing\n\nYou can lint your project using these rules by running\n\n```\nnpx eslint ./path/to/source\n```\n\nSome rules provide autofixes, which you can run using `--fix`.\n\n```\nnpx eslint --fix ./path/to/source\n```\n\nAutofixes are also available via some IDEs.\n\n### VSCode\n\nTo use ESLint with VSCode, see the [ESLint VSCode extension](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint). This extension will show rule violations inline, as well as provide opportunities to run autofixes directly in the IDE.\n\n## Rules\n\n\u003c!-- begin auto-generated rules list --\u003e\n\n💼 Configurations enabled in.\\\n⚠️ Configurations set to warn in.\\\n👍 Set in the `recommended` configuration.\\\n🔦 Set in the `recommended-problems-only` configuration.\\\n🔧 Automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/user-guide/command-line-interface#--fix).\n\n| Name                                                                                                                                       | Description                                                            | 💼    | ⚠️ | 🔧 |\n| :----------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------- | :---- | :- | :- |\n| [await-requires-async](docs/rules/await-requires-async.md)                                                                                 | Require functions that contain `await` to be `async`                   | 👍 🔦 |    | 🔧 |\n| [ban-deprecated-id-params](docs/rules/ban-deprecated-id-params.md)                                                                         | Ban use of deprecated string ID parameters                             | 👍 🔦 |    | 🔧 |\n| [ban-deprecated-sync-methods](docs/rules/ban-deprecated-sync-methods.md)                                                                   | Ban use of deprecated synchronous methods                              | 👍 🔦 |    | 🔧 |\n| [ban-deprecated-sync-prop-getters](docs/rules/ban-deprecated-sync-prop-getters.md)                                                         | Ban use of deprecated synchronous property getters                     | 👍 🔦 |    | 🔧 |\n| [ban-deprecated-sync-prop-setters](docs/rules/ban-deprecated-sync-prop-setters.md)                                                         | Ban use of deprecated synchronous property getters                     | 👍 🔦 |    | 🔧 |\n| [constrain-proportions-replaced-by-target-aspect-ratio-advice](docs/rules/constrain-proportions-replaced-by-target-aspect-ratio-advice.md) | Warns against using constrainProportions in favor of targetAspectRatio |       | 👍 |    |\n| [dynamic-page-documentchange-event-advice](docs/rules/dynamic-page-documentchange-event-advice.md)                                         | Advice on using the `documentchange` event                             |       | 👍 |    |\n| [dynamic-page-find-method-advice](docs/rules/dynamic-page-find-method-advice.md)                                                           | Advice on using the find*() family of methods                          |       | 👍 |    |\n\n\u003c!-- end auto-generated rules list --\u003e\n\n### Contributing\n\nPlease see [CONTRIBUTING.md](./CONTRIBUTING.md)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffigma%2Feslint-plugin-figma-plugins","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffigma%2Feslint-plugin-figma-plugins","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffigma%2Feslint-plugin-figma-plugins/lists"}