{"id":21989036,"url":"https://github.com/imweb/fis3-hook-babel-imweb","last_synced_at":"2026-05-02T22:37:44.333Z","repository":{"id":57237205,"uuid":"112575333","full_name":"imweb/fis3-hook-babel-imweb","owner":"imweb","description":"a fis3 hook plugin for babel check and using fis3-parser-babel-imweb to transform code","archived":false,"fork":false,"pushed_at":"2018-01-03T02:24:29.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":27,"default_branch":"master","last_synced_at":"2025-10-27T10:37:07.362Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/imweb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-30T06:45:44.000Z","updated_at":"2018-03-13T03:13:53.000Z","dependencies_parsed_at":"2022-08-26T14:04:13.735Z","dependency_job_id":null,"html_url":"https://github.com/imweb/fis3-hook-babel-imweb","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/imweb/fis3-hook-babel-imweb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imweb%2Ffis3-hook-babel-imweb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imweb%2Ffis3-hook-babel-imweb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imweb%2Ffis3-hook-babel-imweb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imweb%2Ffis3-hook-babel-imweb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imweb","download_url":"https://codeload.github.com/imweb/fis3-hook-babel-imweb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imweb%2Ffis3-hook-babel-imweb/sbom","scorecard":{"id":486553,"data":{"date":"2025-08-11","repo":{"name":"github.com/imweb/fis3-hook-babel-imweb","commit":"629553714e20753e65eadf5adbfa867b3e0e6978"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 0/4 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-19T17:58:21.172Z","repository_id":57237205,"created_at":"2025-08-19T17:58:21.172Z","updated_at":"2025-08-19T17:58:21.172Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32552377,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T22:28:24.418Z","status":"ssl_error","status_checked_at":"2026-05-02T22:28:14.225Z","response_time":132,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-29T19:27:26.828Z","updated_at":"2026-05-02T22:37:44.283Z","avatar_url":"https://github.com/imweb.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fis3-hook-babel-imweb\nfis3 插件\n在`parse`阶段之后，扫描文件内容，根据某些 es6 特性规则判断文件内容是否使用了 es6 语法\n如果判定是，则使用`fis3-parser-babel-imweb`插件对文件内容进行`babel`编译\n如果判定否，则不做任何事情\n\n## Install\n``` bash\nnpm install fis3-hook-babel-imweb\n```\n\n## Usage\nadd this code to `fis.conf`\n``` javascript\nfis.hook('babel-imweb', {\n  shutup: true,\n  babelOpts: {\n    sourceMapRelative: true\n  }\n});\n```\n检测顺序：\n1. `file.notHookBabel`为真时，直接返回\n2. 不是js类型文件（即`!file.isJsLike`），直接返回\n3. 文件后缀为`.es6.js`时，编译\n4. 文件头注释有`useES6: true`时，编译\n5. 根据参数检测文件内容，符合时，编译\n\n## options\n* `defaultCheckRegList` [Array]: 默认正则检测列表，默认值为\n``` javascript\n[/useES6:\\s*true/, /^\\s*(import|const|let|export)\\s|=\u003e\\s*\\{|[^\"']`[^`]*\\$\\{[^`}]+\\}[^`]*`|\\sclass\\s+\\w+\\s+(extends\\s+\\w+\\s+)?\\{/m]\n```\n默认检测 es6 语法：`const`, `let`, `import`, `export`, `class`, `=\u003e`, \u0026#0096;\u0026#0096;\u003cbr\u003e\n还检测了 `useES6: true`，可以在文件头注释里面添加这个强制编译\n\n* `checkRegList` [Array]: 正则检测列表，需要新增一些检测规则的可以添加这个参数，先检测`defaultCheckRegList`的正则，再检测这里的\n* `defaultCheckFnList` [Array]: 和`defaultCheckRegList`一样，只是这里放的是函数，函数签名： `Boolean function(String content)`，返回是否包含 ES6 语法，目前默认值为`[]`\n* `checkFnList` [Array]: `checkRegList`一样，只是这里放的是函数。\n* `shutup` [Boolean]: 是否关闭展示编译了哪些文件\n* `babelOpts` [Object]: `fis3-parser-babel-imweb`插件使用到的参数，目前只有`sourceMapRelative`这个参数可以用\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimweb%2Ffis3-hook-babel-imweb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimweb%2Ffis3-hook-babel-imweb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimweb%2Ffis3-hook-babel-imweb/lists"}