Commit 144f7d03 authored by lipengcheng 's avatar lipengcheng

lint

parent 514d78e6
This diff is collapsed.
module.exports = {
// 不使用prettier格式化的文件填写在项目的.prettierignore文件中
ignorePath: ".prettierignore",
// 与eslint集成(让prettier使用eslint的代码格式进行校验)
eslintIntegration: true,
// 换行长度
......@@ -7,10 +9,10 @@ module.exports = {
tabWidth: 4,
// 使用tab缩进,默认false
useTabs: false,
// 使用分号, 默认true
// 是否使用分号, 默认true
semi: false,
// 使用单引号, 默认false(在jsx中配置无效, 默认都是双引号)
singleQuote: true,
// 是否使用单引号, 默认false(在jsx中配置无效, 默认都是双引号)
singleQuote: false,
// 行尾逗号,默认none,可选 none|es5|all
// es5 包括es5中的数组、对象
// all 包括函数对象等所有可选
......@@ -32,5 +34,10 @@ module.exports = {
// avoid 能省略括号的时候就省略 例如x => x
// always 总是有括号
arrowParens: 'always',
endOfline: "auto"
// 结尾是 \n \r \n\r auto
endOfline: "auto",
// 在jsx中把'>' 是否单独放一行
jsxBracketSameLine: false,
}
module.exports = {
presets: ['@vue/cli-plugin-babel/preset']
presets: ["@vue/cli-plugin-babel/preset"]
}
......@@ -44,7 +44,7 @@
},
"devDependencies": {
"@vue/cli-plugin-babel": "^4.5.0",
"@vue/cli-plugin-eslint": "^4.5.0",
"@vue/cli-plugin-eslint": "^4.5.4",
"@vue/cli-plugin-pwa": "^4.5.0",
"@vue/cli-service": "^4.5.0",
"@vue/eslint-config-prettier": "^6.0.0",
......@@ -52,13 +52,14 @@
"commitizen": "^4.2.0",
"cz-conventional-changelog": "^3.2.1",
"element-ui": "^2.13.2",
"eslint": "^6.7.2",
"eslint": "^6.8.0",
"eslint-plugin-prettier": "^3.1.3",
"eslint-plugin-vue": "^6.2.2",
"husky": "^3.1.0",
"lint-staged": "^10.2.11",
"node-sass": "^4.12.0",
"prettier": "^1.19.1",
"prettier-eslint": "^11.0.0",
"sass-loader": "^8.0.2",
"serve": "^11.3.2",
"standard-version": "^9.0.0",
......
......@@ -5,25 +5,30 @@
<side-nav></side-nav>
<router-view style="flex:1;border: 1px solid #666;"></router-view>
<right-panel></right-panel>
<!-- <video
src="baidsfsfsdfsdfsdfsdfsdfsdfsfsdfsfsfsefsfsfsdfsdfdsfsdfu.com/mp4"
a="afasfsafdfasdfsfad"></video>
<input id="" type="text"
name=""/> -->
</body>
</div>
</template>
<script>
import CommonHeader from '@/components/header/index.vue'
import CommonHeader from "@/components/header/index.vue"
export default {
components: {
CommonHeader,
SideNav: () => import('@/components/sideNav/index.vue'),
RightPanel: () => import('@/components/rightPanel/index.vue')
SideNav: () => import("@/components/sideNav/index.vue"),
RightPanel: () => import("@/components/rightPanel/index.vue")
},
data() {
return {}
},
async created() {
console.log('this.$http:', this.$http)
let result = await this.$http.get('/webapi/home/banner?type=1&category=18')
console.log('result:', result)
console.log("this.$http:", this.$http)
let result = await this.$http.get("/webapi/home/banner?type=1&category=18")
console.log("result:", result)
}
}
</script>
......
......@@ -9,7 +9,7 @@
<script>
export default {
components: {
tipPanel: () => import('@/components/header/tipPanel.vue')
tipPanel: () => import("@/components/header/tipPanel.vue")
},
data() {
return {}
......
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './registerServiceWorker'
import axios from 'axios'
import Vue from "vue"
import App from "./App.vue"
import router from "./router"
import store from "./store"
import "./registerServiceWorker"
import axios from "axios"
import baseURL from '../config/baseUrl.js'
console.log('baseURL:', baseURL)
import baseURL from "../config/baseUrl.js"
console.log("baseURL:", baseURL)
Vue.config.productionTip = false
Vue.prototype.$http = axios
......@@ -15,4 +15,4 @@ new Vue({
router,
store,
render: (h) => h(App)
}).$mount('#app')
}).$mount("#app")
/* eslint-disable no-console */
import { register } from 'register-service-worker'
import { register } from "register-service-worker"
if (process.env.NODE_ENV === 'production') {
if (process.env.NODE_ENV === "production") {
register(`${process.env.BASE_URL}service-worker.js`, {
ready() {
console.log(
'App is being served from cache by a service worker.\n' +
'For more details, visit https://goo.gl/AFskqB'
"App is being served from cache by a service worker.\n" +
"For more details, visit https://goo.gl/AFskqB"
)
},
registered() {
console.log('Service worker has been registered.')
console.log("Service worker has been registered.")
},
cached() {
console.log('Content has been cached for offline use.')
console.log("Content has been cached for offline use.")
},
updatefound() {
console.log('New content is downloading.')
console.log("New content is downloading.")
},
updated() {
console.log('New content is available; please refresh.')
console.log("New content is available; please refresh.")
},
offline() {
console.log('No internet connection found. App is running in offline mode.')
console.log("No internet connection found. App is running in offline mode.")
},
error(error) {
console.error('Error during service worker registration:', error)
console.error("Error during service worker registration:", error)
}
})
}
import Vue from 'vue'
import VueRouter from 'vue-router'
import Bao3 from '../views/bao3.vue'
import Screenshot from '../views/screenshot.vue'
import screenshotPanel from '../components/rightPanel/screenshotPanel.vue'
import Vue from "vue"
import VueRouter from "vue-router"
import Bao3 from "../views/bao3.vue"
import Screenshot from "../views/screenshot.vue"
import screenshotPanel from "../components/rightPanel/screenshotPanel.vue"
Vue.use(VueRouter)
const routes = [
{
path: '/',
name: 'Bao3',
path: "/",
name: "Bao3",
component: Bao3
},
{
path: '/about',
name: 'About',
path: "/about",
name: "About",
// route level code-splitting
// this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
component: () => import(/* webpackChunkName: "about" */ "../views/About.vue")
},
{
path: '/cutter',
name: 'Cutter',
component: () => import(/* webpackChunkName: "bao1" */ '../views/videoCutter.vue')
path: "/cutter",
name: "Cutter",
component: () => import(/* webpackChunkName: "bao1" */ "../views/videoCutter.vue")
},
{
path: '/bao2',
name: 'Bao2',
component: () => import(/* webpackChunkName: "bao2" */ '../views/bao2.vue')
path: "/bao2",
name: "Bao2",
component: () => import(/* webpackChunkName: "bao2" */ "../views/bao2.vue")
},
{
path: '/screenshot',
path: "/screenshot",
components: {
default: Screenshot,
panel: screenshotPanel
......@@ -40,7 +40,7 @@ const routes = [
]
const router = new VueRouter({
mode: 'history',
mode: "history",
base: process.env.BASE_URL,
routes
})
......
import Vue from 'vue'
import Vuex from 'vuex'
import Vue from "vue"
import Vuex from "vuex"
Vue.use(Vuex)
......
......@@ -4,7 +4,7 @@
<script>
export default {
name: 'Screenshot',
name: "Screenshot",
data() {
return {}
},
......
......@@ -4,7 +4,7 @@
<script>
export default {
name: 'VideoConverterBaby',
name: "VideoConverterBaby",
components: {},
props: {},
data() {
......
......@@ -10,14 +10,14 @@
</template>
<script>
import VideoPlayer from '@/components/videoCutter/videoPlayer.vue'
import VideoPlayer from "@/components/videoCutter/videoPlayer.vue"
export default {
components: {
VideoPlayer
},
data() {
return {
name: ''
name: ""
}
},
created() {},
......
......@@ -4,7 +4,7 @@ console.log(`process.env.NODE_ENV1:`, process.env.NODE_ENV)
module.exports = {
// outputDir: process.env.outputDir,
// assetsDir: 'static',
publicPath: '/',
publicPath: "/",
devServer: {
open: true,
// host: '0.0.0.0',
......@@ -13,10 +13,10 @@ module.exports = {
hotOnly: false,
proxy: {
webapi: {
target: 'https://test2.laihua.com/',
target: "https://test2.laihua.com/",
ws: true,
changeOrigin: true,
pathRewrite: { '^/webapi': '/' }
pathRewrite: { "^/webapi": "/" }
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment