From 351a77bf5194f83425d4b412064c2ff1997133f3 Mon Sep 17 00:00:00 2001 From: 2214962083 <2214962083@qq.com> Date: Sun, 23 Oct 2022 07:09:14 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E6=A0=BC=E5=BC=8F=E5=8C=96=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 8 ++++---- lint-staged.config.js | 2 +- package.json | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index d08e976..d50f9a5 100644 --- a/README.md +++ b/README.md @@ -41,9 +41,9 @@ npm i -D dom-to-code ```ts // vite.config.ts -import {defineConfig} from 'vite' +import { defineConfig } from 'vite' import vue3 from '@vitejs/plugin-vue' -import {domToCodePlugin} from 'dom-to-code/vite' +import { domToCodePlugin } from 'dom-to-code/vite' export default defineConfig({ plugins: [ @@ -64,7 +64,7 @@ Example: [`playgrounds/vite-vue3`](./playgrounds/vite-vue3/) ```ts // vue.config.js -const {domToCodePlugin, domToCodeDevServerV4, domToCodeDevServerV5} = require('dom-to-code/webpack') +const { domToCodePlugin, domToCodeDevServerV4, domToCodeDevServerV5 } = require('dom-to-code/webpack') module.exports = { devServer: { @@ -93,7 +93,7 @@ Example: [`playgrounds/webpack-vue2`](./playgrounds/webpack-vue2/) ```ts // webpack.config.js -const {domToCodePlugin} = require('dom-to-code/webpack').default +const { domToCodePlugin } = require('dom-to-code/webpack').default module.exports = { /* ... */ plugins: [ diff --git a/lint-staged.config.js b/lint-staged.config.js index fe7a499..234867b 100644 --- a/lint-staged.config.js +++ b/lint-staged.config.js @@ -2,5 +2,5 @@ module.exports = { '*.{js,jsx,ts,tsx}': ['eslint --fix'], '*.json': ['prettier --write'], '*.vue': ['eslint --fix'], - '*.md': ['prettier --write'], + '*.md': ['eslint --fix'], } diff --git a/package.json b/package.json index dcedf92..9e7ccef 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "commit": "git add . &&git-cz", "lint": "pnpm lint:es", "lint:change": "lint-staged", - "lint:es": "eslint --fix . --ext .jsx,.js,.vue,.ts,.tsx", + "lint:es": "eslint --fix . --ext .jsx,.js,.vue,.ts,.tsx,.md", "preinstall": "npx only-allow pnpm", "prepare": "husky install", "release": "esno ./scripts/release.ts",