Configuração rápida para o eslint funcionar no VSCode, no template webpack do vue-cli
Projeto:
npx vue-cli init webpack <nomedoprojeto>
cd <nomedoprojeto>
npm install
<template> | |
<div id="app"> | |
<button @click="setFakeLogin()">Fake Login</button> | |
<button @click="setFakeLogout()">Fake Logout</button> | |
<router-view/> | |
</div> | |
</template> | |
<script> | |
import store from './store' |
<template> | |
<div class="hello"> | |
<div v-if="store.isLogged()"> | |
Usuário Logado: {{store.username}} | |
</div> | |
<div v-else> | |
Ninguém logado | |
</div> |
import Vue from 'vue' | |
import App from './App' | |
import router from './router' | |
import VueStash from 'vue-stash' | |
Vue.use(VueStash) | |
Vue.config.productionTip = false | |
/* eslint-disable no-new */ |
// The Vue build version to load with the `import` command | |
// (runtime-only or standalone) has been set in webpack.base.conf with an alias. | |
import Vue from 'vue' | |
import App from './App' | |
import router from './router' | |
import VueStash from './vue-stash' | |
import store from './store' | |
Vue.use(VueStash) |
<template> | |
<div id="app"> | |
<button @click="setFakeLogin()">Fake Login</button> | |
<button @click="setFakeLogout()">Fake Logout</button> | |
<router-view/> | |
</div> | |
</template> | |
<script> | |
export default { | |
name: 'App', |
<template> | |
<div class="hello"> | |
<div v-if="isLogged()"> | |
Usuário Logado: {{username}} | |
</div> | |
<div v-else> | |
Ninguém logado | |
</div> |
Configuração rápida para o eslint funcionar no VSCode, no template webpack do vue-cli
Projeto:
npx vue-cli init webpack <nomedoprojeto>
cd <nomedoprojeto>
npm install
module.exports = { | |
title: 'Hello VuePress', | |
description: 'Just playing around' | |
} |
home: true heroImage: /hero.png actionText: Get Started → actionLink: /guide/ features:
--- | |
home: true | |
heroImage: /hero.png | |
actionText: Get Started → | |
actionLink: /guide/ | |
features: | |
- title: Simplicity First | |
details: Minimal setup with markdown-centered project structure helps you focus on writing. | |
- title: Vue-Powered | |
details: Enjoy the dev experience of Vue + webpack, use Vue components in markdown, and develop custom themes with Vue. |