Summary: Bumps [eslint-plugin-jsx-a11y](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y) from 6.5.1 to 6.6.1. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/releases">eslint-plugin-jsx-a11y's releases</a>.</em></p> <blockquote> <h2>v6.6.0</h2> <p><strong>Full Changelog</strong>: <a href="https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/compare/v6.5.1...v6.6.0">https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/compare/v6.5.1...v6.6.0</a></p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/CHANGELOG.md">eslint-plugin-jsx-a11y's changelog</a>.</em></p> <blockquote> <h1>6.6.1 / 2022-07-21</h1> <ul> <li>38405ad [Fix] <code>no-interactive-tabindex</code>: allow role assignments using a ternary with literals on both sides</li> <li>7524e0c [Fix] <code>no-static-element-interactions</code>: allow role assignments using a ternary with literals on both sides (<a href="https://github-redirect.dependabot.com/jsx-eslint/eslint-plugin-jsx-a11y/issues/865">https://github.com/facebook/flipper/issues/865</a>)</li> <li>1c06306 [readme] properly describe rule settings in builtin configs</li> <li>0c19f02 [Docs] <code>no-noninteractive-tabindex</code>, <code>no-static-element-interactions</code>: document <code>allowExpressionValues</code> (<a href="https://github-redirect.dependabot.com/jsx-eslint/eslint-plugin-jsx-a11y/issues/870">https://github.com/facebook/flipper/issues/870</a>)</li> <li>2362832 [readme] added link to redirect eslint to relevant docs (<a href="https://github-redirect.dependabot.com/jsx-eslint/eslint-plugin-jsx-a11y/issues/862">https://github.com/facebook/flipper/issues/862</a>)</li> <li>2c6926c [Deps] unpin <code>axe-core</code></li> <li>b78f19d [Deps] pin <code>axe-core</code> to v4.4.1, due to a breaking change in a patch</li> <li>768910e [Deps] update <code>babel/runtime</code></li> <li>f0e04ce [Deps] update <code>babel/runtime</code>, <code>jsx-ast-utils</code></li> <li>93b2a9d [Dev Deps] update <code>babel/cli</code>, <code>babel/core</code>, <code>babel/eslint-parser</code>, <code>babel/plugin-transform-flow-strip-types</code>, <code>babel/register</code></li> <li>a962211 [Dev Deps] update <code>babel/cli</code>, <code>babel/core</code>, <code>babel/plugin-transform-flow-strip-types</code>, <code>babel/register</code></li> <li>0d2bc43 [Tests] <code>no-noninteractive-element-interactions</code>: add passing test cases (<a href="https://github-redirect.dependabot.com/jsx-eslint/eslint-plugin-jsx-a11y/issues/876">https://github.com/facebook/flipper/issues/876</a>)</li> <li>ffefbad [Tests] <code>no-noninteractive-element-interactions</code>: add passing tests for form with onSubmit (<a href="https://github-redirect.dependabot.com/jsx-eslint/eslint-plugin-jsx-a11y/issues/871">https://github.com/facebook/flipper/issues/871</a>)</li> <li>e7d405d [Tests] <code>no-static-element-interactions</code>: add passing test cases</li> </ul> <h1>6.6.0 / 2022-06-23</h1> <ul> <li>566011b [New] <code>aria-role</code>: add <code>allowedInvalidRoles</code> option (<a href="https://github-redirect.dependabot.com/jsx-eslint/eslint-plugin-jsx-a11y/issues/828">https://github.com/facebook/flipper/issues/828</a>)</li> <li>64dcac6 [New] Introduce a plugin-wide setting for custom components. (<a href="https://github-redirect.dependabot.com/jsx-eslint/eslint-plugin-jsx-a11y/issues/844">https://github.com/facebook/flipper/issues/844</a>)</li> <li>ce2c328 [Fix] <code>no-redundant-roles</code>, <code>role-supports-aria-props</code>: Remove implicit role from dl element (<a href="https://github-redirect.dependabot.com/jsx-eslint/eslint-plugin-jsx-a11y/issues/848">https://github.com/facebook/flipper/issues/848</a>)</li> <li>fb20bc4 [Refactor] <code>role-supports-aria-props</code>: clean up the logic a bit</li> <li>1826628 [Refactor] reduce egregious use of array spread, in favor of <code>[].concat</code> idiom</li> <li>0f1615a [Docs] <code>no-static-element-interactions</code>: Update error message (<a href="https://github-redirect.dependabot.com/jsx-eslint/eslint-plugin-jsx-a11y/issues/843">https://github.com/facebook/flipper/issues/843</a>)</li> <li>9980d1d [Docs] Add infrastructure for auto-generating markdown table and list (<a href="https://github-redirect.dependabot.com/jsx-eslint/eslint-plugin-jsx-a11y/issues/837">https://github.com/facebook/flipper/issues/837</a>)</li> <li>f878d3b [Docs] Update project readme (<a href="https://github-redirect.dependabot.com/jsx-eslint/eslint-plugin-jsx-a11y/issues/831">https://github.com/facebook/flipper/issues/831</a>)</li> <li>aea7671 [Deps] update <code>babel/runtime</code>, <code>array-includes</code>, <code>axe-core</code>, <code>jsx-ast-utils</code></li> <li>d74173a [Deps] update <code>jsx-ast-utils</code></li> <li>f6ba03c [Deps] update <code>babel/runtime</code>, <code>jsx-ast-utils</code></li> <li>547dab4 [Deps] update <code>babel/runtime</code>, <code>axe-core</code>, <code>minimatch</code></li> <li>baaf791 [Deps] update <code>babel/runtime</code>, <code>minimatch</code>, <code>semver</code></li> <li>c015fef [Deps] update <code>babel/runtime</code>, <code>axe-core</code>, <code>damerau-levenshtein</code></li> <li>832cbd6 [meta] add <code>export default</code> instead of <code>module.exports</code> (<a href="https://github-redirect.dependabot.com/jsx-eslint/eslint-plugin-jsx-a11y/issues/861">https://github.com/facebook/flipper/issues/861</a>)</li> <li>ee933a2 [meta] Add CONTRIBUTING.md to solicit contributions (<a href="https://github-redirect.dependabot.com/jsx-eslint/eslint-plugin-jsx-a11y/issues/846">https://github.com/facebook/flipper/issues/846</a>)</li> <li>fa3c869 [Dev Deps] update <code>babel/cli</code>, <code>babel/core</code>, <code>babel/eslint-parser</code>, <code>babel/plugin-transform-flow-strip-types</code>, <code>aud</code>, <code>eslint-plugin-eslint-plugin</code>, <code>eslint-plugin-flowtype</code>, <code>eslint-plugin-import</code></li> <li>fb3d51e [Dev Deps] update <code>babel/core</code>, <code>babel/register</code>, <code>eslint-plugin-import</code>, <code>minimist</code></li> <li>8c1df4d [Dev Deps] pin <code>technote-space/doctoc</code> because v2.5 is a breaking change</li> <li>fb071ab [Dev Deps] update <code>babel/cli</code>, <code>babel/core</code>, <code>babel/eslint-parser</code>, <code>babel/plugin-transform-flow-strip-types</code>, <code>eslint-plugin-eslint-plugin</code></li> <li>5e966e5 [Dev Deps] update <code>babel/cli</code></li> <li>f597f5b [Dev Deps] update <code>babel/cli</code>, <code>babel/core</code>, <code>babel/eslint-parser</code></li> <li>287854a [Tests] Fix <code>npm run flow</code> (<a href="https://github-redirect.dependabot.com/jsx-eslint/eslint-plugin-jsx-a11y/issues/856">https://github.com/facebook/flipper/issues/856</a>)</li> <li>112261c [Tests] skip fragment tests in eslint < 6</li> <li>ea877c4 [Tests] <code>img-redundant-alt-test</code>: add passing tests (<a href="https://github-redirect.dependabot.com/jsx-eslint/eslint-plugin-jsx-a11y/issues/832">https://github.com/facebook/flipper/issues/832</a>)</li> <li>685426d test: align usage of jest expect across tests (<a href="https://github-redirect.dependabot.com/jsx-eslint/eslint-plugin-jsx-a11y/issues/827">https://github.com/facebook/flipper/issues/827</a>)</li> <li>c460a8b [Tests] move invalid test case to valid; changed in axe-core v4.4</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="d678a98ccd"><code>d678a98</code></a> v6.6.1</li> <li><a href="93b2a9dae1"><code>93b2a9d</code></a> [Dev Deps] update <code>babel/cli</code>, <code>babel/core</code>, <code>babel/eslint-parser</code>, `babe...</li> <li><a href="768910e83f"><code>768910e</code></a> [Deps] update <code>babel/runtime</code></li> <li><a href="0d2bc43985"><code>0d2bc43</code></a> [Tests] <code>no-noninteractive-element-interactions</code>: add passing test cases</li> <li><a href="a9622118ca"><code>a962211</code></a> [Dev Deps] update <code>babel/cli</code>, <code>babel/core</code>, `babel/plugin-transform-flow-...</li> <li><a href="2c6926c123"><code>2c6926c</code></a> [Deps] unpin <code>axe-core</code></li> <li><a href="1c06306ede"><code>1c06306</code></a> [readme] properly describe rule settings in builtin configs</li> <li><a href="b78f19dcae"><code>b78f19d</code></a> [Deps] pin <code>axe-core</code> to v4.4.1, due to a breaking change in a patch</li> <li><a href="ffefbad6ba"><code>ffefbad</code></a> [Tests] <code>no-noninteractive-element-interactions</code>: add passing tests for form ...</li> <li><a href="0c19f024c3"><code>0c19f02</code></a> [Docs] <code>no-noninteractive-tabindex</code>, <code>no-static-element-interactions</code>: docume...</li> <li>Additional commits viewable in <a href="https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/compare/v6.5.1...v6.6.1">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `dependabot rebase` will rebase this PR - `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `dependabot merge` will merge this PR after your CI passes on it - `dependabot squash and merge` will squash and merge this PR after your CI passes on it - `dependabot cancel merge` will cancel a previously requested merge and block automerging - `dependabot reopen` will reopen this PR if it is closed - `dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Pull Request resolved: https://github.com/facebook/flipper/pull/3937 Reviewed By: passy Differential Revision: D38316019 Pulled By: LukeDefeo fbshipit-source-id: 8cccb8bb083b03046853adfc18fa682d3203ef41
js-flipper
This package exposes JavaScript bindings to talk from web / Node.js directly to flipper.
Installation
yarn add js-flipper
Usage
How to build Flipper plugins is explained in the flipper documentation: Creating a Flipper plugin. Building a Flipper plugin involves building a plugin for the Desktop app, and a plugin that runs on a Device (web or Node.js). This package is only needed for the plugin that runs on the device (web / Node.js), and wants to use the WebSocket connection to communicate to Flipper.
This package exposes a flipperClient. It has:
addPluginmethod. It accepts apluginparameter, that registers a client plugin and will fire the relevant callbacks if the corresponding desktop plugin is selected in the Flipper Desktop. The full plugin API is documented here.startmethod. It starts the client. It has two arguments:appName- (required) the name displayed in Flipperoptionswhich conforms to the interfaceinterface FlipperClientOptions { // Make the client connect to a different URL urlBase?: string; // Override WebSocket implementation (Node.js folks, it is for you!) websocketFactory?: (url: string) => FlipperWebSocket; // Override how errors are handled (it is simple `console.error` by default) onError?: (e: unknown) => void; // Timeout after which client tries to reconnect to Flipper reconnectTimeout?: number; // Set device ID. Default: random ID persisted to local storage. getDeviceId?: () => Promise<string> | string }
Example (web)
An example plugin can be found in FlipperTicTacToe.js.
The corresponding Desktop plugin ships by default in Flipper, so importing the
above file and dropping the <FlipperTicTacToe /> component somewhere in your
application should work out of the box.
The sources of the corresponding Desktop plugin can be found here.
Node.js
Node.js does not have a built-in WebSocket implementation. You need to install any implementation of WebSockets for Node.js that is compatible with the interface of the web version.
import flipperClient from 'js-flipper';
// Say, you decided to go with 'ws'
// https://github.com/websockets/ws
import WebSocket from 'ws';
// Start the client and pass some options
// You might ask yourself why there is the second argument `{ origin: 'localhost:' }`
// Flipper Desktop verifies the `Origin` header for every WS connection. You need to set it to one of the whitelisted values (see `VALID_WEB_SOCKET_REQUEST_ORIGIN_PREFIXES`).
flipperClient.start('My cool nodejs app', { websocketFactory: url => new WebSocket(url, {origin: 'localhost:'}) });
An example plugin should be somewhat similar to what we have for React. It is currently WIP (do not confuse with RIP!).