{"id":20302386,"url":"https://github.com/mrminfive/eslint-config-mlint","last_synced_at":"2025-08-08T19:18:31.926Z","repository":{"id":31340479,"uuid":"127596044","full_name":"Mrminfive/eslint-config-mlint","owner":"Mrminfive","description":"ESLint Config for JavaScript","archived":false,"fork":false,"pushed_at":"2023-01-04T06:54:57.000Z","size":275,"stargazers_count":0,"open_issues_count":29,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-13T19:02:28.766Z","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/Mrminfive.png","metadata":{"files":{"readme":"README-CN.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}},"created_at":"2018-04-01T04:13:10.000Z","updated_at":"2020-07-18T03:50:01.000Z","dependencies_parsed_at":"2023-01-14T19:00:34.801Z","dependency_job_id":null,"html_url":"https://github.com/Mrminfive/eslint-config-mlint","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/Mrminfive/eslint-config-mlint","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mrminfive%2Feslint-config-mlint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mrminfive%2Feslint-config-mlint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mrminfive%2Feslint-config-mlint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mrminfive%2Feslint-config-mlint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mrminfive","download_url":"https://codeload.github.com/Mrminfive/eslint-config-mlint/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mrminfive%2Feslint-config-mlint/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259704414,"owners_count":22898858,"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":[],"created_at":"2024-11-14T16:31:08.942Z","updated_at":"2025-06-13T19:04:44.730Z","avatar_url":"https://github.com/Mrminfive.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# eslint-config-mlint\n\n[![Build Status](https://travis-ci.org/Mrminfive/eslint-config-mlint.svg?branch=master)](https://travis-ci.org/Mrminfive/eslint-config-mlint)\n\n[![NPM](https://nodei.co/npm/eslint-config-mlint.png)](https://nodei.co/npm/eslint-config-mlint/)\n\n[English](./README.md) | 简体中文\n\n\u003e JavaScript、Typescript、Vue、React、Prettier 的 ESLint Config\n\n## 安装\n\n基本依赖：\n\n``` bash\n$ npm install --save-dev eslint eslint-config-mlint eslint-plugin-import@^2.18.0\n```\n\n对于以下类型的项目，还需要安装这些依赖项：\n\n### Typescript\n\n``` bash\n$ npm install --save-dev @typescript-eslint/parser@^1.12.0 @typescript-eslint/eslint-plugin@^1.12.0 typescript@^3.5.3\n```\n\n### Vue\n\n``` bash\n$ npm install --save-dev eslint-plugin-vue@^5.2.3 vue-eslint-parser@^6.0.4\n```\n\n### React\n\n``` bash\n$ npm install --save-dev eslint-plugin-react@^7.4.0 eslint-plugin-react-hooks@^1.6.0\n```\n\n### Prettier\n\n``` bash\n$ npm install --save-dev prettier@^1.18.2 eslint-config-prettier@^6.0.0 eslint-plugin-prettier^3.1.0\n```\n\n## Usage\n\n一旦安装了 `eslint-config-mlint` 包，就可以通过在 [ESLint 配置](http://eslint.org/docs/user-guide/configuring) 的 [`extends`](http://eslint.org/docs/user-guide/configuring#extending-configuration-files) 部分指定`mlint` 来使用它。\n\n```js\n{\n  'extends': 'mlint',\n  'rules': {\n    // Additional, per-project rules...\n  }\n}\n```\n\n该包提供 9 种不同项目类型的配置。\n\n### 对于 Es5 项目\n\n``` js\n{\n  'extends': 'eslint-config-mlint/es5'\n}\n```\n\n这份配置针对使用 ES5 及之前版本 JS 的老项目，全部使用 ESLint 原生规则。\n\n### 对于 Es6 项目\n\n``` js\n{\n  'extends': 'eslint-config-mlint'\n}\n```\n\n这份配置针对 ES6 项目，使用 ESLint 原生规则和部分 [eslint-plugin-import][EslintPluginImport] 插件的规则。\n\n### 对于 Typescript 项目\n\n``` js\n{\n  'extends': 'eslint-config-mlint/ts'\n}\n```\n\n这份配置针对 Typescript 的项目，继承了上面对 ES6 项目的配置，并启用了部分 [@typescript-eslint/eslint-plugin][EslintPluginTypescript] 插件的规则，使用 [@typescript-eslint/parser][EslintParserTypescript] 作为 parser。\n\n### 对于 Vue 项目\n\n``` js\n{\n  'extends': 'eslint-config-mlint/vue'\n}\n```\n\n这份配置针对 Vue 的项目，继承了上面对 ES6 项目的配置，并启用了部分 [eslint-plugin-vue][EslintPluginVue] 插件的规则，使用 [vue-eslint-parser][VueEslintParser] 作为 parser。\n\n### 对于 React 项目\n\n``` js\n{\n  'extends': 'eslint-config-mlint/react'\n}\n```\n\n这份配置针对 React 的项目，继承了上面对 ES6 项目的配置，并启用了部分 [eslint-plugin-react][EslintPluginReact] 和 [eslint-plugin-react-hooks][EslintPluginReactHooks] 插件的规则。\n\n### 对于 Typescript + Vue 项目\n\n``` js\n{\n  'extends': 'eslint-config-mlint/ts-vue'\n}\n```\n\n这份配置针对 Vue + Typescript 的项目，继承了上面对 Vue 项目和 Typescript 项目的配置。\n\n### 对于 Typescript + React 项目\n\n``` js\n{\n  'extends': 'eslint-config-mlint/ts-react'\n}\n```\n\n这份配置针对 React + Typescript 的项目，继承了上面对 React 项目和 Typescript 项目的配置。\n\n### 对于 Prettier + Typescript 项目\n\n``` js\n{\n  'extends': 'eslint-config-mlint/prettier-ts'\n}\n```\n\n这份配置正对 Prettier + Typescript 项目，继承了上面对于 Typescript 项目的配置，并继承了 [eslint-config-prettier][EslintConfigPrettier] 以禁用部分冲突的规则。\n\n### 对于 Prettier + Typescript + Vue 项目\n\n``` js\n{\n  'extends': 'eslint-config-mlint/prettier-ts-vue'\n}\n```\n\n这份配置正对 Prettier + Typescript + Vue 项目，继承了上面对于 Typescript + Vue 项目的配置，并继承了 [eslint-config-prettier][EslintConfigPrettier] 以禁用部分冲突的规则。\n\n## 编辑器集成\n\n参见例子:\n\n* [Es5](./__example__/es5/REAMDE.md)\n* [Es6](./__example__/es6/REAMDE.md)\n* [Typescript](./__example__/typescript/REAMDE.md)\n* [Vue](./__example__/vue/REAMDE.md)\n* [React](./__example__/react/REAMDE.md)\n* [Typescript + Vue](./__example__/typescript-vue/REAMDE.md)\n* [Typescript + React](./__example__/typescript-react/REAMDE.md)\n* [Prettier + Typescript](./__example__/prettier-typescript/REAMDE.md)\n* [Prettier + Typescript + Vue](./__example__/prettier-typescript-vue/REAMDE.md)\n* [Prettier + Typescript + React](./__example__/prettier-typescript-react/REAMDE.md)\n\n## 执照\n\nMIT License\n\nCopyright (c) 2019 minfive\n\n[EslintPluginImport]: https://www.npmjs.com/package/eslint-plugin-import\n[EslintPluginVue]: https://www.npmjs.com/package/eslint-plugin-vue\n[VueEslintParser]: https://www.npmjs.com/package/vue-eslint-parser\n[EslintPluginReact]: https://www.npmjs.com/package/eslint-plugin-react\n[EslintPluginReactHooks]: https://www.npmjs.com/package/eslint-plugin-react-hooks\n[EslintPluginTypescript]: https://www.npmjs.com/package/@typescript-eslint/eslint-plugin\n[EslintParserTypescript]: https://www.npmjs.com/package/@typescript-eslint/parser\n[EslintConfigPrettier]: https://www.npmjs.com/package/eslint-config-prettier\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrminfive%2Feslint-config-mlint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrminfive%2Feslint-config-mlint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrminfive%2Feslint-config-mlint/lists"}