{"id":31970670,"url":"https://github.com/winjs-dev/winjs-plugin-check-syntax","last_synced_at":"2025-10-14T19:18:08.907Z","repository":{"id":304945670,"uuid":"1020486869","full_name":"winjs-dev/winjs-plugin-check-syntax","owner":"winjs-dev","description":"A winjs plugin for checking ECMAScript syntax compatibility across different bundlers.","archived":false,"fork":false,"pushed_at":"2025-09-16T01:12:16.000Z","size":660,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-16T02:42:35.717Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/winjs-dev.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-16T00:34:03.000Z","updated_at":"2025-09-16T01:12:15.000Z","dependencies_parsed_at":"2025-07-17T14:54:39.701Z","dependency_job_id":"1ce9a8b4-4bd5-4df4-ad17-cea54414521d","html_url":"https://github.com/winjs-dev/winjs-plugin-check-syntax","commit_stats":null,"previous_names":["winjs-dev/winjs-plugin-check-syntax"],"tags_count":3,"template":false,"template_full_name":"winjs-dev/winjs-plugin-template","purl":"pkg:github/winjs-dev/winjs-plugin-check-syntax","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winjs-dev%2Fwinjs-plugin-check-syntax","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winjs-dev%2Fwinjs-plugin-check-syntax/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winjs-dev%2Fwinjs-plugin-check-syntax/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winjs-dev%2Fwinjs-plugin-check-syntax/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/winjs-dev","download_url":"https://codeload.github.com/winjs-dev/winjs-plugin-check-syntax/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winjs-dev%2Fwinjs-plugin-check-syntax/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279020655,"owners_count":26086895,"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-10-14T02:00:06.444Z","response_time":60,"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":"2025-10-14T19:18:07.567Z","updated_at":"2025-10-14T19:18:08.899Z","avatar_url":"https://github.com/winjs-dev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @winner-fed/plugin-check-syntax\n\nWinJS plugin for checking ECMAScript syntax compatibility using `@winner-fed/unplugin-check-syntax`.\n\n\u003cp\u003e\n  \u003ca href=\"https://npmjs.com/package/@winner-fed/plugin-check-syntax\"\u003e\n   \u003cimg src=\"https://img.shields.io/npm/v/@winner-fed/plugin-check-syntax?style=flat-square\u0026colorA=564341\u0026colorB=EDED91\" alt=\"npm version\" /\u003e\n  \u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square\u0026colorA=564341\u0026colorB=EDED91\" alt=\"license\" /\u003e\n  \u003ca href=\"https://npmcharts.com/compare/@winner-fed/plugin-check-syntax?minimal=true\"\u003e\u003cimg src=\"https://img.shields.io/npm/dm/@winner-fed/plugin-check-syntax.svg?style=flat-square\u0026colorA=564341\u0026colorB=EDED91\" alt=\"downloads\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## 功能特性\n\n- 🔍 检查 ECMAScript 语法兼容性\n- 🎯 支持自定义目标浏览器范围\n- 📦 支持 Vite、Webpack、Rspack 构建工具\n- ⚙️ 灵活的配置选项\n- 🚫 支持排除特定文件\n\n## 安装\n\n```bash\nnpm add @winner-fed/plugin-check-syntax -D\n```\n\n## 使用方法\n\n在 `.winrc.ts` 配置文件中添加插件：\n\n```ts\n// .winrc.ts\nexport default {\n  plugins: ['@winner-fed/plugin-check-syntax'],\n  // 启用语法检查\n  checkSyntax: {\n    // 目标浏览器范围\n    targets: ['\u003e 1%', 'last 2 versions'],\n    \n    // 排除文件\n    exclude: ['node_modules', '\\\\.min\\\\.js$'],\n    \n    // ECMAScript 版本\n    ecmaVersion: 2018\n  }\n};\n```\n\n## 配置选项\n\n### targets\n\n指定项目的目标浏览器范围，值为标准的 browserslist 数组。\n\n- 类型: `string[]`\n- 默认值: `undefined`\n- 示例:\n\n```js\nexport default {\n  plugins: ['@winner-fed/plugin-check-syntax'],\n  checkSyntax: {\n    targets: ['\u003e 1%', 'last 2 versions', 'not ie \u003c= 8']\n  }\n};\n```\n\n### exclude\n\n用于在检测期间排除部分源文件。可以传入一个或多个正则表达式来匹配源文件的路径。\n\n- 类型: `string | string[]`\n- 默认值: `undefined`\n- 示例:\n\n```js\nexport default {\n  plugins: ['@winner-fed/plugin-check-syntax'],\n  checkSyntax: {\n    exclude: [\n      'node_modules',\n      '\\\\.min\\\\.js$',\n      'vendor/'\n    ]\n  }\n};\n```\n\n### ecmaVersion\n\n指定构建产物中可以使用的最低 ECMAScript 语法版本。`ecmaVersion` 的优先级高于 `targets`。\n\n- 类型: `3 | 5 | 6 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 'latest'`\n- 默认值: `undefined`\n- 示例:\n\n```js\nexport default {\n  plugins: ['@winner-fed/plugin-check-syntax'],\n  checkSyntax: {\n    ecmaVersion: 2018\n  }\n};\n```\n\n## 简单配置\n\n如果你只想启用默认的语法检查，可以直接设置为 `true`：\n\n```ts\nexport default {\n  plugins: ['@winner-fed/plugin-check-syntax'],\n  checkSyntax: true\n};\n```\n\n## 支持的构建工具\n\n- ✅ Vite\n- ✅ Webpack\n- ✅ Rspack\n\n## License\n\n[MIT](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwinjs-dev%2Fwinjs-plugin-check-syntax","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwinjs-dev%2Fwinjs-plugin-check-syntax","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwinjs-dev%2Fwinjs-plugin-check-syntax/lists"}