diff --git a/.eslintrc b/.eslintrc index 344b94607..ff158b320 100644 --- a/.eslintrc +++ b/.eslintrc @@ -9,6 +9,7 @@ "plugin:react/recommended", "plugin:flowtype/recommended" ], + "parser": "babel-eslint", "parserOptions": { "sourceType": "module", "ecmaVersion": 7, diff --git a/.flowconfig b/.flowconfig new file mode 100644 index 000000000..b29db22be --- /dev/null +++ b/.flowconfig @@ -0,0 +1,24 @@ +[ignore] +.*/node_modules/.* +lib/.* +.*/test/**/*.json +.*/static/.* +.*/test/unit/partials/.* +.*/test/functional/store/.* +.*/.nyc_output/.* +.*/coverage/.* +.*/.vscode/.* + +[include] + +[libs] +node_modules/@verdaccio/types/lib/ + +[lints] + +[options] +suppress_comment= \\(.\\|\n\\)*\\$FlowFixMe +unsafe.enable_getters_and_setters=true + +[version] +^0.52.0 diff --git a/package.json b/package.json index d14e34a14..5d6d1e7d0 100644 --- a/package.json +++ b/package.json @@ -79,6 +79,7 @@ "eslint-plugin-react": "7.1.0", "extract-text-webpack-plugin": "3.0.0", "file-loader": "0.11.2", + "flow-bin": "0.52.0", "flow-runtime": "0.13.0", "friendly-errors-webpack-plugin": "1.6.1", "fs-extra": "4.0.1", @@ -124,6 +125,7 @@ "scripts": { "release": "standard-version -a -s", "prepublish": "in-publish && npm run build:webui || not-in-publish", + "flow": "flow", "test": "mocha ./test/functional ./test/unit --reporter=spec --full-trace", "pre:ci": "npm run build:webui", "test:ci": "npm run test:coverage", diff --git a/yarn.lock b/yarn.lock index f8e27b61f..bcb8a6e30 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2852,6 +2852,10 @@ flatten@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782" +flow-bin@0.52.0: + version "0.52.0" + resolved "https://registry.npmjs.org/flow-bin/-/flow-bin-0.52.0.tgz#b6d9abe8bcd1ee5c62df386451a4e2553cadc3a3" + flow-config-parser@^0.3.0: version "0.3.0" resolved "https://registry.npmjs.org/flow-config-parser/-/flow-config-parser-0.3.0.tgz#704916efba88cd2518ab4d8f933079571276138f"