diff --git a/.babelrc.js b/.babelrc.js index e20e1b5..4067bd1 100644 --- a/.babelrc.js +++ b/.babelrc.js @@ -1,6 +1,6 @@ module.exports = (api) => ({ presets: [ - ['env-modules', { modules: api.env() === 'esm' ? false : 'commonjs' }], + ['env-modules', { modules: api.env() === 'cjs' ? 'commonjs' : false }], ['@babel/react', { runtime: 'automatic' }], '@babel/preset-typescript', ], diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index 72b4f04..0000000 --- a/.eslintrc +++ /dev/null @@ -1,18 +0,0 @@ -{ - "extends": ["@react-bootstrap", "4catalyzer-typescript", "prettier"], - "plugins": ["prettier"], - "rules": { - "jsx-a11y/no-autofocus": "off", - "prettier/prettier": "error", - "import/extensions": "off", - "@typescript-eslint/no-empty-function": "off" - }, - "overrides": [ - { - "files": ["test/**/*"], - "rules": { - "@typescript-eslint/no-unused-expressions": "off" - } - } - ] -} diff --git a/.gitignore b/.gitignore index cb8dbe5..39633b2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ lib/ +cjs/ .cache/ www/public diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..2edeafb --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +20 \ No newline at end of file diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 0000000..a96b397 --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,88 @@ +import eslint from '@eslint/js'; +import globals from 'globals'; +import prettierPlugin from 'eslint-plugin-prettier/recommended'; +import tseslint from 'typescript-eslint'; +import react from 'eslint-plugin-react'; +import reactHooks from 'eslint-plugin-react-hooks'; + +export default tseslint.config( + eslint.configs.recommended, + tseslint.configs.recommended, + + prettierPlugin, + react.configs.flat.recommended, + react.configs.flat['jsx-runtime'], + + { + plugins: { + 'react-hooks': reactHooks, + }, + settings: { + react: { + version: 'detect', + }, + }, + rules: { + 'react-hooks/rules-of-hooks': 'error', + }, + }, + { + files: ['**/*.ts', '**/*.tsx', '**/*.mts'], + plugins: { + '@typescript-eslint': tseslint.plugin, + }, + languageOptions: { + parser: tseslint.parser, + parserOptions: { + ecmaVersion: 'latest', + ecmaFeatures: { + jsx: true, + }, + warnOnUnsupportedTypeScriptVersion: false, + }, + }, + rules: { + '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/no-unused-vars': [ + 'error', + { + args: 'after-used', + argsIgnorePattern: '^_', + vars: 'all', + varsIgnorePattern: '^_', + caughtErrors: 'none', + caughtErrorsIgnorePattern: '^_', + ignoreRestSiblings: false, + }, + ], + }, + }, + { + ignores: ['**/node_modules/**', '**/lib/**', '**/www/**'], + }, + { + languageOptions: { + ecmaVersion: 2022, + sourceType: 'module', + globals: { + ...globals.browser, + ...globals.commonjs, + ...globals.node, + }, + }, + linterOptions: { + reportUnusedDisableDirectives: true, + }, + }, + { + files: ['**/test/**/*'], + rules: { + 'no-script-url': 'off', + 'no-unused-expressions': 'off', + '@typescript-eslint/no-unused-expressions': 'off', + 'padded-blocks': 'off', + 'react/no-multi-comp': 'off', + 'react/prop-types': 'off', + }, + }, +); diff --git a/package.json b/package.json index f0d5b56..f2a7a3c 100644 --- a/package.json +++ b/package.json @@ -11,26 +11,44 @@ "url": "git+https://github.com/react-restart/ui.git" }, "license": "MIT", - "main": "lib/cjs/index.js", - "module": "lib/esm/index.js", - "types": "lib/esm/index.d.ts", + "main": "cjs/index.js", + "module": "lib/index.js", + "types": "lib/index.d.ts", "exports": { + "./package.json": "./package.json", ".": { - "types": "./esm/index.d.ts", - "node": "./cjs/index.js", - "import": "./esm/index.js", - "require": "./cjs/index.js" + "node": { + "types": "./cjs/index.d.ts", + "default": "./cjs/index.js" + }, + "require": { + "types": "./cjs/index.d.ts", + "default": "./cjs/index.js" + }, + "import": { + "types": "./lib/index.d.ts", + "default": "./lib/index.js" + } }, "./*": { - "types": "./esm/*.d.ts", - "node": "./cjs/*.js", - "import": "./esm/*.js", - "require": "./cjs/*.js" + "node": { + "types": "./cjs/*.d.ts", + "default": "./cjs/*.js" + }, + "require": { + "types": "./cjs/*.d.ts", + "default": "./cjs/*.js" + }, + "import": { + "types": "./lib/*.d.ts", + "default": "./lib/*.js" + } } }, "sideEffects": false, "files": [ - "lib" + "lib", + "cjs" ], "gitHooks": { "pre-commit": "lint-staged" @@ -48,11 +66,15 @@ ], "scripts": { "bootstrap": "yarn --network-timeout 100000 && yarn --cwd www --network-timeout 100000", - "build": "rimraf lib && 4c build src && yarn build:popper && yarn build:pick", + "build": "rimraf lib && yarn build:esm && yarn build:cjs && yarn build:popper", + "build:esm": "babel src --out-dir lib --delete-dir-on-start --extensions '.ts,.tsx' --ignore='**/*.d.ts' && yarn build:esm:types", + "build:cjs": "babel src --out-dir cjs --env-name cjs --delete-dir-on-start --extensions '.ts,.tsx' --ignore='**/*.d.ts' && yarn build:cjs:types && echo '{\"type\": \"commonjs\"}' > cjs/package.json", + "build:esm:types": "tsc -p . --emitDeclarationOnly --declaration --outDir lib", + "build:cjs:types": "tsc -p . --emitDeclarationOnly --declaration --outDir cjs", "build:pick": "cherry-pick --cwd=lib --input-dir=../src --cjs-dir=cjs --esm-dir=esm", - "build:popper": "rollup src/popper.ts --file lib/cjs/popper.js --format cjs --name popper --plugin @rollup/plugin-node-resolve", + "build:popper": "rollup src/popper.ts --file cjs/popper.js --format cjs --name popper --plugin @rollup/plugin-node-resolve && rollup src/popper.ts --file lib/popper.js --format esm --name popper --plugin @rollup/plugin-node-resolve", "deploy-docs": "yarn --cwd www deploy", - "lint": "eslint www/*.js www/src src test *.ts --ext .js,.ts,.tsx", + "lint": "eslint src test", "prepublishOnly": "yarn build", "release": "rollout", "start": "yarn --cwd www start", @@ -61,7 +83,7 @@ "testonly": "vitest --run" }, "lint-staged": { - "*.js,*.tsx": "eslint --fix --ext .js,.ts,.tsx" + "*.js,*.tsx": "eslint --fix" }, "prettier": { "singleQuote": true, @@ -75,14 +97,15 @@ "conventionalCommits": true }, "dependencies": { + "@babel/eslint-parser": "^7.25.9", "@babel/runtime": "^7.26.0", "@popperjs/core": "^2.11.8", "@react-aria/ssr": "^3.5.0", - "@restart/hooks": "^0.5.0", + "@restart/hooks": "^0.6.2", "@types/warning": "^3.0.3", "dequal": "^2.0.3", "dom-helpers": "^5.2.0", - "uncontrollable": "^8.0.4", + "uncontrollable": "^9.0.0", "warning": "^4.0.3" }, "peerDependencies": { @@ -93,10 +116,11 @@ "@4c/cli": "^4.0.4", "@4c/rollout": "^4.0.2", "@4c/tsconfig": "^0.4.1", - "@babel/cli": "^7.20.7", - "@babel/core": "^7.20.12", - "@babel/preset-react": "^7.18.6", - "@babel/preset-typescript": "^7.18.6", + "@babel/cli": "^7.26.4", + "@babel/core": "^7.26.0", + "@babel/preset-react": "^7.26.3", + "@babel/preset-typescript": "^7.26.0", + "@eslint/js": "^9.17.0", "@react-bootstrap/eslint-config": "^2.0.0", "@rollup/plugin-node-resolve": "^15.2.3", "@testing-library/dom": "^10.3.1", @@ -106,8 +130,8 @@ "@types/react": "^18.3.3", "@types/react-dom": "^18.3.0", "@types/react-transition-group": "^4.4.4", - "@typescript-eslint/eslint-plugin": "^4.33.0", - "@typescript-eslint/parser": "^4.33.0", + "@typescript-eslint/eslint-plugin": "^8.19.1", + "@typescript-eslint/parser": "^8.19.1", "@vitejs/plugin-react": "^4.3.2", "@vitest/browser": "^2.1.3", "@vitest/coverage-istanbul": "2.1.3", @@ -116,25 +140,27 @@ "babel-preset-env-modules": "^1.0.1", "cherry-pick": "^0.5.0", "cross-env": "^7.0.3", - "eslint": "^7.24.0", - "eslint-config-4catalyzer-typescript": "^3.2.1", - "eslint-config-prettier": "^8.5.0", - "eslint-plugin-import": "^2.26.0", - "eslint-plugin-jsx-a11y": "^6.5.1", - "eslint-plugin-prettier": "^3.4.1", - "eslint-plugin-react": "^7.30.0", - "eslint-plugin-react-hooks": "^4.6.0", + "eslint": "^9.17.0", + "eslint-config-4catalyzer-typescript": "^3.3.0", + "eslint-config-prettier": "^9.1.0", + "eslint-plugin-import": "^2.31.0", + "eslint-plugin-jsx-a11y": "^6.10.2", + "eslint-plugin-prettier": "^5.2.1", + "eslint-plugin-react": "^7.37.3", + "eslint-plugin-react-hooks": "^5.1.0", "gh-pages": "^3.1.0", + "globals": "^15.14.0", "hookem": "^1.0.9", "lint-staged": "^10.5.4", "playwright": "^1.48.0", - "prettier": "^2.7.1", + "prettier": "^3.4.2", "react": "^18.3.1", "react-dom": "^18.3.1", "react-transition-group": "^4.4.1", "rimraf": "^3.0.2", "rollup": "^4.18.1", - "typescript": "^4.7.4", + "typescript": "^5.7.3", + "typescript-eslint": "^8.19.1", "vitest": "^2.1.3" }, "bugs": { diff --git a/src/Anchor.tsx b/src/Anchor.tsx index aaf5f42..2ff615d 100644 --- a/src/Anchor.tsx +++ b/src/Anchor.tsx @@ -1,9 +1,6 @@ -/* eslint-disable jsx-a11y/no-static-element-interactions */ -/* eslint-disable jsx-a11y/anchor-has-content */ - import * as React from 'react'; -import { useEventCallback } from '@restart/hooks'; +import useEventCallback from '@restart/hooks/useEventCallback'; import { useButtonProps } from './Button'; export function isTrivialHref(href?: string) { diff --git a/src/DropdownContext.ts b/src/DropdownContext.ts index 138eee4..94bf89f 100644 --- a/src/DropdownContext.ts +++ b/src/DropdownContext.ts @@ -2,7 +2,10 @@ import * as React from 'react'; import type { Placement } from './usePopper'; export type DropdownContextValue = { - toggle: (nextShow: boolean, event?: React.SyntheticEvent | Event) => void; + toggle: ( + nextShow: boolean, + event?: React.SyntheticEvent | KeyboardEvent | MouseEvent, + ) => void; menuElement: HTMLElement | null; toggleElement: HTMLElement | null; setMenu: (ref: HTMLElement | null) => void; diff --git a/src/DropdownMenu.tsx b/src/DropdownMenu.tsx index 598e95e..3afef73 100644 --- a/src/DropdownMenu.tsx +++ b/src/DropdownMenu.tsx @@ -126,7 +126,7 @@ export function useDropdownMenu(options: UseDropdownMenuOptions = {}) { } const handleClose = (e: React.SyntheticEvent | Event) => { - context?.toggle(false, e); + context?.toggle(false, e as any); }; const { placement, setMenu, menuElement, toggleElement } = context || {}; diff --git a/src/DropdownToggle.tsx b/src/DropdownToggle.tsx index c576947..b78ff77 100644 --- a/src/DropdownToggle.tsx +++ b/src/DropdownToggle.tsx @@ -40,7 +40,7 @@ export function useDropdownToggle(): [ } = useContext(DropdownContext) || {}; const handleClick = useCallback( (e: Event | React.SyntheticEvent) => { - toggle(!show, e); + toggle(!show, e as any); }, [show, toggle], ); diff --git a/src/ImperativeTransition.tsx b/src/ImperativeTransition.tsx index 4c75b00..fc9988b 100644 --- a/src/ImperativeTransition.tsx +++ b/src/ImperativeTransition.tsx @@ -1,7 +1,7 @@ import useMergedRefs from '@restart/hooks/useMergedRefs'; import useEventCallback from '@restart/hooks/useEventCallback'; import useIsomorphicEffect from '@restart/hooks/useIsomorphicEffect'; -import React, { useRef, cloneElement, useState } from 'react'; +import { useRef, cloneElement, useState } from 'react'; import { TransitionComponent, TransitionProps } from './types'; import NoopTransition from './NoopTransition'; import RTGTransition from './RTGTransition'; @@ -62,11 +62,8 @@ export function useTransition({ export interface ImperativeTransitionProps extends TransitionProps { transition: TransitionHandler; - // eslint-disable-next-line react/no-unused-prop-types appear: true; - // eslint-disable-next-line react/no-unused-prop-types mountOnEnter: true; - // eslint-disable-next-line react/no-unused-prop-types unmountOnExit: true; } diff --git a/src/Modal.tsx b/src/Modal.tsx index 0f9b7c9..cdbc9dd 100644 --- a/src/Modal.tsx +++ b/src/Modal.tsx @@ -1,4 +1,4 @@ -/* eslint-disable @typescript-eslint/no-use-before-define, react/prop-types */ +/* eslint-disable react/prop-types */ import activeElement from 'dom-helpers/activeElement'; import contains from 'dom-helpers/contains'; @@ -21,7 +21,7 @@ import usePrevious from '@restart/hooks/usePrevious'; import useEventCallback from '@restart/hooks/useEventCallback'; import ModalManager from './ModalManager'; import useWaitForDOMRef, { DOMContainer } from './useWaitForDOMRef'; -import { TransitionCallbacks } from './types'; +import { TransitionCallbacks, TransitionComponent } from './types'; import useWindow from './useWindow'; import { renderTransition, TransitionHandler } from './ImperativeTransition'; import { isEscKey } from './utils'; @@ -438,19 +438,23 @@ const Modal: React.ForwardRefExoticComponent< ); - dialog = renderTransition(transition, runTransition, { - unmountOnExit: true, - mountOnEnter: true, - appear: true, - in: !!show, - onExit, - onExiting, - onExited: handleHidden, - onEnter, - onEntering, - onEntered, - children: dialog as React.ReactElement, - }); + dialog = renderTransition( + transition as TransitionComponent, + runTransition, + { + unmountOnExit: true, + mountOnEnter: true, + appear: true, + in: !!show, + onExit, + onExiting, + onExited: handleHidden, + onEnter, + onEntering, + onEntered, + children: dialog as React.ReactElement, + }, + ); let backdropElement = null; if (backdrop) { @@ -460,7 +464,7 @@ const Modal: React.ForwardRefExoticComponent< }); backdropElement = renderTransition( - backdropTransition, + backdropTransition as TransitionComponent, runBackdropTransition, { in: !!show, diff --git a/src/Nav.tsx b/src/Nav.tsx index 895d0b0..91feced 100644 --- a/src/Nav.tsx +++ b/src/Nav.tsx @@ -16,7 +16,6 @@ import NavItem, { UseNavItemOptions, NavItemProps } from './NavItem'; export type { UseNavItemOptions, NavItemProps }; -// eslint-disable-next-line @typescript-eslint/no-empty-function const noop = () => {}; export interface NavProps @@ -149,7 +148,7 @@ const Nav: DynamicRefForwardingComponent<'div', NavProps> = React.forwardRef< needsRefocusRef.current = false; }); - const mergedRef = useMergedRefs(ref, listNode); + const mergedRef = useMergedRefs(ref as any, listNode); return ( @@ -157,7 +156,9 @@ const Nav: DynamicRefForwardingComponent<'div', NavProps> = React.forwardRef< value={{ role, // used by NavLink to determine it's role activeKey: makeEventKey(activeKey), + // @ts-expect-error null getControlledId: getControlledId || noop, + // @ts-expect-error null getControllerId: getControllerId || noop, }} > diff --git a/src/NavItem.tsx b/src/NavItem.tsx index 58b1128..0ab4c42 100644 --- a/src/NavItem.tsx +++ b/src/NavItem.tsx @@ -66,7 +66,6 @@ export function useNavItem({ const contextControllerId = navContext.getControllerId(key ?? null); const contextControlledId = navContext.getControlledId(key ?? null); - // @ts-ignore props[dataAttr('event-key')] = key; props.id = contextControllerId || id; @@ -126,7 +125,6 @@ const NavItem: DynamicRefForwardingComponent = ...options, }); - // @ts-ignore props[dataAttr('active')] = meta.isActive; return ; diff --git a/src/RTGTransition.tsx b/src/RTGTransition.tsx index 4be781b..e62fd15 100644 --- a/src/RTGTransition.tsx +++ b/src/RTGTransition.tsx @@ -16,4 +16,6 @@ const RTGTransition = React.forwardRef( }, ); +RTGTransition.displayName = 'RTGTransition'; + export default RTGTransition; diff --git a/src/Tabs.tsx b/src/Tabs.tsx index 66d66ea..ab0f1b4 100644 --- a/src/Tabs.tsx +++ b/src/Tabs.tsx @@ -96,7 +96,7 @@ const Tabs = (props: TabsProps) => { transition, mountOnEnter: mountOnEnter || false, unmountOnExit: unmountOnExit || false, - getControlledId: (key: EventKey) => generateChildId(key, 'tabpane'), + getControlledId: (key: EventKey) => generateChildId(key, 'pane'), getControllerId: (key: EventKey) => generateChildId(key, 'tab'), }), [ diff --git a/src/mergeOptionsWithPopperConfig.ts b/src/mergeOptionsWithPopperConfig.ts index a886be8..501fff8 100644 --- a/src/mergeOptionsWithPopperConfig.ts +++ b/src/mergeOptionsWithPopperConfig.ts @@ -20,7 +20,6 @@ export function toModifierMap(modifiers: Modifiers | undefined) { return modifiers || result; } - // eslint-disable-next-line no-unused-expressions modifiers?.forEach((m) => { result[m.name!] = m; }); diff --git a/src/types.ts b/src/types.ts index d474ea3..e748e9f 100644 --- a/src/types.ts +++ b/src/types.ts @@ -33,7 +33,7 @@ export interface DynamicRefForwardingComponent< = TInitial>( props: AssignPropsWithRef, context?: any, - ): React.ReactElement | null; + ): React.ReactNode; propTypes?: any; contextTypes?: any; defaultProps?: Partial

; @@ -47,7 +47,7 @@ export interface DynamicFunctionComponent< = TInitial>( props: AssignPropsWithoutRef, context?: any, - ): React.ReactElement | null; + ): React.ReactNode; propTypes?: any; contextTypes?: any; defaultProps?: Partial

; @@ -67,7 +67,7 @@ export type DynamicComponentClass< export type SelectCallback = ( eventKey: string | null, - e: React.SyntheticEvent, + e: React.SyntheticEvent, ) => void; export interface TransitionCallbacks { diff --git a/src/usePopper.ts b/src/usePopper.ts index 9541290..378b3ec 100644 --- a/src/usePopper.ts +++ b/src/usePopper.ts @@ -222,7 +222,6 @@ function usePopper( } }; // This is only run once to _create_ the popper - // eslint-disable-next-line react-hooks/exhaustive-deps }, [enabled, referenceElement, popperElement]); return popperState; diff --git a/src/useRTGTransitionProps.ts b/src/useRTGTransitionProps.ts index 839357f..daf12a9 100644 --- a/src/useRTGTransitionProps.ts +++ b/src/useRTGTransitionProps.ts @@ -43,7 +43,6 @@ export default function useRTGTransitionProps({ } }; - /* eslint-disable react-hooks/exhaustive-deps */ const handleEnter = useCallback(normalize(onEnter), [onEnter]); const handleEntering = useCallback(normalize(onEntering), [onEntering]); const handleEntered = useCallback(normalize(onEntered), [onEntered]); @@ -53,7 +52,6 @@ export default function useRTGTransitionProps({ const handleAddEndListener = useCallback(normalize(addEndListener), [ addEndListener, ]); - /* eslint-enable react-hooks/exhaustive-deps */ return { ...props, diff --git a/src/useWaitForDOMRef.ts b/src/useWaitForDOMRef.ts index 3f8f526..5de0a85 100644 --- a/src/useWaitForDOMRef.ts +++ b/src/useWaitForDOMRef.ts @@ -16,7 +16,7 @@ export const resolveContainerRef = ( if (typeof ref === 'function') ref = ref(); if (ref && 'current' in ref) ref = ref.current; - if (ref && ('nodeType' in ref || ref.getBoundingClientRect)) return ref; + if (ref && ('nodeType' in ref || 'getBoundingClientRect' in ref)) return ref; return null; }; diff --git a/test/.eslintrc b/test/.eslintrc deleted file mode 100644 index 6fca471..0000000 --- a/test/.eslintrc +++ /dev/null @@ -1,10 +0,0 @@ -{ - "rules": { - "no-script-url": 0, - "no-unused-expressions": 0, - "padded-blocks": 0, - "react/no-multi-comp": 0, - "react/prop-types": 0, - "no-unused-vars": [2, { "varsIgnorePattern": "^_$" }] - } -} diff --git a/test/AnchorSpec.tsx b/test/AnchorSpec.tsx index b8c2686..dae21bb 100644 --- a/test/AnchorSpec.tsx +++ b/test/AnchorSpec.tsx @@ -86,11 +86,13 @@ describe('Anchor', () => { }); it('forwards provided role', () => { - render().getByRole('test'); + render().getByRole('dialog'); }); it('forwards provided role with href', () => { - render().getByRole('test'); + render().getByRole( + 'dialog', + ); }); it('set role=button with no provided href', () => { diff --git a/test/ModalManagerSpec.ts b/test/ModalManagerSpec.ts index 1220c3f..16fd085 100644 --- a/test/ModalManagerSpec.ts +++ b/test/ModalManagerSpec.ts @@ -10,7 +10,7 @@ vi.mock('../src/getScrollbarWidth', () => ({ })); const createModal = (): ModalInstance => - ({ dialog: null, backdrop: null } as any); + ({ dialog: null, backdrop: null }) as any; describe('ModalManager', () => { let container: HTMLElement, manager: ModalManager; diff --git a/test/ModalSpec.tsx b/test/ModalSpec.tsx index 6241f30..37eafb3 100644 --- a/test/ModalSpec.tsx +++ b/test/ModalSpec.tsx @@ -1,5 +1,3 @@ -/* eslint-disable react/display-name */ - import * as React from 'react'; import { fireEvent, render, screen, waitFor } from '@testing-library/react'; diff --git a/test/PortalSpec.tsx b/test/PortalSpec.tsx index 6059a67..82dd8b0 100644 --- a/test/PortalSpec.tsx +++ b/test/PortalSpec.tsx @@ -6,7 +6,7 @@ import { Portal } from '../src'; describe('Portal', () => { it('should render overlay into container (document)', () => { render( - /* @ts-expect-error */ + /* @ts-expect-error missing required props */

, @@ -54,7 +54,7 @@ describe('Portal', () => { render() { return (
- {/* @ts-expect-error */} + {/* @ts-expect-error missing required props */}
); diff --git a/test/WaitForContainerSpec.tsx b/test/WaitForContainerSpec.tsx index ddd4714..df91150 100644 --- a/test/WaitForContainerSpec.tsx +++ b/test/WaitForContainerSpec.tsx @@ -1,5 +1,3 @@ -/* eslint-disable @typescript-eslint/no-shadow */ -/* eslint-disable no-shadow */ import { render } from '@testing-library/react'; import { expect, describe, it, vi } from 'vitest'; diff --git a/test/helpers.ts b/test/helpers.ts index edf887a..7d0eca2 100644 --- a/test/helpers.ts +++ b/test/helpers.ts @@ -1,7 +1,6 @@ let style: any; let seen: string[] = []; -// eslint-disable-next-line import/prefer-default-export export function injectCss(rules: string) { if (seen.indexOf(rules) !== -1) { return; diff --git a/test/types.test.tsx b/test/types.test.tsx index 3e688a3..64d3a04 100644 --- a/test/types.test.tsx +++ b/test/types.test.tsx @@ -1,5 +1,3 @@ -/* eslint-disable no-unused-vars */ - import { Button } from '../src'; const _1 =