2b29918bf8
## PR Description This PR: - Introduces a `FrontComponentHostCommunicationApi`, which allows us to pass functions to be executed from the worker - Exposes a navigate function from the host to the front component remote workers, enabling SDK components to trigger in-app navigation - Gets rid of `useSyncExternalStore` and makes the execution context reactive without it - Refactors and improves the `esbuild` plugin system ## Video https://github.com/user-attachments/assets/7b26a1c2-f85f-4898-a71d-f60c70e61711
49 lines
1.2 KiB
JavaScript
49 lines
1.2 KiB
JavaScript
import reactPlugin from 'eslint-plugin-react';
|
|
import reactHooksPlugin from 'eslint-plugin-react-hooks';
|
|
import reactRefreshPlugin from 'eslint-plugin-react-refresh';
|
|
import baseConfig from '../../eslint.config.mjs';
|
|
|
|
export default [
|
|
...baseConfig,
|
|
{
|
|
ignores: ['**/dist/**'],
|
|
},
|
|
{
|
|
files: ['**/*.{js,jsx,ts,tsx}'],
|
|
plugins: {
|
|
'react': reactPlugin,
|
|
'react-hooks': reactHooksPlugin,
|
|
'react-refresh': reactRefreshPlugin,
|
|
},
|
|
settings: {
|
|
react: {
|
|
version: 'detect',
|
|
},
|
|
},
|
|
rules: {
|
|
'prettier/prettier': 'error',
|
|
'react/no-unescaped-entities': 'off',
|
|
'react/prop-types': 'off',
|
|
'react/jsx-key': 'off',
|
|
'react/display-name': 'off',
|
|
'react/jsx-uses-react': 'off',
|
|
'react/react-in-jsx-scope': 'off',
|
|
'react/jsx-no-useless-fragment': 'off',
|
|
'react/jsx-props-no-spreading': [
|
|
'error',
|
|
{
|
|
explicitSpread: 'ignore',
|
|
},
|
|
],
|
|
'react-hooks/rules-of-hooks': 'error',
|
|
'react-hooks/exhaustive-deps': 'warn',
|
|
},
|
|
},
|
|
{
|
|
rules: {
|
|
'no-console': 'off',
|
|
},
|
|
ignores: ['src/**/*.ts', '!src/cli/**/*.ts'],
|
|
},
|
|
];
|