https://github.com/hotdogc1017/nextui-vue.git
由 @antfu/eslint-config 驱动,感恩 antfu
安装 VS Code ESLint 扩展
在你的.vscode/settings.json
中添加以下选项:
{
// 禁用默认的格式化, 而使用eslint
"prettier.enable": false,
"editor.formatOnSave": false,
// 保存时自动修复
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.organizeImports": "never"
},
// 在你的IDE中静默地遵循风格规则,但仍然自动修复它们
"eslint.rules.customizations": [
{ "rule": "style/*", "severity": "off", "fixable": true },
{ "rule": "format/*", "severity": "off", "fixable": true },
{ "rule": "*-indent", "severity": "off", "fixable": true },
{ "rule": "*-spacing", "severity": "off", "fixable": true },
{ "rule": "*-spaces", "severity": "off", "fixable": true },
{ "rule": "*-order", "severity": "off", "fixable": true },
{ "rule": "*-dangle", "severity": "off", "fixable": true },
{ "rule": "*-newline", "severity": "off", "fixable": true },
{ "rule": "*quotes", "severity": "off", "fixable": true },
{ "rule": "*semi", "severity": "off", "fixable": true }
],
// 为所有支持的语言启用 ESLint
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"vue",
"html",
"markdown",
"json",
"jsonc",
"yaml",
"toml",
"xml",
"gql",
"graphql",
"astro",
"css",
"less",
"scss",
"pcss",
"postcss"
]
}
进入项目所在的路径
cd 项目所在目录的路径/nextui-vue
将packages/nv-components
链接到根目录下的node_modules
pnpm link packages/nv-components
pnpm i && pnpm dev