
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
@figma/eslint-plugin-figma-plugins
Advanced tools
typescript-eslint rules for Figma plugin development
This repository defines typescript-eslint rules for Figma plugin development.
This 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.

This linter requires TypeScript, ESLint, typescript-eslint, and the Figma Plugin API type definitions. To install all of these, run:
npm install -D typescript eslint@8 @typescript-eslint/parser@6 @typescript-eslint/eslint-plugin@6 @figma/plugin-typings
npm install -D @figma/eslint-plugin-figma-plugins
Configure typescript-eslint as normal using these instructions.
Next, update your ESLint config's extends array to include the plugin:@figma/figma-plugins/recommended ruleset. We also recommend the following rulesets:
eslint:recommended,plugin:@typescript-eslint/recommendedTo work with TypeScript code, ESLint also requires the following parser settings:
{
...
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json',
},
...
}
Here's a full example of .eslintrc.js:
/* eslint-env node */
module.exports = {
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@figma/figma-plugins/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json',
},
root: true
}
If 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".
You can lint your project using these rules by running
npx eslint ./path/to/source
Some rules provide autofixes, which you can run using --fix.
npx eslint --fix ./path/to/source
Autofixes are also available via some IDEs.
To use ESLint with VSCode, see the ESLint VSCode extension. This extension will show rule violations inline, as well as provide opportunities to run autofixes directly in the IDE.
💼 Configurations enabled in.
⚠️ Configurations set to warn in.
👍 Set in the recommended configuration.
🔦 Set in the recommended-problems-only configuration.
🔧 Automatically fixable by the --fix CLI option.
| Name | Description | 💼 | ⚠️ | 🔧 |
|---|---|---|---|---|
| await-requires-async | Require functions that contain await to be async | 👍 🔦 | 🔧 | |
| ban-deprecated-id-params | Ban use of deprecated string ID parameters | 👍 🔦 | 🔧 | |
| ban-deprecated-sync-methods | Ban use of deprecated synchronous methods | 👍 🔦 | 🔧 | |
| ban-deprecated-sync-prop-getters | Ban use of deprecated synchronous property getters | 👍 🔦 | 🔧 | |
| ban-deprecated-sync-prop-setters | Ban use of deprecated synchronous property getters | 👍 🔦 | 🔧 | |
| constrain-proportions-replaced-by-target-aspect-ratio-advice | Warns against using constrainProportions in favor of targetAspectRatio | 👍 | ||
| dynamic-page-documentchange-event-advice | Advice on using the documentchange event | 👍 | ||
| dynamic-page-find-method-advice | Advice on using the find*() family of methods | 👍 |
Please see CONTRIBUTING.md
0.16.1
FAQs
typescript-eslint rules for Figma plugin development
The npm package @figma/eslint-plugin-figma-plugins receives a total of 17,261 weekly downloads. As such, @figma/eslint-plugin-figma-plugins popularity was classified as popular.
We found that @figma/eslint-plugin-figma-plugins demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 49 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.