@cloud-ru/eslint-plugin-ssr-safe-react
Version:
eslint plugin for validating react code so that it would be suitable for SSR
25 lines (22 loc) • 476 B
JavaScript
export const DEFAULT_SCOPES = ['useEffect', 'useLayoutEffect'];
export const DEFAULT_CONDITIONS = ['isBrowser()'];
export const DEFAULT_VARIABLES = [
'document',
'history',
'location',
'screen',
'indexedDB',
'addEventListener',
'removeEventListener',
'innerHeight',
'innerWidth',
'requestAnimationFrame',
'dispatchEvent',
'IntersectionObserver',
'ResizeObserver',
'parent',
'matchMedia',
'localStorage',
'sessionStorage',
'navigator',
];