{"id":19529914,"url":"https://github.com/loopmode/babel7-base","last_synced_at":"2025-08-18T10:04:45.495Z","repository":{"id":33660452,"uuid":"158808163","full_name":"loopmode/babel7-base","owner":"loopmode","description":"Common dependencies and configs for developing packages with babel 7","archived":false,"fork":false,"pushed_at":"2023-01-03T17:28:59.000Z","size":807,"stargazers_count":0,"open_issues_count":12,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-26T02:43:10.971Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/loopmode.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-11-23T09:12:30.000Z","updated_at":"2019-08-15T06:38:39.000Z","dependencies_parsed_at":"2023-01-15T01:54:40.004Z","dependency_job_id":null,"html_url":"https://github.com/loopmode/babel7-base","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/loopmode/babel7-base","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loopmode%2Fbabel7-base","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loopmode%2Fbabel7-base/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loopmode%2Fbabel7-base/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loopmode%2Fbabel7-base/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/loopmode","download_url":"https://codeload.github.com/loopmode/babel7-base/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loopmode%2Fbabel7-base/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269463266,"owners_count":24421417,"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-08T02:00:09.200Z","response_time":72,"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-11T01:28:06.030Z","updated_at":"2025-08-18T10:04:45.469Z","avatar_url":"https://github.com/loopmode.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# babel7-base\n\nCommon dependencies and configs for developing packages with babel 7.\nContains `babel`, `esdoc`, `eslint` and `prettier`, as well as some plugins/extensions.\n\nProvides CLI to copy default config files like `.eslintrc`, `prettier.config.js` etc\n\n_Check [https://www.npmjs.com/package/@loopmode/babel6-base](https://www.npmjs.com/package/@loopmode/babel6-base) for the babel 6 version_\n\n## Installation and usage\n\nRecommended: install globally\n\n```bash\nnpm install --global @loopmode/babel7-base\n```\n\nNow run the install script in any package:\n\n```bash\nb7 install\n```\n\n### Use-case\n\nUse the `b7` command to get started with a new package that you want to publish or use elsewhere. It will ask you a couple of questions, but you can just go ahead and hit enter to use the defaults.\n\n### Configuration\n\nThere are default config files that you can use as a base and extend/modify as needed.\n\n#### via config files\n\nTypically you'll create a bunch of config files and extend the provided defaults there.\n\n```json\n// .babelrc\n{\n  \"extends\": \"@loopmode/babel7-base/.babelrc\"\n}\n```\n\n```json\n// .eslintrc\n{\n  \"extends\": \"@loopmode/react\"\n}\n```\n\n```javascript\n// prettier.config.js\nmodule.exports = {\n  ...require('@loopmode/babel7-base/prettier.config')\n};\n```\n\n```javascript\n// .esdoc.js\nmodule.exports = {\n  ...require('@loopmode/babel7-base/esdoc.config')\n};\n```\n\n#### via package.json\n\nAlternatively, you can add keys to your `package.json`, but there are some caveats.\n\n```json\n// package.json\n{\n  \"babel\": {\n    \"extends\": \"@loopmode/babel7-base/.babelrc\"\n  },\n  \"eslintConfig\": {\n    \"extends\": \"@loopmode/react\"\n  },\n  \"prettier\": {\n    ...\n  },\n  \"esdoc\": {\n    ...\n  }\n```\n\n#### Caveats:\n\n- The eslint config [@loopmode/eslint-config-react](https://github.com/loopmode/eslint-config-react) is included as a dependency\n- When extending the eslint config, omit the `eslint-config-` part of the package name and use just `@loopmode/react` instead\n- When configuring eslint via package.json, the key must be `\"eslintConfig\"` (and not just `\"eslint\"`)\n- When configuring prettier or ESDoc via package.json, you can not extend from the default config - you have to provide a full configuration directly\n\n### config options\n\n- [eslint configuration](https://prettier.io/docs/en/configuration.html)\n- [esdoc configuration](https://github.com/esdoc/esdoc/blob/v0.5.2/site/manual/configuration/config.md#full-config)\n- [prettier configuration](https://prettier.io/docs/en/configuration.html)\n\n## Scripts\n\nJust add some scripts to your `package.json` as usual:\n\n```json\n{\n  \"scripts\": {\n    \"babel\": \"babel src --out-dir lib --copy-files\",\n    \"eslint\": \"eslint src\",\n    \"esdoc\": \"esdoc\"\n  }\n}\n```\n\nPass any arguments to the scripts as usual, e.g. `yarn babel --watch`.\n\nNote that ESLint and prettier enforce specific code style, and you might get a bunch of warnings for existing projects.\nUse `yarn eslint --fix` to normalize code style and whitespace.\n\nGenerate docs with `yarn esdoc`.\n\n## Sublime Text\n\nHere is an example Sublime Text project file. It will automatically format saved files in the project, and ESLint errors will be displayed when `SublimeLinter` and `SublimeLinter-eslint` are installed.\n\n```json\n{\n  \"folders\": [\n    {\n      \"path\": \".\",\n      \"file_exclude_patterns\": [],\n      \"folder_exclude_patterns\": [\"node_modules\"]\n    }\n  ],\n  \"settings\": {\n    \"SublimeLinter.linters.eslint.chdir\": \"${project}/\",\n    \"js_prettier\": {\n      \"auto_format_on_save\": true,\n      \"auto_format_on_save_excludes\": [\"*/node_modules/*\", \"*/.git/*\", \"*.json\", \"*.html\"]\n    }\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floopmode%2Fbabel7-base","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floopmode%2Fbabel7-base","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floopmode%2Fbabel7-base/lists"}