Skip to content

Commit 6c3d505

Browse files
phateddanez
authored andcommitted
Lint fixes
1 parent d55b604 commit 6c3d505

File tree

6 files changed

+21
-6
lines changed

6 files changed

+21
-6
lines changed

src/handlers/__tests__/propTypeHandler-test.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@
99
jest.mock('../../Documentation');
1010
jest.mock('../../utils/getPropType', () => jest.fn(() => ({})));
1111

12-
import { statement, expression, noopImporter, makeMockImporter } from '../../../tests/utils';
12+
import {
13+
statement,
14+
expression,
15+
noopImporter,
16+
makeMockImporter,
17+
} from '../../../tests/utils';
1318
import Documentation from '../../Documentation';
1419
import { propTypeHandler } from '../propTypeHandler';
1520

src/handlers/propTypeCompositionHandler.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ function processObjectExpression(documentation, path, importer) {
3232
amendComposes(
3333
documentation,
3434
resolveToValue(propertyPath.get('argument'), importer),
35-
importer
35+
importer,
3636
);
3737
break;
3838
}

src/utils/isReactChildrenElementCall.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ import type { Importer } from '../types';
1717
* Returns true if the expression is a function call of the form
1818
* `React.Children.only(...)`.
1919
*/
20-
export default function isReactChildrenElementCall(path: NodePath, importer: Importer): boolean {
20+
export default function isReactChildrenElementCall(
21+
path: NodePath,
22+
importer: Importer,
23+
): boolean {
2124
if (t.ExpressionStatement.check(path.node)) {
2225
path = path.get('expression');
2326
}

src/utils/isReactCreateClassCall.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ import type { Importer } from '../types';
2020
* createReactClass(...);
2121
* ```
2222
*/
23-
function isReactCreateClassCallModular(path: NodePath, importer: Importer): boolean {
23+
function isReactCreateClassCallModular(
24+
path: NodePath,
25+
importer: Importer,
26+
): boolean {
2427
if (t.ExpressionStatement.check(path.node)) {
2528
path = path.get('expression');
2629
}

src/utils/isStatelessComponent.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ function isJSXElementOrReactCall(path, importer: Importer) {
3232
isReactCreateElementCall(path, importer)) ||
3333
(path.node.type === 'CallExpression' &&
3434
isReactCloneElementCall(path, importer)) ||
35-
(path.node.type === 'CallExpression' && isReactChildrenElementCall(path, importer))
35+
(path.node.type === 'CallExpression' &&
36+
isReactChildrenElementCall(path, importer))
3637
);
3738
}
3839

src/utils/resolveToModule.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ import type { Importer } from '../types';
1717
* this function tries to find the name of module from which the "root value"
1818
* was imported.
1919
*/
20-
export default function resolveToModule(path: NodePath, importer: Importer): ?string {
20+
export default function resolveToModule(
21+
path: NodePath,
22+
importer: Importer,
23+
): ?string {
2124
const node = path.node;
2225
switch (node.type) {
2326
case t.VariableDeclarator.name:

0 commit comments

Comments
 (0)