mm_eslint 1.4.4 → 1.4.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -5,6 +5,8 @@
5
5
  [![npm version](https://img.shields.io/npm/v/mm_eslint.svg)](https://www.npmjs.com/package/mm_eslint)
6
6
  [![License: ISC](https://img.shields.io/badge/License-ISC-blue.svg)](https://opensource.org/licenses/ISC)
7
7
  [![Node.js Version](https://img.shields.io/badge/node-%3E%3D12.0.0-brightgreen.svg)](https://nodejs.org/)
8
+ [![Downloads](https://img.shields.io/npm/dm/mm_eslint.svg)](https://www.npmjs.com/package/mm_eslint)
9
+ [![GitHub stars](https://img.shields.io/github/stars/qiuwenwu91/mm_eslint.svg)](https://gitee.com/qiuwenwu91/mm_eslint/stargazers)
8
10
 
9
11
  ## 功能特性
10
12
 
@@ -22,12 +24,12 @@
22
24
  ## 实际支持的规则
23
25
 
24
26
  插件实际支持以下ESLint规则:
25
- - `naming-convention/class-name` - 类名检测
26
- - `naming-convention/class-instance-name` - 类实例名检测
27
- - `naming-convention/function-name` - 函数名检测
28
- - `naming-convention/param-name` - 参数名检测
29
- - `naming-convention/variable-name` - 变量名检测
30
- - `naming-convention/constant-name` - 常量名检测
27
+ - `mm_eslint/class-name` - 类名检测
28
+ - `mm_eslint/class-instance-name` - 类实例名检测
29
+ - `mm_eslint/function-name` - 函数名检测
30
+ - `mm_eslint/param-name` - 参数名检测
31
+ - `mm_eslint/variable-name` - 变量名检测
32
+ - `mm_eslint/constant-name` - 常量名检测
31
33
 
32
34
  ## 安装
33
35
 
@@ -54,28 +56,30 @@ cp mm_eslint/index.js your-project/eslint-plugins/
54
56
 
55
57
  ```javascript
56
58
  // eslint.config.js
57
- const namingConventionPlugin = require("mm_eslint");
59
+ const mmEslint = require('mm_eslint');
58
60
 
59
61
  module.exports = [
60
62
  {
61
- files: ["**/*.js"],
63
+ files: ['**/*.js'],
62
64
  plugins: {
63
- "naming-convention": namingConventionPlugin,
65
+ mm_eslint: {
66
+ rules: mmEslint
67
+ }
64
68
  },
65
69
  rules: {
66
70
  // 命名规范插件规则
67
- "naming-convention/class-name": "error",
68
- "naming-convention/class-instance-name": "error",
69
- "naming-convention/function-name": "error",
70
- "naming-convention/param-name": "warn",
71
- "naming-convention/variable-name": "warn",
72
- "naming-convention/constant-name": "error",
71
+ 'mm_eslint/class-name': 'error',
72
+ 'mm_eslint/class-instance-name': 'error',
73
+ 'mm_eslint/function-name': 'error',
74
+ 'mm_eslint/param-name': 'warn',
75
+ 'mm_eslint/variable-name': 'warn',
76
+ 'mm_eslint/constant-name': 'error',
73
77
 
74
78
  // 禁用与命名规范插件冲突的默认规则
75
- camelcase: "off",
76
- "id-match": "off",
77
- "new-cap": "off",
78
- "id-length": "off",
79
+ camelcase: 'off',
80
+ 'id-match': 'off',
81
+ 'new-cap': 'off',
82
+ 'id-length': 'off',
79
83
  },
80
84
  },
81
85
  ];
@@ -273,7 +277,10 @@ mm_eslint/
273
277
  ├── corrector.js # 命名修正器
274
278
  ├── tip.js # 提示信息
275
279
  ├── util.js # 工具函数
280
+ ├── handler.js # 规则处理器
281
+ ├── fix.js # 自动修复功能
276
282
  ├── package.json # npm配置
283
+ ├── eslint.config.js # ESLint配置示例
277
284
  ├── README.md # 中文说明文档
278
285
  ├── README_EN.md # 英文说明文档
279
286
  ├── LICENSE # 许可证
@@ -293,6 +300,30 @@ npm test
293
300
  npm run lint
294
301
  ```
295
302
 
303
+ ## 发布说明
304
+
305
+ ### npm发布
306
+
307
+ 插件已发布到npm,可以通过以下命令安装:
308
+
309
+ ```bash
310
+ npm install mm_eslint --save-dev
311
+ ```
312
+
313
+ ### 版本管理
314
+
315
+ 项目使用语义化版本控制(Semantic Versioning):
316
+ - **主版本号**:不兼容的API修改
317
+ - **次版本号**:向下兼容的功能性新增
318
+ - **修订号**:向下兼容的问题修正
319
+
320
+ ### 发布流程
321
+
322
+ 1. 更新版本号:`npm version patch|minor|major`
323
+ 2. 运行测试:`npm test`
324
+ 3. 代码检查:`npm run lint`
325
+ 4. 发布到npm:`npm publish`
326
+
296
327
  ## 许可证
297
328
 
298
329
  ISC License
@@ -303,6 +334,12 @@ ISC License
303
334
 
304
335
  ## 更新日志
305
336
 
337
+ ### v1.4.4
338
+ - 更新插件名称和规则前缀为 `mm_eslint`
339
+ - 优化模块结构和文件组织
340
+ - 增强测试覆盖率和错误处理
341
+ - 改进文档和示例
342
+
306
343
  ### v1.4.3
307
344
  - 优化模块结构和文件组织
308
345
  - 增强测试覆盖率和错误处理
package/README_EN.md CHANGED
@@ -1,10 +1,12 @@
1
1
  # MM ESLint Plugin
2
2
 
3
- ESLint plugin for personal naming conventions - supports PascalCase, camelCase, snake_case, and UPPER_SNAKE_CASE naming rules.
3
+ ESLint plugin for personal naming conventions - supports PascalCase, camelCase, snake_case, and UPPER_SNAKE_CASE naming rules with intelligent recommendations.
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/mm_eslint.svg)](https://www.npmjs.com/package/mm_eslint)
6
6
  [![License: ISC](https://img.shields.io/badge/License-ISC-blue.svg)](https://opensource.org/licenses/ISC)
7
7
  [![Node.js Version](https://img.shields.io/badge/node-%3E%3D12.0.0-brightgreen.svg)](https://nodejs.org/)
8
+ [![Downloads](https://img.shields.io/npm/dm/mm_eslint.svg)](https://www.npmjs.com/package/mm_eslint)
9
+ [![GitHub stars](https://img.shields.io/github/stars/qiuwenwu91/mm_eslint.svg)](https://gitee.com/qiuwenwu91/mm_eslint/stargazers)
8
10
 
9
11
  ## Features
10
12
 
@@ -22,12 +24,12 @@ ESLint plugin for personal naming conventions - supports PascalCase, camelCase,
22
24
  ## Actual Supported Rules
23
25
 
24
26
  The plugin actually supports the following ESLint rules:
25
- - `naming-convention/class-name` - Class name detection
26
- - `naming-convention/class-instance-name` - Class instance name detection
27
- - `naming-convention/function-name` - Function name detection
28
- - `naming-convention/param-name` - Parameter name detection
29
- - `naming-convention/variable-name` - Variable name detection
30
- - `naming-convention/constant-name` - Constant name detection
27
+ - `mm_eslint/class-name` - Class name detection
28
+ - `mm_eslint/class-instance-name` - Class instance name detection
29
+ - `mm_eslint/function-name` - Function name detection
30
+ - `mm_eslint/param-name` - Parameter name detection
31
+ - `mm_eslint/variable-name` - Variable name detection
32
+ - `mm_eslint/constant-name` - Constant name detection
31
33
 
32
34
  ## Installation
33
35
 
@@ -54,28 +56,30 @@ Import the plugin in your ESLint configuration file:
54
56
 
55
57
  ```javascript
56
58
  // eslint.config.js
57
- const namingConventionPlugin = require("mm_eslint");
59
+ const mmEslint = require('mm_eslint');
58
60
 
59
61
  module.exports = [
60
62
  {
61
- files: ["**/*.js"],
63
+ files: ['**/*.js'],
62
64
  plugins: {
63
- "naming-convention": namingConventionPlugin,
65
+ mm_eslint: {
66
+ rules: mmEslint
67
+ }
64
68
  },
65
69
  rules: {
66
70
  // Naming convention plugin rules
67
- "naming-convention/class-name": "error",
68
- "naming-convention/class-instance-name": "error",
69
- "naming-convention/function-name": "error",
70
- "naming-convention/param-name": "warn",
71
- "naming-convention/variable-name": "warn",
72
- "naming-convention/constant-name": "error",
71
+ 'mm_eslint/class-name': 'error',
72
+ 'mm_eslint/class-instance-name': 'error',
73
+ 'mm_eslint/function-name': 'error',
74
+ 'mm_eslint/param-name': 'warn',
75
+ 'mm_eslint/variable-name': 'warn',
76
+ 'mm_eslint/constant-name': 'error',
73
77
 
74
78
  // Disable default rules conflicting with naming convention plugin
75
- camelcase: "off",
76
- "id-match": "off",
77
- "new-cap": "off",
78
- "id-length": "off",
79
+ camelcase: 'off',
80
+ 'id-match': 'off',
81
+ 'new-cap': 'off',
82
+ 'id-length': 'off',
79
83
  },
80
84
  },
81
85
  ];
@@ -273,7 +277,10 @@ mm_eslint/
273
277
  ├── corrector.js # Name corrector
274
278
  ├── tip.js # Tip messages
275
279
  ├── util.js # Utility functions
280
+ ├── handler.js # Rule handler
281
+ ├── fix.js # Auto-fix functionality
276
282
  ├── package.json # npm configuration
283
+ ├── eslint.config.js # ESLint configuration example
277
284
  ├── README.md # Chinese documentation
278
285
  ├── README_EN.md # English documentation
279
286
  ├── LICENSE # License
@@ -293,6 +300,30 @@ npm test
293
300
  npm run lint
294
301
  ```
295
302
 
303
+ ## Publishing Information
304
+
305
+ ### npm Publishing
306
+
307
+ The plugin is published to npm and can be installed via:
308
+
309
+ ```bash
310
+ npm install mm_eslint --save-dev
311
+ ```
312
+
313
+ ### Version Management
314
+
315
+ Project uses Semantic Versioning:
316
+ - **Major version**: Incompatible API changes
317
+ - **Minor version**: Backward-compatible functionality additions
318
+ - **Patch version**: Backward-compatible bug fixes
319
+
320
+ ### Publishing Process
321
+
322
+ 1. Update version: `npm version patch|minor|major`
323
+ 2. Run tests: `npm test`
324
+ 3. Code linting: `npm run lint`
325
+ 4. Publish to npm: `npm publish`
326
+
296
327
  ## License
297
328
 
298
329
  ISC License
@@ -303,6 +334,12 @@ Issues and Pull Requests are welcome to improve this plugin.
303
334
 
304
335
  ## Changelog
305
336
 
337
+ ### v1.4.4
338
+ - Updated plugin name and rule prefix to `mm_eslint`
339
+ - Optimized module structure and file organization
340
+ - Enhanced test coverage and error handling
341
+ - Improved documentation and examples
342
+
306
343
  ### v1.4.3
307
344
  - Optimized module structure and file organization
308
345
  - Enhanced test coverage and error handling