{"id":42308794,"url":"https://github.com/futuweb/eslint-config-futu","last_synced_at":"2026-01-27T11:13:23.079Z","repository":{"id":19279755,"uuid":"86676230","full_name":"futuweb/eslint-config-futu","owner":"futuweb","description":"富途eslint规则","archived":false,"fork":false,"pushed_at":"2023-11-09T07:52:57.000Z","size":363,"stargazers_count":10,"open_issues_count":5,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-30T02:58:50.367Z","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/futuweb.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-03-30T08:08:02.000Z","updated_at":"2024-03-05T02:56:30.000Z","dependencies_parsed_at":"2024-06-21T14:10:37.636Z","dependency_job_id":null,"html_url":"https://github.com/futuweb/eslint-config-futu","commit_stats":{"total_commits":40,"total_committers":7,"mean_commits":5.714285714285714,"dds":0.575,"last_synced_commit":"b137f8bbcc670669ed9e1c9a5d50b827b91a2d52"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/futuweb/eslint-config-futu","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/futuweb%2Feslint-config-futu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/futuweb%2Feslint-config-futu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/futuweb%2Feslint-config-futu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/futuweb%2Feslint-config-futu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/futuweb","download_url":"https://codeload.github.com/futuweb/eslint-config-futu/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/futuweb%2Feslint-config-futu/sbom","scorecard":{"id":414903,"data":{"date":"2025-08-11","repo":{"name":"github.com/futuweb/eslint-config-futu","commit":"b137f8bbcc670669ed9e1c9a5d50b827b91a2d52"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.3,"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":"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":"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":"Code-Review","score":0,"reason":"Found 1/22 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":"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":"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":"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":"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":"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"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 9 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"13 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T23:34:54.089Z","repository_id":19279755,"created_at":"2025-08-18T23:34:54.089Z","updated_at":"2025-08-18T23:34:54.089Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28812372,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T07:41:26.337Z","status":"ssl_error","status_checked_at":"2026-01-27T07:41:08.776Z","response_time":168,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":"2026-01-27T11:13:22.464Z","updated_at":"2026-01-27T11:13:23.073Z","avatar_url":"https://github.com/futuweb.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 富途ESLint规则\n\n富途所有项目共享的ESLint规则，与[JavaScript编码规范](http://gitlab.futunn.com/web/webwiki/wikis/style-guidelines-javascript)对应。\n\n## 预设场景\n\n- 浏览器 ✅\n- Node.js ✅\n- CommonJS ✅\n- ES6(ES2015) ✅\n- ES2017 ✅\n- Jest ✅\n- Vue.js ✅\n- jQuery ❌\n- AMD ❌\n\n## 使用方式\n\n1 安装依赖：\n\n```sh\nnpm install eslint eslint-config-futu --save-dev\n```\n\n2 在项目web根目录上层新建.eslintrc.js文件\n\n```javascript\nmodule.exports = {\n    root: true,\n    extends: 'eslint-config-futu',\n    env: {\n    },\n    parserOptions: {\n    },\n    rules:{\n        // 如果项目有特殊需求，可在此覆盖\n    }\n};\n```\n\n## 在TypeScript项目中使用\n\n1. 安装依赖\n\n```bash\nnpm install eslint typescript eslint-config-futu --save-dev\n```\n\n2. 在项目web根目录上层新建.eslintrc.js文件\n\n```javascript\nmodule.exports = {\n    root: true,\n    extends: 'eslint-config-futu/typescript',  // 这里要使用'eslint-config-futu/typescript'配置\n    env: {\n        browser: true,\n        node: true,\n        amd: true\n    },\n    parserOptions: {\n        ecmaVersion: 7,\n        sourceType: 'module'，\n        // recommend to use another config file like tsconfig.eslint.json and extends tsconfig.json in it.\n    \t\t// because you may be need to lint test/**/*.test.ts but no need to emit to js.\n    \t\t// @see https://github.com/typescript-eslint/typescript-eslint/issues/890\n    \t\tproject: './tsconfig.json'\n    },\n    rules:{\n        // 如果项目有特殊需求，可在此覆盖\n    }\n}\n```\n\n## 注意事项\n\n- `arrow-parens`规则为`always`，如果项目有使用prettier，需要同样设置该选项为`always`（prettier 2.0默认为`always`）。\n\n\n## 附：编辑器使用方式\n\n不要全局安装ESLint工具，不要全局安装ESLint工具，不要全局安装ESLint工具。\n\n### WebStorm\n\n设置（Preference） - 语言框架（Languages \u0026 Frameworks） - JavaScript - 质量工具（Code Quality Tools） - ESLint\n\n勾上 启用（Enable），Node interpreter写 Node 的路径，一般会自动检测到，如果检测不到需要自己选一下。\n\nESLint package选择**项目中的**`node_modules/eslint`，注意是项目中的，不能是全局的。剩下配置保留现状即可。\n\n### sublime text\n\n如果没有安装Package Control的可以先安装一下，说明见这里。\u003chttps://packagecontrol.io/installation\u003e\n\n然后安装SublimeLinter和SublimeLinter-contrib-eslint即可。\n\n\u003e 如果使用Package Control拉不出插件列表，可以设置一下Channel：打开命令输入框，找到Package Control: Add Channel，输入 https://git.oschina.net/mugood/PackageControl/raw/master/channel_v3.json 即可。\n\n### VSCode\n\n安装ESLint插件，启用即可。\n\n## 注：为什么不能使用全局ESLint工具\n\n因为在项目中会通过npm在项目中安装`eslint-config-futu`，然后基于这个公共规则配置文件来使用ESLint。\n\n然而ESLint有一个“Bug”，全局ESLint无法找到项目中的`eslint-config-futu`，所以无法应用公共规则配置文件。\n\n所以只能使用项目中安装的`eslint`依赖。按上方编辑器的配置说明，编辑器均会使用项目中的`eslint`依赖。\n\n如果不在编辑器中使用，想在命令行使用，可以有两种方法：\n\n1. 使用`./node_modules/.bin/eslint`，或者将这个命令写入`npm scripts`。在`npm scripts`中可以直接写`eslint`，会默认从`./node_modules/.bin`下查找`eslint`命令。\n2. 全局安装`eslint-cli`这个第三方库，然后使用`eslint`命令。\n\n## 历史记录\n\n### 2.1.1 2023-11-09\n- 删除一个ts规则：`@typescript-eslint/no-inferrable-types`\n\n### 2.1.0-alpha.0 2022-03-25\n\n- 添加ts规则\n\n### 2.0.0 2022-01-14\n\n- 正式发布2.0.0\n\n### 2.0.0-alpha.2 2021-12-21\n\n- `arrow-parens`规则改为`always`（与`prettier`保持一致 \u0026 预留向 TS 兼容）\n\n### 2.0.0-alpha.1 2021-12-21\n\n- 禁用`no-magic-numbers`规则\n\n### 2.0.0-alpha.0 2021-12-17\n\n- 修订诸多规范\n\n### 1.1.0 2020-12-24\n\n- 增加 [prefer-const](https://eslint.org/docs/rules/prefer-const) 检查\n- 增加 [no-var](https://eslint.org/docs/rules/no-var) 检查\n- 支持typescript文件校验\n- 增加 [@typescript-eslint/no-var-requires](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-var-requires.md) 检查\n- 增加 [@typescript-eslint/no-explicit-any](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-explicit-any.md) 检查\n- 增加 [@typescript-eslint/ban-ts-comment](https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/ban-ts-comment.md) 检查\n\n### 1.0.3 2017-04-20\n\n- 修正 tag 1.0.2\n\n### 1.0.2 2017-04-18\n\n- 修正 `no-use-before-define` 规则，只做变量的检查，函数与类不做检查\n\n### 1.0.1 2017-04-14\n\n- 允许 console [no-console](http://eslint.org/docs/rules/no-console)\n- 增加[no-self-assign](http://eslint.org/docs/rules/no-self-assign)检查\n- 增加[no-tabs](http://eslint.org/docs/rules/no-tabs)检查\n- 增加[valid-jsdoc](http://eslint.org/docs/rules/valid-jsdoc)检查\n- 增加[no-unused-vars](http://eslint.org/docs/rules/no-unused-vars)检查\n- 增加[no-use-before-define](http://eslint.org/docs/rules/no-use-before-define)检查\n- 增加[no-multi-assign](http://eslint.org/docs/rules/no-multi-assign)检查\n- 增加[no-invalid-this](http://eslint.org/docs/rules/no-invalid-this)检查\n- 增加[new-cap](http://eslint.org/docs/rules/new-cap)检查\n- 增加[max-params](http://eslint.org/docs/rules/max-params)检查\n- 增加[no-useless-return](http://eslint.org/docs/rules/no-useless-return)检查\n- 增加[no-nested-ternary](http://eslint.org/docs/rules/no-nested-ternary)检查\n- 增加[no-multi-spaces](http://eslint.org/docs/rules/no-multi-spaces)检查\n- 增加[guard-for-in](http://eslint.org/docs/rules/guard-for-in)检查\n\n### 1.0.0 2017-03-30\n\n- 初始化规则\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffutuweb%2Feslint-config-futu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffutuweb%2Feslint-config-futu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffutuweb%2Feslint-config-futu/lists"}