Skip to content

Commit

Permalink
🔧 Unused exports
Browse files Browse the repository at this point in the history
  • Loading branch information
cjmckee committed Dec 5, 2024
1 parent daf28fc commit 69a8198
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
3 changes: 2 additions & 1 deletion examples/react-embed-front-chat/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ const iframeStyle = {
* Component.
*/

export function App() {
// @ts-expect-error: Suppress unused variable warning.
function App() {
const onLoadIframe = async (event: SyntheticEvent<HTMLIFrameElement>) => {
const iframe = event.target as HTMLIFrameElement;

Expand Down
3 changes: 2 additions & 1 deletion examples/react-use-front-chat-boot/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ const chatId = '<CHAT_ID_REQUIRED>';
* Component.
*/

export function App() {
// @ts-expect-error: Suppress unused variable warning.
function App() {
const {frontChat, initialize, isInitialized} = useFrontChatBoot(document.body);

const [isWindowVisible, setIsWindowVisible] = useState(false);
Expand Down
3 changes: 2 additions & 1 deletion examples/react-use-front-chat/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ const chatId = '<CHAT_ID_REQUIRED>';
* Component.
*/

export function App() {
// @ts-expect-error: Suppress unused variable warning.
function App() {
const {isInitialized} = useFrontChat(chatId);

return <div>isInitialized: {isInitialized ? 'True' : 'False'}</div>;
Expand Down
3 changes: 2 additions & 1 deletion examples/react-verified-user/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ const userHash = hmac.update(userId).digest('hex');
* Component.
*/

export function App() {
// @ts-expect-error: Suppress unused variable warning.
function App() {
const {frontChat, initialize, isInitialized} = useFrontChatBoot(document.body);

const [isWindowVisible, setIsWindowVisible] = useState(false);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"preview": "vite preview",
"sort-package-json:check": "sort-package-json --check",
"sort-package-json:fix": "sort-package-json",
"unused-exports": "ts-unused-exports ./tsconfig.json --excludePathsFromReport='vite.config.ts;'"
"unused-exports": "ts-unused-exports ./tsconfig.json --excludePathsFromReport='vite.config.ts;lib/index.ts;tsup.config.ts'"
},
"lint-staged": {
"**/*": "npm run prettier:fix --"
Expand Down

0 comments on commit 69a8198

Please sign in to comment.