{"id":15384756,"url":"https://github.com/wibus-wee-ac/wlint","last_synced_at":"2026-05-30T07:02:24.364Z","repository":{"id":65163748,"uuid":"583231311","full_name":"wibus-wee/wlint","owner":"wibus-wee","description":"🗜️ A Wonderful Linter Config Manager  | Just `wlint`, configure completed","archived":false,"fork":false,"pushed_at":"2025-04-04T19:02:28.000Z","size":558,"stargazers_count":12,"open_issues_count":12,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-07T09:41:25.189Z","etag":null,"topics":["cli","commitlint","eslint","lint","prettier","stylelint"],"latest_commit_sha":null,"homepage":"https://npm.im/wlint","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/wibus-wee.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2022-12-29T06:42:12.000Z","updated_at":"2024-04-20T09:09:44.000Z","dependencies_parsed_at":"2024-03-25T16:30:26.417Z","dependency_job_id":"a4b73ccd-09d7-4ad1-8bb9-c0bb8c81ddd8","html_url":"https://github.com/wibus-wee/wlint","commit_stats":{"total_commits":235,"total_committers":5,"mean_commits":47.0,"dds":0.4340425531914893,"last_synced_commit":"f15be20ca50d904bf7a501236c32f7190db5b769"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wibus-wee%2Fwlint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wibus-wee%2Fwlint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wibus-wee%2Fwlint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wibus-wee%2Fwlint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wibus-wee","download_url":"https://codeload.github.com/wibus-wee/wlint/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248914195,"owners_count":21182377,"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","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":["cli","commitlint","eslint","lint","prettier","stylelint"],"created_at":"2024-10-01T14:43:14.892Z","updated_at":"2026-05-30T07:02:24.334Z","avatar_url":"https://github.com/wibus-wee.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\u003ca href=\"https://github.com/wibus-wee/wlint#gh-light-mode-only\"\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/62133302/210071391-1a4d1e89-1a2e-4ef1-938c-4369397a7e89.png\" /\u003e\n\n\u003c/a\u003e\n\n\u003ca href=\"https://github.com/wibus-wee/wlint#gh-dark-mode-only\"\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/62133302/210071466-38197cce-8dbf-4a7a-b041-f5aa0e9c521d.png\" /\u003e\n\u003c/a\u003e\n\nEnglish | [简体中文](./README.zh-hans.md)\n\n\u003c/div\u003e\n\nwlint is a cli to config your project lint quickly. **Just enter `wlint`**, wlint will automatically grab the appropriate lint configuration file, and automatically install the dependencies.\n\nwlint can automatically analyze the dependencies in the project and automatically match the config category. (see [Automatic matching category](#automatic-matching-category)) For example, you can automatically match react configuration if you have react package.\n\n## Features\n\n- ⛏️ [Linter Configs Support](#linter-configs-support)\n- 😄 [Linter Packages Auto Install](#linter-packages-auto-install)\n- 🌮 [Packages Alias](#packages-alias)\n- 🤖️ [Quickly Lint](#quickly-lint)\n- 🔧 [Automatic Update Linters](#automatic-update-linters)\n- 🍰 [Linter Config Category](#config-category)\n- 🚀 [Automatic matching category](#automatic-matching-category)\n- 🎉 [Custom Linter Configs Origin](#custom-linter-configs-origin)\n- 🎁 [Custom Command Alias Support](#custom-command-alias-support)\n- 🎨 [User Config Support](#user-config-support)\n- 📦 [Repository Config Support](#repository-config-support)\n- 📝 [Origin Config Support](#origin-config-support)\n\n## Install\n\n```bash\nnpm i -g wlint\n```\n\n## Usage\n\n```bash\nwlint # Quickly config your project linters.\nwlint -c \u003ccategory\u003e # Use the config in the category\n```\n\n## Linter Configs Support\n\n- [x] ESLint (eslint.json)\n- [x] Stylelint (stylelint.json)\n- [x] Prettier (prettier.json)\n- [x] Commitlint (commitlint.json)\n\n### Special Linting Config\n\n#### Prettier\n\nNormally, if we want to use [Prettier Sharing configurations](https://prettier.io/docs/en/configuration.html#sharing-configurations), we can write like this:\n\n```js\nmodule.exports = {\n  ...require(\"@xxx/prettier-config-xxx\"),\n};\n```\n\nBut in wlint, we should use `json` format, and the `require` function is not supported in `json` format, so we need to use the following format:\n\n```json\n{\n  \"extends\": [\"@xxx/prettier-config-xxx\"]\n}\n```\n\nThen wlint will automatically install the `prettier-config-xxx` package and use it as the Prettier Config.\n\n#### Packages Alias\n\nSometimes the package name in `require` is not the same as the package name in npm, so we need to configure the alias in `config.json`:\n\n```json\n{\n  \"aliases\": {\n    \"prettier-config-akrc\": \"@akrc/prettier-config\"\n  }\n}\n```\n\nSave the above configuration in the `config.json` file in the **root directory** of the project, and then `wlint` will automatically scan the package list and install the right package according to the alias.\n\nAbove is the example of `eslint-config-xxx`, and the `eslint-config-xxx` package is actually `@xxx/eslint-config-xxx` in npm. And actually wlint will install `@xxx/eslint-config-xxx` package.\n\nIf you want to learn more about the `config.json` file, please see the [Origin Config Support](#origin-config-support) section.\n\n## Linter Packages Auto Install\n\nwlint will automatically install the linter config package according to the linter config file. And you don't need to install the linter config package by yourself, wlint will analyze which package you need to install, and then install it automatically.\n\nIf the package has alias, you should configure the alias in `config.json` file (see [Packages Alias](#packages-alias) section).\n\n## Quickly Lint\n\nYou can quickly lint your project by running the following command: **(Make sure you have installed the linter by `wlint`)**\n\n```bash\nwlint lint\n```\n\n`wlint` will automatically lint your project according to linter config. If you want to fix the linting errors, you can run the following command:\n\n```bash\nwlint lint fix\n```\n\n\u003e But make sure you have installed the linter by `wlint`, you have better don't install the linter by yourself. It maybe cause some problems.\n\n## Automatic Update Linters\n\nAfter init linters with `wlint`, you can use the following command to update the linters config:\n\n```bash\nwlint update\n```\n\nThen wlint will automatically update the linters config and install the latest linters config package.\n\nThis feature is provided by `.wlintrc` file, if you want to learn more about `.wlintrc` file, please see the [Repository Config Support](#repository-config-support) section.\n\n## Custom Linter Configs Origin\n\nYou can create your own config origin, and you can also use the config origin that others have created.\n\n### Create Your Own Config Origin\n\n1. Create a new repository on GitHub, and create a linter config file in the root directory of the repository, such as: `eslint.json`, `prettier.json`. Please follow the name rules in the [Linters Configs Support](#linter-configs-support) section.\n2. Go to your shell and run the following command:\n\n```bash\nwlint origin add \u003cyour config origin repository name\u003e\n# wlint origin add wibus-wee/wlint-config\n# or you can use npm package name (if you have published your config to npm)\n# wlint origin add @wibus-wee/wlint-config\n\n# If you want to remove the config origin, you can run the following command:\nwlint origin remove \u003cyour config origin repository name\u003e\n# wlint origin remove wibus-wee/wlint-config\n# wlint origin remove @wibus-wee/wlint-config\n```\n\n3. Then you can use your config origin in your project!\n\n### Config Category\n\nYou can create a category for your config origin, and you can also use the category that others have created.\n\n1. Create a new repository on GitHub, and create a category directory in the root directory of the repository, such as: `default`, `nextjs`, `react`.\n2. Follow the steps in the [Create Your Own Config Origin](#create-your-own-config-origin) section to create your own config origin.\n3. Then you can use your config origin in your project like this:\n\n```bash\nwlint -c \u003cyour category name\u003e\n# wlint -c nextjs\n# wlint --category nextjs\n```\n\n### Automatic matching category\n\nIf you don't specify the category, `wlint` will automatically match the category according to the project type. `wlint` will analyze the project package.json file, and then match the category according to the `dependencies` and `devDependencies` fields.\n\n```json\n{\n  \"dependencies\": {\n    \"react\": \"^17.0.2\",\n    \"react-dom\": \"^17.0.2\"\n  },\n  \"devDependencies\": {\n    \"next\": \"^11.0.1\"\n  }\n}\n```\n\nIn the above example, `wlint` will automatically match the `nextjs` category. If `nextjs` category does not exist, `wlint` will try to match the `react` category, and so on.\n\nYou should open the `autoMatch` option in wlint config to enable the automatic matching category.\n\n```bash\nwlint config set autoMatch true\n```\n\nIf you want to learn more about wlint config, you can see the [User Config Support](#user-config-support) section.\n\nNow `wlint` supports the following categories to be automatically matched:\n\n- [nextjs](https://nextjs.org/) - next\n- [react](https://reactjs.org/) - react\n- [vue](https://vuejs.org/) - vue\n- [jwcjs](https://jwc.js.org/) - jwcjs\n- [angular](https://angular.io/) - angular\n\nYou can configure the automatic matching category in the `config.json` file in the **root directory** of the project:\n\n```json5\n{\n  categories: {\n    react: [\"react\", \"react-dom\", \"next\"],\n  },\n}\n```\n\nIn default, wlint will match the `nextjs` category if the project has `next` package. But in the above example, wlint will match the `react` category if the project has `next` package.\n\nIf you want to learn more about the `config.json` file, please see the [Origin Config Support](#origin-config-support) section.\n\n## Custom Command Alias Support\n\nBy default, `wlint` only provides the `wlint` for bin, but you can also add your own command alias. **(Only for Linux and macOS)**\n\n```bash\nwlint alias add \u003cyour command alias\u003e\n# wlint alias add ww\n```\n\nThen you can use your command alias in your project! If you want to delete your command alias, you can run the following command:\n\n```bash\nwlint alias remove \u003cyour command alias\u003e\n# wlint alias remove ww\n```\n\n**But, please don't modify the alias of the `wlint` command, or you should also delete the alias config in the `~/.config/.wlintrc.json` file.**\n\n## User Config Support\n\n`wlint` have a user config file, you can use the following command to edit the user config file:\n\n```bash\nwlint config [set|get|remove] \u003ckey\u003e [value]\n```\n\nCommand alias, automatic matching category and some features are all configured in the user config file.\n\n```bash\n# if you want to use `config set` to setup alias\nwlint config set alias ww\n# same as `wlint alias add ww`\nwlint config remove alias ww\n# same as `wlint alias remove ww`\n\n# if you want to use `config set` to setup automatic matching category\nwlint config set autoMatch true\nwlint config remove autoMatch\n```\n\n## Repository Config Support\n\n`wlint` have a repository config file called `.wlintrc`, you can configure the wlint some behaviors in the `.wlintrc` file.\n\nBut in common, you have no need to **(have better not)** configure the .wlintrc file, because wlint will automatically configure the .wlintrc file according to the project. If you setup the `.wlintrc` file but add the wrong configuration, wlint will warn you when you use wlint.\n\nWhen you init linter with lint, wlint will automatically record the config origin and some other information in the `.wlintrc` file.\n\n```json5\n{\n  origin: \"wibus-wee/wlint-config\",\n  category: \"nextjs\",\n}\n```\n\nFor example, you can use `wlint update` command to update the linters. Learn more about the command, please see the [Automatic Update Linters](#automatic-update-linters) section.\n\n## Origin Config Support\n\n`wlint` have a origin config file to configure the linter config, it provides a more flexible configuration method. For example, you can configure [package alias](#packages-alias) and [automatic matching category](#automatic-matching-category) in the origin config file.\n\nYou should create a `config.json` file in the root directory of your project, and then you can configure the origin config in the `config.json` file. For example:\n\n```json5\n{\n  aliases: {\n    // package aliases\n    \"prettier-config-akrc\": \"@akrc/prettier-config\",\n  },\n  categories: {\n    // custom category matching names\n    react: [\"react\", \"react-dom\", \"next\"],\n  },\n}\n```\n\nNow wlint supports the following configuration items:\n\n- **aliases**: [package alias](#packages-alias)\n- **categories**: [custom category matching names](#automatic-matching-category)\n\n## Maintainers\n\n\u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\"\u003e\u003ca href=\"https://iucky.cn\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/62133302?v=4?s=100\" width=\"100px;\" alt=\"Wibus\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eWibus\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\"\u003e\u003ca href=\"https://akr.moe\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/85140972?v=4?s=100\" width=\"100px;\" alt=\"AkaraChen\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eAkaraChen\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n## License\n\nThis project open source under the [MIT License](https://opensource.org/licenses/MIT).\n\n## Author\n\nwlint © Wibus \u0026 AkaraChen, Released under the MIT License.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwibus-wee-ac%2Fwlint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwibus-wee-ac%2Fwlint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwibus-wee-ac%2Fwlint/lists"}