Skip to content

Commit 287854a

Browse files
steveljharb
steve
authored andcommittedJun 2, 2022
[Tests] Fix npm run flow
- Update import as import type - Replace script - flow with just flow (removing if statement) - Adding ignore script for malformed node_modules file
1 parent 112261c commit 287854a

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed
 

‎.flowconfig

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[ignore]
2+
<PROJECT_ROOT>/node_modules/resolve/test/resolver/malformed_package_json/package.json
23
<PROJECT_ROOT>/lib/.*
34
<PROJECT_ROOT>/docs/.*
45
<PROJECT_ROOT>/reports/.*

‎__mocks__/genInteractives.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@
44

55
import { dom, roles } from 'aria-query';
66
import includes from 'array-includes';
7-
import JSXAttributeMock, { JSXAttributeMockType } from './JSXAttributeMock';
8-
import JSXElementMock, { JSXElementMockType } from './JSXElementMock';
7+
import JSXAttributeMock from './JSXAttributeMock';
8+
import JSXElementMock from './JSXElementMock';
9+
10+
import type { JSXAttributeMockType } from './JSXAttributeMock';
11+
import type { JSXElementMockType } from './JSXElementMock';
912

1013
const domElements = [...dom.keys()];
1114
const roleNames = [...roles.keys()];

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"scripts": {
2020
"build": "rimraf lib && babel src --out-dir lib --copy-files",
2121
"create": "node ./scripts/create-rule",
22-
"flow": "if [ ! -e ./.flowconfig ]; then echo \"Could not find .flowconfig\"; else flow; test $? -eq 0 -o $? -eq 2; fi",
22+
"flow": "flow",
2323
"lint:fix": "npm run lint -- --fix",
2424
"lint": "eslint .",
2525
"prepublish": "not-in-publish || npm run prepublishOnly",

0 commit comments

Comments
 (0)
Please sign in to comment.