eslint-plugin-custom-xiethan-js
v0.0.0
Published
自动导入部分组件
Downloads
3
Maintainers
Readme
eslint-plugin-custom-xiethan-js
xiethan 自定义 ESLint 插件
这是一个为 JavaScript 和 Vue 项目定制的 ESLint 插件,包含以下规则:
custom-xiethan-js/lodash-auto-import:强制按需引入 lodash 库,避免全量引入。
custom-xiethan-js/no-chinese-vue:禁止在 Vue 模板中使用中文字符。
安装
首先,确保已安装 ESLint:
npm install eslint --save-dev
接着,安装 eslint-plugin-custom-xiethan-js:
npm install eslint-plugin-custom-xiethan-js --save-dev
使用
在您的 ESLint 配置文件 中,引入插件并配置规则。 示例配置
import customXiethenJs from "eslint-plugin-custom-xiethan-js";
export default [
{
plugins: {
"custom-xiethan-js": customXiethenJs
},
rules: {
// 启用 lodash 按需引入规则
"custom-xiethan-js/lodash-auto-import": "error",
// 启用禁止在 Vue 模板中使用中文字符的规则
"custom-xiethan-js/no-chinese-vue": "error"
}
}
];贡献
欢迎提交 Issue 或 Pull Request 来改进此插件! 如果您有任何问题或建议,请通过 GitHub Issues 联系我们。
许可证 本项目基于 MIT 许可证 开源。
