提交 4b87a856 authored 作者: 王鹏飞's avatar 王鹏飞

add eslint

上级 00447c48
module.exports = {
env: {
node: true
},
extends: ['eslint:recommended', 'plugin:vue/essential'],
rules: {
'vue/comment-directive': 'off'
// "prettier/prettier": "error"
// override/add rules settings here, such as:
// 'vue/no-unused-vars': 'error'
}
}
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -7,7 +7,8 @@ ...@@ -7,7 +7,8 @@
"build:pre": "vite build", "build:pre": "vite build",
"build:test": "vite build --mode test", "build:test": "vite build --mode test",
"preview": "vite preview", "preview": "vite preview",
"deploy": "node ./deploy/oss.js" "deploy": "node ./deploy/oss.js",
"lint": "eslint --ext .js,.vue --ignore-path .gitignore --fix src"
}, },
"dependencies": { "dependencies": {
"axios": "^0.21.1", "axios": "^0.21.1",
...@@ -22,9 +23,12 @@ ...@@ -22,9 +23,12 @@
"xlsx": "^0.17.0" "xlsx": "^0.17.0"
}, },
"devDependencies": { "devDependencies": {
"@rollup/plugin-eslint": "^8.0.1",
"ali-oss": "^6.16.0", "ali-oss": "^6.16.0",
"chalk": "^4.1.2", "chalk": "^4.1.2",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"eslint": "^7.32.0",
"eslint-plugin-vue": "^7.16.0",
"sass": "^1.37.5", "sass": "^1.37.5",
"vite": "^2.4.4", "vite": "^2.4.4",
"vite-plugin-vue2": "^1.8.0", "vite-plugin-vue2": "^1.8.0",
......
...@@ -3,7 +3,7 @@ import store from '@/store' ...@@ -3,7 +3,7 @@ import store from '@/store'
const UA = navigator.userAgent const UA = navigator.userAgent
const isMobile = /iphone/i.test(UA) || (/android/i.test(UA) && /mobile/i.test(UA)) const isMobile = /iphone/i.test(UA) || (/android/i.test(UA) && /mobile/i.test(UA))
const isIe = window.ActiveXObject || 'ActiveXObject' in window const isIe = window.ActiveXObject || 'ActiveXObject' in window
const isChrome = !!window.chrome && (!!window.chrome.webstore || !!window.chrome.runtime) // const isChrome = !!window.chrome && (!!window.chrome.webstore || !!window.chrome.runtime)
// let chromeVersion = 0 // let chromeVersion = 0
// if (isChrome) { // if (isChrome) {
// const temp = UA.match(/Chrome\/([\d.]+)/) // const temp = UA.match(/Chrome\/([\d.]+)/)
......
...@@ -2,10 +2,11 @@ import fs from 'fs' ...@@ -2,10 +2,11 @@ import fs from 'fs'
import path from 'path' import path from 'path'
import { defineConfig } from 'vite' import { defineConfig } from 'vite'
import { createVuePlugin } from 'vite-plugin-vue2' import { createVuePlugin } from 'vite-plugin-vue2'
import eslint from '@rollup/plugin-eslint'
export default defineConfig({ export default defineConfig({
base: process.env.BUILD_ENV === 'prod' ? 'https://webapp-pub.ezijing.com/website/prod/marketing-admin/' : '/', base: process.env.BUILD_ENV === 'prod' ? 'https://webapp-pub.ezijing.com/website/prod/marketing-admin/' : '/',
plugins: [createVuePlugin()], plugins: [eslint({ include: '**/*.+(vue|js|jsx|ts|tsx)' }), createVuePlugin()],
server: { server: {
open: true, open: true,
host: 'dev.ezijing.com', host: 'dev.ezijing.com',
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论