Skip to content

Commit 8a076c5

Browse files
authored
Remove flow (#75)
* Remove flow code * Format * Remove flowconfig * Remove flow from *ignore files * Remove flow from GitHub Actions * Remove flow from package.json * Oops * Disable flow checks in eslint * Format
1 parent d60a6af commit 8a076c5

12 files changed

+6
-47
lines changed

.eslintignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
build
22
dist
33
coverage
4-
flow-typed
54
CHANGELOG.md
65
node_modules
76
cdn

.eslintrc.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
/* @flow */
2-
31
module.exports = {
42
extends: "@krakenjs/eslint-config-grumbler/eslintrc-node",
53
rules: {
64
"const-immutable/no-mutation": "off",
5+
"flowtype/require-valid-file-annotation": 0,
76
},
87
};

.flowconfig

Lines changed: 0 additions & 14 deletions
This file was deleted.

.github/workflows/main.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,5 @@ jobs:
2626
with:
2727
useLockFile: false
2828

29-
- name: ▶️ Run flow-typed script
30-
run: npm run flow-typed
31-
3229
- name: ▶️ Run tests
3330
run: npm test

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@ jspm_packages
4343
# Yarn Integrity file
4444
.yarn-integrity
4545

46-
# Flow Typed
47-
flow-typed
48-
4946
.idea
5047

5148
.DS_Store

.prettierignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
build
22
dist
33
coverage
4-
flow-typed
54
CHANGELOG.md
65
node_modules
76
cdn

index.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
1-
/* @flow */
21
/* eslint import/no-default-export: off */
32

4-
import { setupSDK, type SetupComponent } from "@paypal/sdk-client/src";
3+
import { setupSDK } from "@paypal/sdk-client/src";
54

6-
export default (
7-
namespace: string,
8-
verison: string,
9-
components: $ReadOnlyArray<SetupComponent<mixed>>
10-
// $FlowFixMe
11-
) => {
5+
export default (namespace, verison, components) => {
126
return setupSDK(components);
137
};

karma.conf.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
/* @flow */
21
/* eslint import/no-default-export: off */
32

43
import { getKarmaConfig } from "@krakenjs/karma-config-grumbler";
54
import { getWebpackConfig } from "@krakenjs/webpack-config-grumbler";
65

7-
export default function configKarma(karma: Object) {
6+
export default function configKarma(karma) {
87
const karmaConfig = getKarmaConfig(karma, {
98
basePath: __dirname,
109
webpack: getWebpackConfig(),

package.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,11 @@
99
"validate-flat": "babel-node test/validate-flat",
1010
"cdnify": "grabthar-cdnify --recursive --cdn='https://www.paypalobjects.com'",
1111
"reinstall": "rm -f ./package-lock.json && rm -rf ./node_modules && npm install && git checkout package-lock.json && git checkout package.json",
12-
"flow-typed": "rm -rf ./flow-typed && flow-typed install",
1312
"lint": "npm run format:check && eslint test/ *.js",
14-
"flow": "flow check",
1513
"format": "prettier --write --ignore-unknown .",
1614
"format:check": "prettier --check .",
1715
"karma": "cross-env NODE_ENV=test babel-node --plugins=transform-es2015-modules-commonjs ./node_modules/.bin/karma start",
18-
"test": "npm run lint && npm run flow-typed && npm run flow && npm run validate-components && npm run validate-flat",
16+
"test": "npm run lint && npm run validate-components && npm run validate-flat",
1917
"add": "grabthar-add",
2018
"upgrade": "grabthar-upgrade",
2119
"remove": "grabthar-remove",
@@ -59,8 +57,6 @@
5957
"@krakenjs/grumbler-scripts": "^8.0.4",
6058
"cross-env": "^7.0.3",
6159
"eslint": "^8.13.0",
62-
"flow-bin": "0.135.0",
63-
"flow-typed": "^3.8.0",
6460
"flowgen": "1.11.0",
6561
"husky": "^8.0.3",
6662
"jest": "^29.3.1",

test/validate-components-for-publish.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/* @flow */
2-
31
import pkg from "../package.json";
42
import pkgLock from "../package-lock.json";
53

test/validate-components.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/* @flow */
2-
31
import { join } from "path";
42

53
import { exists } from "fs-extra";
@@ -11,7 +9,7 @@ const NODE_MODULES = "node_modules";
119

1210
const BABELRC_NAMES = [".babelrc", ".babelrc.json", ".babelrc.js"];
1311

14-
async function validateComponents(): Promise<void> {
12+
async function validateComponents() {
1513
for (const dependencyName of Object.keys(pkg.dependencies)) {
1614
const dependencyPath = join(NODE_MODULES, dependencyName);
1715

@@ -23,7 +21,6 @@ async function validateComponents(): Promise<void> {
2321
throw new Error(`Expected ${dependencyName} to have ${SDK_JS}`);
2422
}
2523

26-
// $FlowFixMe
2724
const componentMeta = require(join(dependencyName, SDK_JS)); // eslint-disable-line security/detect-non-literal-require
2825

2926
const moduleNames = Object.keys(componentMeta);

test/validate-flat.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/* @flow */
2-
31
import pkgLock from "../package-lock.json";
42

53
for (const depName of Object.keys(pkgLock.dependencies)) {

0 commit comments

Comments
 (0)