Skip to content

Commit 718ac46

Browse files
authored
fix(workspace-plugin): make react lib and component generators pass linting after generation (microsoft#35154)
1 parent 80318c9 commit 718ac46

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

tools/workspace-plugin/src/generators/react-component/files/component/render__componentName__.tsx__tmpl__

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22
/** @jsxImportSource @fluentui/react-jsx-runtime */
33

44
import { assertSlots } from '@fluentui/react-utilities';
5+
import type { JSXElement } from '@fluentui/react-utilities';
56
import type { <%= componentName %>State, <%= componentName %>Slots } from './<%= componentName %>.types';
67

78
/**
89
* Render the final JSX of <%= componentName %>
910
*/
10-
export const render<%= componentName %>_unstable = (state: <%= componentName %>State) => {
11+
export const render<%= componentName %>_unstable = (state: <%= componentName %>State): JSXElement => {
1112
assertSlots<<%= componentName %>Slots>(state);
1213

1314
// TODO Add additional slots in the appropriate place

tools/workspace-plugin/src/generators/react-library/files/src/testing/isConformant.ts__tmpl__

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import griffelTests from '@fluentui/react-conformance-griffel';
44

55
export function isConformant<TProps = {}>(
66
testInfo: Omit<IsConformantOptions<TProps>, 'componentPath'> & { componentPath?: string },
7-
) {
7+
): void {
88
const defaultOptions: Partial<IsConformantOptions<TProps>> = {
99
tsConfig: { configName: 'tsconfig.spec.json' },
1010
componentPath: require.main?.filename.replace('.test', ''),

0 commit comments

Comments
 (0)