Skip to content

Commit

Permalink
[Tests] Fix npm run flow
Browse files Browse the repository at this point in the history
 - Update import as import type
 - Replace script - flow with just flow (removing if statement)
 - Adding ignore script for malformed node_modules file
  • Loading branch information
steve authored and ljharb committed Jun 2, 2022
1 parent 112261c commit 287854a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions .flowconfig
@@ -1,4 +1,5 @@
[ignore]
<PROJECT_ROOT>/node_modules/resolve/test/resolver/malformed_package_json/package.json
<PROJECT_ROOT>/lib/.*
<PROJECT_ROOT>/docs/.*
<PROJECT_ROOT>/reports/.*
Expand Down
7 changes: 5 additions & 2 deletions __mocks__/genInteractives.js
Expand Up @@ -4,8 +4,11 @@

import { dom, roles } from 'aria-query';
import includes from 'array-includes';
import JSXAttributeMock, { JSXAttributeMockType } from './JSXAttributeMock';
import JSXElementMock, { JSXElementMockType } from './JSXElementMock';
import JSXAttributeMock from './JSXAttributeMock';
import JSXElementMock from './JSXElementMock';

import type { JSXAttributeMockType } from './JSXAttributeMock';
import type { JSXElementMockType } from './JSXElementMock';

const domElements = [...dom.keys()];
const roleNames = [...roles.keys()];
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -19,7 +19,7 @@
"scripts": {
"build": "rimraf lib && babel src --out-dir lib --copy-files",
"create": "node ./scripts/create-rule",
"flow": "if [ ! -e ./.flowconfig ]; then echo \"Could not find .flowconfig\"; else flow; test $? -eq 0 -o $? -eq 2; fi",
"flow": "flow",
"lint:fix": "npm run lint -- --fix",
"lint": "eslint .",
"prepublish": "not-in-publish || npm run prepublishOnly",
Expand Down

0 comments on commit 287854a

Please sign in to comment.