{"id":29926635,"url":"https://github.com/ecomfe/fecs-loader","last_synced_at":"2025-08-02T12:42:56.954Z","repository":{"id":57234224,"uuid":"54175291","full_name":"ecomfe/fecs-loader","owner":"ecomfe","description":"fecs loader (for webpack)","archived":false,"fork":false,"pushed_at":"2019-10-10T10:09:30.000Z","size":22,"stargazers_count":7,"open_issues_count":2,"forks_count":3,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-06-30T15:05:20.456Z","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/ecomfe.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":"2016-03-18T05:08:51.000Z","updated_at":"2019-10-10T10:09:32.000Z","dependencies_parsed_at":"2022-09-05T21:11:12.227Z","dependency_job_id":null,"html_url":"https://github.com/ecomfe/fecs-loader","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/ecomfe/fecs-loader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecomfe%2Ffecs-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecomfe%2Ffecs-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecomfe%2Ffecs-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecomfe%2Ffecs-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ecomfe","download_url":"https://codeload.github.com/ecomfe/fecs-loader/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecomfe%2Ffecs-loader/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268392180,"owners_count":24243297,"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-08-02T02:00:12.353Z","response_time":74,"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-08-02T12:42:21.958Z","updated_at":"2025-08-02T12:42:56.943Z","avatar_url":"https://github.com/ecomfe.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fecs-loader [![Build Status](http://img.shields.io/travis/MoOx/eslint-loader.svg)](https://travis-ci.org/MoOx/eslint-loader)\nfecs loader (for webpack) —— webpack中的fecs检查工具\n## Usage\n安装fecs-loader\n\n```shell\n$ npm install fecs-loader\n```\n如果less/css/js文件都check，可直接在原有webpack.config.js配置中的module.rules的基础上加多一项\n\n```js\n{\n    test: /\\.(less|css|js)$/,\n    use: ['fecs-loader']\n}\n```\n或者只针对某一类文件check，可在原有的loader配置中添加fecs-loader，如：\n\n```js\n{\n    test: /\\.js$/,\n    use: ['fecs-loader']\n},\n{\n    test: /\\.css$/,\n    use: [\n        'style-loader',\n        'css-loader',\n        'fecs-loader'\n    ]\n},\n{\n    test: /\\.less$/,\n    use: [\n        'style-loader',\n        'css-loader',\n        'less-loader',\n        'fecs-loader'\n    ]\n}\n```\n因为webpack的loader调用的顺序是从后往前的，所以为了fecs-loader能check最原始的代码，请将fecs-loader放置在数组的最后\n\n## Options\n可以直接将参数加在loader后，形如```fecs-loader?key=value```，也可以将参数写在loader的options中形如：\n\n```js\n{\n    test: /\\.js$/,\n    use: [\n        {\n            loader: 'fecs-loader',\n            options: {\n                failOnError: true,\n                exclude: './index.js'\n            }\n        }\n    ]\n}\n```\n\n### ```failOnError```(default: false)\n是否在fecs检测到模块内容有error时使模块编译失败，若failOnError为true则模块内容遇到fecs error时模块内容将不出现在编译结果中\n### ```failOnWarning```(default: false)\n是否在fecs检测到模块内容有warning时使模块编译失败，若failOnWarning为true则模块内容遇到fecs warning时模块内容将不出现在编译结果中\n### ```exclude```（default: ''）\n指定要忽略的```glob```文件模式，如```./index.js,./src/config/*.js```，文件模式若有多条，模式之间使用逗号```,```分隔\n\n\n### Example\n\n```\nmodule.exports = {\n    module: {\n        rules: [\n            {\n                test: /\\.(less|css|js|vue)$/,\n                use: [\n                    loader: 'fecs-loader',\n                    options: {\n                        failOnError: true,\n                        failOnWarning: true,\n                        exclude: './index.js,./index2.js'\n                    }\n                ]\n            }\n        ]\n    }\n};\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fecomfe%2Ffecs-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fecomfe%2Ffecs-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fecomfe%2Ffecs-loader/lists"}