From 74da4068089ade1bb037beb1a6463280439673c5 Mon Sep 17 00:00:00 2001 From: XiaoDaiGua-Ray <443547225@qq.com> Date: Wed, 2 Aug 2023 15:30:31 +0800 Subject: [PATCH] update eslint rules --- .eslintignore | 1 + .eslintrc.cjs | 1 + package.json | 8 ++++---- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.eslintignore b/.eslintignore index de9f58da..108c8d65 100644 --- a/.eslintignore +++ b/.eslintignore @@ -14,3 +14,4 @@ visualizer.html src/locales/lang .depcheckrc src/components/RayChart/theme +*.md diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 52aeec19..c21a8d82 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -34,6 +34,7 @@ module.exports = { defineOptions: 'readonly', }, rules: { + 'linebreak-style': ['error', 'unix'], '@typescript-eslint/no-explicit-any': [ 'error', { diff --git a/package.json b/package.json index 191080fa..250bcd34 100644 --- a/package.json +++ b/package.json @@ -5,11 +5,11 @@ "type": "module", "scripts": { "dev": "vite", - "build": "vue-tsc --noEmit && vite build --mode production", + "build": "eslint src && vue-tsc --noEmit && vite build --mode production", "preview": "vite preview", - "test": "vue-tsc --noEmit && vite build --mode test", - "dev-build": "vue-tsc --noEmit && vite build --mode development", - "report": "vue-tsc --noEmit && vite build --mode report", + "test": "eslint src && vue-tsc --noEmit && vite build --mode test", + "dev-build": "eslint src && vue-tsc --noEmit && vite build --mode development", + "report": "eslint src && vue-tsc --noEmit && vite build --mode report", "prepare": "husky install" }, "lint-staged": {