diff --git a/code/addons/actions/src/containers/ActionLogger/index.tsx b/code/addons/actions/src/containers/ActionLogger/index.tsx index 3cf1cc3d05dc..f8c774f0cd84 100644 --- a/code/addons/actions/src/containers/ActionLogger/index.tsx +++ b/code/addons/actions/src/containers/ActionLogger/index.tsx @@ -26,6 +26,7 @@ const safeDeepEqual = (a: any, b: any): boolean => { }; export default class ActionLogger extends Component { + // @ts-expect-error Unused, possibly remove, leaving, because it could be accessed even though it is private private mounted: boolean; constructor(props: ActionLoggerProps) { diff --git a/code/addons/toolbars/src/components/ToolbarMenuList.tsx b/code/addons/toolbars/src/components/ToolbarMenuList.tsx index bc7561c15797..e40abbdd8570 100644 --- a/code/addons/toolbars/src/components/ToolbarMenuList.tsx +++ b/code/addons/toolbars/src/components/ToolbarMenuList.tsx @@ -1,4 +1,4 @@ -import type { FC, ReactNode } from 'react'; +import type { FC } from 'react'; import React, { useCallback } from 'react'; import { useGlobals } from '@storybook/api'; import { deprecate } from '@storybook/client-logger'; @@ -10,14 +10,6 @@ import { getSelectedIcon, getSelectedTitle } from '../utils/get-selected'; import type { ToolbarMenuProps } from '../types'; import { ToolbarMenuListItem } from './ToolbarMenuListItem'; -type ItemProps = { - left?: ReactNode; - title?: ReactNode; - right?: ReactNode; - active?: boolean; - onClick?: () => void; -}; - type ToolbarMenuListProps = ToolbarMenuProps & WithKeyboardCycleProps; export const ToolbarMenuList: FC = withKeyboardCycle( diff --git a/code/frameworks/angular/src/client/angular-beta/RendererFactory.test.ts b/code/frameworks/angular/src/client/angular-beta/RendererFactory.test.ts index 0129a09f68a2..f27b50a7315a 100644 --- a/code/frameworks/angular/src/client/angular-beta/RendererFactory.test.ts +++ b/code/frameworks/angular/src/client/angular-beta/RendererFactory.test.ts @@ -304,10 +304,7 @@ describe('RendererFactory', () => { global.document.getElementById('root').appendChild(global.document.createElement('👾')); expect(global.document.getElementById('root').innerHTML).toContain('Canvas 🖼'); - const render = await rendererFactory.getRendererInstance( - 'my-story-in-docs', - rootDocstargetDOMNode - ); + await rendererFactory.getRendererInstance('my-story-in-docs', rootDocstargetDOMNode); expect(global.document.getElementById('root').innerHTML).toBe(''); }); }); diff --git a/code/frameworks/angular/src/server/framework-preset-angular-cli.test.ts b/code/frameworks/angular/src/server/framework-preset-angular-cli.test.ts index f61bb6ef600d..48c3df39b031 100644 --- a/code/frameworks/angular/src/server/framework-preset-angular-cli.test.ts +++ b/code/frameworks/angular/src/server/framework-preset-angular-cli.test.ts @@ -34,11 +34,8 @@ describe('framework-preset-angular-cli', () => { }); describe('without angular.json', () => { - let consoleErrorSpy: jest.SpyInstance; - beforeEach(() => { initMockWorkspace(''); - consoleErrorSpy = jest.spyOn(console, 'error').mockImplementation(); }); it('should return webpack base config and display log error', async () => { const webpackBaseConfig = newWebpackConfiguration(); @@ -421,10 +418,6 @@ describe('framework-preset-angular-cli', () => { it('should set webpack "module.rules"', async () => { const baseWebpackConfig = newWebpackConfiguration(); const webpackFinalConfig = await webpackFinal(baseWebpackConfig, options); - const stylePaths = [ - path.join(workspaceRoot, 'src', 'styles.css'), - path.join(workspaceRoot, 'src', 'styles.scss'), - ]; const expectedRules: any = [ { @@ -507,10 +500,6 @@ describe('framework-preset-angular-cli', () => { it('should set webpack "module.rules"', async () => { const baseWebpackConfig = newWebpackConfiguration(); const webpackFinalConfig = await webpackFinal(baseWebpackConfig, options); - const stylePaths = [ - path.join(workspaceRoot, 'src', 'styles.css'), - path.join(workspaceRoot, 'src', 'styles.scss'), - ]; const expectedRules: any = [ { diff --git a/code/frameworks/angular/tsconfig.build.json b/code/frameworks/angular/tsconfig.build.json index e6ebc0167a55..6aa09e55adac 100644 --- a/code/frameworks/angular/tsconfig.build.json +++ b/code/frameworks/angular/tsconfig.build.json @@ -15,7 +15,8 @@ "allowJs": true, "pretty": true, "noErrorTruncation": true, - "listEmittedFiles": false + "listEmittedFiles": false, + "noUnusedLocals": false }, "include": ["src/**/*", "src/**/*.json"] } diff --git a/code/lib/cli/src/generators/baseGenerator.ts b/code/lib/cli/src/generators/baseGenerator.ts index 81d1da558f43..83f3e3d17aa9 100644 --- a/code/lib/cli/src/generators/baseGenerator.ts +++ b/code/lib/cli/src/generators/baseGenerator.ts @@ -128,7 +128,8 @@ export async function baseGenerator( const { packages: frameworkPackages, type, - renderer: rendererInclude, // deepscan-disable-line UNUSED_DECL + // @ts-expect-error Possibly remove this unused variable? + renderer: rendererInclude, rendererId, framework: frameworkInclude, builder: builderInclude, diff --git a/code/lib/core-client/src/start.test.ts b/code/lib/core-client/src/start.test.ts index 8c3092d147ea..742be7502b60 100644 --- a/code/lib/core-client/src/start.test.ts +++ b/code/lib/core-client/src/start.test.ts @@ -384,7 +384,7 @@ describe('start', () => { it('re-emits SET_INDEX when a story is added', async () => { const renderToDOM = jest.fn(({ storyFn }) => storyFn()); - const { configure, clientApi, forceReRender } = start(renderToDOM); + const { configure, clientApi } = start(renderToDOM); let disposeCallback: () => void = () => {}; const module = { diff --git a/code/renderers/svelte/src/public-types.test.ts b/code/renderers/svelte/src/public-types.test.ts index dad3102b580a..18ee02d3a416 100644 --- a/code/renderers/svelte/src/public-types.test.ts +++ b/code/renderers/svelte/src/public-types.test.ts @@ -42,7 +42,7 @@ describe('Meta', () => { }); test('Events are inferred from component', () => { - const meta: Meta