Gathering detailed insights and metrics for babel-plugin-transform-flow-interface-imports
Gathering detailed insights and metrics for babel-plugin-transform-flow-interface-imports
Gathering detailed insights and metrics for babel-plugin-transform-flow-interface-imports
Gathering detailed insights and metrics for babel-plugin-transform-flow-interface-imports
npm install babel-plugin-transform-flow-interface-imports
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
6 Commits
2 Watching
1 Branches
1 Contributors
Updated on 14 Jan 2018
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
8.8%
222
Compared to previous day
Last week
-1.6%
1,026
Compared to previous week
Last month
17.2%
4,806
Compared to previous month
Last year
40.2%
47,321
Compared to previous year
Babel plugin to removed useless flow interface modules
For vscode, we can use flow Type Annotations without having flow installed, and with the help of Babel plugin -- babel-plugin-transform-flow-strip-types, all type annations can be removed. And interface definitions can be removed, either.
But for those imported interfaces, the import statements and the modules are kept in output. As time goes on, more and more interfaces are added, and more and more useless(empty) modules kept in output, which lead to bandwidth waste.
1 { 2 "plugins": [ 3 "transform-flow-strip-types", 4 ["transform-flow-interface-imports", { 5 "modules": [{ 6 "isRegExp": true, 7 "name": '/interfaces/', 8 }], 9 }] 10 ] 11 }
1import { 2 CreateManagerPayload, 3 EditManagerPayload, 4 DeleteManagerPayload, 5} from '../interfaces/manager'; 6 7* createManager( 8 { payload }: { payload: CreateManagerPayload }, 9 { call, put }, 10) { 11 yield call(add, { ...payload }); 12 13 yield put({ 14 type: 'queryList', 15 }); 16} 17 18 ↓ ↓ ↓ ↓ ↓ ↓ 19 20* createManager( 21 { payload }, // this removing is by babel-plugin-transform-flow-strip-types 22 { call, put }, 23) { 24 yield call(add, { ...payload }); 25 26 yield put({ 27 type: 'queryList', 28 }); 29}
1npm install babel-plugin-transform-flow-interface-imports --save-dev
Via .babelrc
or babel-loader.
1{ 2 "plugins": [["transform-flow-interface-imports", options]] 3}
options
is an object.
1{ 2 "modules": [{ 3 "isRegExp": true, 4 "name": '/interfaces/', 5 }] 6}
babel-plugin-transform-flow-strip-types
is included in babel-preset-react
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 0/6 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
48 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More