{"id":18262846,"url":"https://github.com/midwayjs/mwts","last_synced_at":"2025-09-19T17:57:58.758Z","repository":{"id":45242099,"uuid":"262233040","full_name":"midwayjs/mwts","owner":"midwayjs","description":"☂️ TypeScript style guide, formatter, and linter.","archived":false,"fork":false,"pushed_at":"2024-06-04T13:58:05.000Z","size":40,"stargazers_count":11,"open_issues_count":7,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-09-17T10:46:16.634Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/midwayjs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2020-05-08T05:14:29.000Z","updated_at":"2025-07-19T08:45:01.000Z","dependencies_parsed_at":"2024-01-23T21:20:32.573Z","dependency_job_id":"6372658f-f2dd-44cb-a158-101b58b0090d","html_url":"https://github.com/midwayjs/mwts","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/midwayjs/mwts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/midwayjs%2Fmwts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/midwayjs%2Fmwts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/midwayjs%2Fmwts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/midwayjs%2Fmwts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/midwayjs","download_url":"https://codeload.github.com/midwayjs/mwts/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/midwayjs%2Fmwts/sbom","scorecard":{"id":643892,"data":{"date":"2025-08-11","repo":{"name":"github.com/midwayjs/mwts","commit":"97a801226cfb02b0ed908f5c9ded47ac741cb1c2"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.5,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"Code-Review","score":1,"reason":"Found 3/28 approved changesets -- score normalized to 1","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":"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":"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yaml:1","Info: no jobLevel write permissions found"],"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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/midwayjs/mwts/ci.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/midwayjs/mwts/ci.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:47: update your workflow using https://app.stepsecurity.io/secureworkflow/midwayjs/mwts/ci.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:48: update your workflow using https://app.stepsecurity.io/secureworkflow/midwayjs/mwts/ci.yaml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yaml:54: update your workflow using https://app.stepsecurity.io/secureworkflow/midwayjs/mwts/ci.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/midwayjs/mwts/ci.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/midwayjs/mwts/ci.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/midwayjs/mwts/ci.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/midwayjs/mwts/ci.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/midwayjs/mwts/ci.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/midwayjs/mwts/ci.yaml/master?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/ci.yaml:43","Warn: npmCommand not pinned by hash: .github/workflows/ci.yaml:52","Warn: npmCommand not pinned by hash: .github/workflows/ci.yaml:52","Warn: npmCommand not pinned by hash: .github/workflows/ci.yaml:16","Warn: npmCommand not pinned by hash: .github/workflows/ci.yaml:34","Info:   0 out of  10 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   5 npmCommand dependencies pinned"],"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":"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":"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":"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":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"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 5 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"}}]},"last_synced_at":"2025-08-21T11:33:09.972Z","repository_id":45242099,"created_at":"2025-08-21T11:33:09.972Z","updated_at":"2025-08-21T11:33:09.972Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275632744,"owners_count":25500076,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-17T02:00:09.119Z","response_time":84,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-05T11:09:00.864Z","updated_at":"2025-09-19T17:57:58.730Z","avatar_url":"https://github.com/midwayjs.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mwts\n\u003e MidwayJS TypeScript Style\n\n[![NPM Version][npm-image]][npm-url]\n[![GitHub Actions][github-image]][github-url]\n[![codecov][codecov-image]][codecov-url]\n[![TypeScript Style Guide][mwts-image]][mwts-url]\n\n[mwts][npm-url] is Alibaba MidwayJS TypeScript style guide, and the configuration for our formatter, linter, and automatic code fixer. No lint rules to edit, no configuration to update, no more bike shedding over syntax.\n\nTo borrow from [standardjs][standardjs-url]:\n- **No configuration**. The easiest way to enforce consistent style in your project. Just drop it in.\n- **Automatically format code**. Just run `mwts fix` and say goodbye to messy or inconsistent code.\n- **Catch style issues \u0026 programmer errors early**. Save precious code review time by eliminating back-and-forth between reviewer \u0026 contributor.\n- **Opinionated, but not to a fault**. We recommend you use the default configuration, but if you *need* to customize compiler or linter config, you can.\n\nUnder the covers, we use [eslint][eslint-url] to enforce the style guide and provide automated fixes, and [prettier][prettier-url] to re-format code.\n\n## Getting Started\n\nThe easiest way to get started is to run:\n```sh\nnpx mwts init\n```\n\n## How it works\nWhen you run the `npx mwts init` command, it's going to do a few things for you:\n- Adds an opinionated `tsconfig.json` file to your project that uses the MidwayJS TypeScript Style.\n- Adds the necessary devDependencies to your `package.json`.\n- Adds scripts to your `package.json`:\n  - `check`: Lints and checks for formatting problems.\n  - `fix`: Automatically fixes formatting and linting problems (if possible).\n  - `clean`: Removes output files.\n  - `build`: Compiles the source code using TypeScript compiler.\n  - `pretest`, `posttest` and `prepare`: convenience integrations.\n- If a source folder is not already present it will add a default template project.\n\n### Individual files\nThe commands above will all run in the scope of the current folder.  Some commands can be run on individual files:\n\n```sh\nmwts check index.ts\nmwts check one.ts two.ts three.ts\nmwts check *.ts\n```\n\n### Working with eslint\nUnder the covers, we use [eslint][eslint-url] to enforce the style guide and provide automated fixes, and [prettier][prettier-url] to re-format code. To use the shared `eslint` configuration, create an `.eslintrc` in your project directory, and extend the shared config:\n\n```yml\n---\nextends:\n  - './node_modules/mwts'\n```\n\nIf you don't want to use the `mwts` CLI, you can drop down to using the module as a basic `eslint` config, and just use the `eslint` cli:\n\n```\n$ eslint --fix\n```\n\nThis opens the ability to use the vast `eslint` ecosystem including custom rules, and tools like the VSCode plugin for eslint:\n- https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint\n\n\n## Badge\nShow your love for `mwts` and include a badge!\n\n[![Code Style: MidwayJS](https://img.shields.io/badge/code%20style-midwayjs-brightgreen.svg)](https://github.com/midwayjs/mwts)\n\n```md\n[![Code Style: MidwayJS](https://img.shields.io/badge/code%20style-midwayjs-brightgreen.svg)](https://github.com/midwayjs/mwts)\n```\n\n## Supported Node.js Versions\nOur client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/). Libraries are compatible with all current _active_ and _maintenance_ versions of Node.js.\n\n## License\n[Apache-2.0](LICENSE)\n\n---\nMade with ❤️ by the Alibaba Node.js team.\n\n\u003e A derived project from the awesome [gts](https://github.com/google/gts).\n\n[github-image]: https://github.com/midwayjs/mwts/workflows/ci/badge.svg\n[github-url]: https://github.com/midwayjs/mwts/actions\n[prettier-url]: https://prettier.io/\n[codecov-image]: https://codecov.io/gh/midwayjs/mwts/branch/master/graph/badge.svg\n[codecov-url]: https://codecov.io/gh/midwayjs/mwts\n[mwts-image]: https://img.shields.io/badge/code%20style-midwayjs-brightgreen.svg\n[mwts-url]: https://github.com/midwayjs/mwts\n[npm-image]: https://img.shields.io/npm/v/mwts.svg\n[npm-url]: https://npmjs.org/package/mwts\n[standardjs-url]: https://www.npmjs.com/package/standard\n[eslint-url]: https://eslint.org/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmidwayjs%2Fmwts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmidwayjs%2Fmwts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmidwayjs%2Fmwts/lists"}