vue-h5-template/assets/guide_vue3_lint.md.BBbAslYq.js

9 lines
2.5 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{_ as s,c as i,o as t,aj as e}from"./chunks/framework.DNhrqZu5.js";const g=JSON.parse('{"title":"ESLint + Prettier + Stylelint 统一开发规范","description":"","frontmatter":{},"headers":[],"relativePath":"guide/vue3/lint.md","filePath":"guide/vue3/lint.md","lastUpdated":1777342606000}'),n={name:"guide/vue3/lint.md"},a=e(`<h1 id="eslint-prettier-stylelint-统一开发规范" tabindex="-1">ESLint + Prettier + Stylelint 统一开发规范 <a class="header-anchor" href="#eslint-prettier-stylelint-统一开发规范" aria-label="Permalink to &quot;ESLint + Prettier + Stylelint 统一开发规范&quot;"></a></h1><p>根目录下的 <code>eslint.config.mjs</code>、<code>stylelint.config.js</code>、<code>prettier.config.js</code> 内置了 lint 规则,帮助你规范地开发代码,有助于提高团队的代码质量和协作性,可以根据团队的规则进行修改。</p><p>项目使用 ESLint flat config<code>eslint.config.mjs</code>),配合 <code>husky</code> + <code>lint-staged</code> 在 git commit 时自动执行代码检查。</p><h2 id="常用命令" tabindex="-1">常用命令 <a class="header-anchor" href="#常用命令" aria-label="Permalink to &quot;常用命令&quot;"></a></h2><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># ESLint 检查并修复</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">pnpm</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> lint:eslint</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Prettier 格式化</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">pnpm</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> lint:prettier</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># Stylelint 检查并修复</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">pnpm</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> lint:stylelint</span></span></code></pre></div>`,5),l=[a];function p(c,r,o,d,h,k){return t(),i("div",null,l)}const u=s(n,[["render",p]]);export{g as __pageData,u as default};