Skip to content

Commit f8dd5fb

Browse files
fix lint
1 parent c2a2dfc commit f8dd5fb

2 files changed

Lines changed: 14 additions & 11 deletions

File tree

src/generateDocgenCodeBlock.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@ import path from "path";
22
import ts from "typescript";
33
import { ComponentDoc, PropItem } from "react-docgen-typescript";
44

5+
export interface GeneratorOptions {
6+
filename: string;
7+
source: string;
8+
componentDocs: ComponentDoc[];
9+
docgenCollectionName: string | null;
10+
setDisplayName: boolean;
11+
typePropName: string;
12+
}
13+
514
/**
615
* Inserts a ts-ignore comment above the supplied statement.
716
*
@@ -312,15 +321,6 @@ function setComponentDocGen(
312321
);
313322
}
314323

315-
export interface GeneratorOptions {
316-
filename: string;
317-
source: string;
318-
componentDocs: ComponentDoc[];
319-
docgenCollectionName: string | null;
320-
setDisplayName: boolean;
321-
typePropName: string;
322-
}
323-
324324
export function generateDocgenCodeBlock(options: GeneratorOptions): string {
325325
const sourceFile = ts.createSourceFile(
326326
options.filename,

src/plugin.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ export default class DocgenPlugin {
146146
this.options = options;
147147
}
148148

149-
apply(compiler: webpack.Compiler) {
149+
apply(compiler: webpack.Compiler): void {
150150
const {
151151
tsconfigPath = "./tsconfig.json",
152152
docgenCollectionName = "STORYBOOK_REACT_CLASSES",
@@ -168,7 +168,10 @@ export default class DocgenPlugin {
168168
};
169169

170170
if (userCompilerOptions) {
171-
compilerOptions = { ...compilerOptions, ...userCompilerOptions };
171+
compilerOptions = {
172+
...compilerOptions,
173+
...userCompilerOptions,
174+
};
172175
} else {
173176
const { options } = getTSConfigFile(tsconfigPath);
174177
compilerOptions = { ...compilerOptions, ...options };

0 commit comments

Comments
 (0)