Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix lint errors #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
]
}
presets: ["@vue/cli-plugin-babel/preset"],
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"vue-template-compiler": "^2.6.11"
},
"eslintConfig": {
"root": true,
"root": false,
"env": {
"node": true
},
Expand Down
4 changes: 2 additions & 2 deletions src/components/Card.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ export default {
"topRight",
"bottomLeft",
"middleLeft",
"bottomRight"
]
"bottomRight",
],
};
</script>

Expand Down
8 changes: 3 additions & 5 deletions src/components/CardGrid.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<template>
<div class="grid">
<beat-loader :loading="!items"></beat-loader>
<div v-if="items && items.length === 0">
No Cards
</div>
<div v-if="items && items.length === 0">No Cards</div>
<div class="items" v-if="items && items.length > 0">
<router-link
v-for="(item, index) in items"
Expand All @@ -28,8 +26,8 @@ export default {
props: ["items"],
components: {
Card,
BeatLoader
}
BeatLoader,
},
};
</script>

Expand Down
12 changes: 6 additions & 6 deletions src/components/CardModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,20 @@ export default {
type: "SINGLE_USE",
spend_limit: 0,
spend_limit_duration: "TRANSACTION",
state: "OPEN"
state: "OPEN",
};
},
methods: {
createCard: async function() {
createCard: async function () {
const req = {
url: "/card",
method: "post",
data: {
memo: this.memo,
spend_limit: Number(this.spend_limit),
spend_limit_duration: this.spend_limit_duration,
state: this.state
}
state: this.state,
},
};
const token = this.card && this.card.token;
if (token) {
Expand All @@ -74,8 +74,8 @@ export default {
}
const ret = await this.$store.dispatch("apiRequest", req);
this.callback && this.callback(ret);
}
}
},
},
};
</script>

Expand Down
12 changes: 6 additions & 6 deletions src/components/FundingModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,25 @@ export default {
return {
account_name: "",
account_number: null,
routing_number: null
routing_number: null,
};
},
methods: {
addFunding: async function() {
addFunding: async function () {
if (this.account_number && this.routing_number) {
const ret = await this.$store.dispatch("apiRequest", {
url: "/fundingsource/bank",
method: "post",
data: {
account_name: this.account_name,
routing_number: this.routing_number,
account_number: this.account_number
}
account_number: this.account_number,
},
});
this.callback && this.callback(ret);
}
}
}
},
},
};
</script>

Expand Down
4 changes: 2 additions & 2 deletions src/components/Info.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ export default {
name: "Info",
props: ["data"],
components: {
VueJsonPretty
}
VueJsonPretty,
},
};
</script>

Expand Down
8 changes: 3 additions & 5 deletions src/components/List.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<template>
<div>
<beat-loader :loading="!items"></beat-loader>
<div v-if="items && items.length === 0">
No items
</div>
<div v-if="items && items.length === 0">No items</div>
<router-link
class="item"
v-for="item in items"
Expand All @@ -26,8 +24,8 @@ export default {
name: "List",
props: ["items", "disableLink"],
components: {
BeatLoader
}
BeatLoader,
},
};
</script>

Expand Down
28 changes: 9 additions & 19 deletions src/components/Navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,12 @@
<router-link to="/">
<img src="@/assets/logo.svg" />
</router-link>
<router-link to="/card">
Cards
</router-link>
<router-link to="/transaction">
Transactions
</router-link>
<router-link to="/fundingsource">
Funding
</router-link>
<router-link to="/card"> Cards </router-link>
<router-link to="/transaction"> Transactions </router-link>
<router-link to="/fundingsource"> Funding </router-link>
<toggle-button :value="darkMode" @change="toggleDarkMode" />
<a href="https://lithic.com" target="_blank">
Learn More
</a>
<a href="https://docs.lithic.com" target="_blank">
API Docs
</a>
<a href="https://lithic.com" target="_blank"> Learn More </a>
<a href="https://docs.lithic.com" target="_blank"> API Docs </a>
</div>
</template>

Expand All @@ -28,13 +18,13 @@ export default {
computed: {
darkMode() {
return this.$store.state.darkMode;
}
},
},
methods: {
toggleDarkMode: function() {
toggleDarkMode: function () {
this.$store.commit("toggleDarkMode");
}
}
},
},
};
</script>

Expand Down
2 changes: 1 addition & 1 deletion src/components/PageHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<script>
export default {
name: "PageHeader",
props: ["title"]
props: ["title"],
};
</script>

Expand Down
4 changes: 2 additions & 2 deletions src/components/Sidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ export default {
computed: {
requests() {
return this.$store.state.requests;
}
}
},
},
};
</script>

Expand Down
4 changes: 2 additions & 2 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ Vue.use(VueChatScroll);
Vue.use(VModal);
Vue.use(ToggleButton);
Vue.use(VueToastr, {
defaultPosition: "toast-bottom-left"
defaultPosition: "toast-bottom-left",
});

new Vue({
el: "#app",
router,
store,
template: "<App/>",
components: { App }
components: { App },
});
18 changes: 9 additions & 9 deletions src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,39 +18,39 @@ const Router = new VueRouter({
{
path: "/",
name: "Home",
component: HomePage
component: HomePage,
},
{
path: "/card/:card_token",
name: "Card",
component: CardPage
component: CardPage,
},
{
path: "/card",
name: "Cards",
component: CardsPage
component: CardsPage,
},
{
path: "/transaction/:transaction_token",
name: "Transaction",
component: TransactionPage
component: TransactionPage,
},
{
path: "/transaction",
name: "Transactions",
component: TransactionsPage
component: TransactionsPage,
},
{
path: "/fundingsource*",
name: "Funding",
component: FundingPage
component: FundingPage,
},
{
path: "/apiKey",
name: "API Key",
component: ApiKeyPage
}
]
component: ApiKeyPage,
},
],
});

Router.beforeEach((to, from, next) => {
Expand Down
12 changes: 6 additions & 6 deletions src/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default new Vuex.Store({
headers,
method,
baseURL,
url
url,
};

if (method === "get") {
Expand All @@ -45,15 +45,15 @@ export default new Vuex.Store({
displayURL,
method,
params: req.params && (otherData.params || params),
data: !req.params && passedData
data: !req.params && passedData,
});
}

return data || otherData;
} catch (err) {
window.toastr.e(err.response.data.message);
}
}
},
},
mutations: {
setApiKey: (state, request) => {
Expand All @@ -62,8 +62,8 @@ export default new Vuex.Store({
setRequests: (state, request) => {
state.requests = [...state.requests, request];
},
toggleDarkMode: state => {
toggleDarkMode: (state) => {
state.darkMode = !state.darkMode;
}
}
},
},
});
12 changes: 6 additions & 6 deletions src/views/ApiKeyPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,28 +36,28 @@ export default {
name: "ApiKeyPage",
data() {
return {
apiKey: ""
apiKey: "",
};
},
methods: {
enterKey: async function(e) {
enterKey: async function (e) {
e.preventDefault();
await this.$store.commit("setApiKey", this.apiKey);
const card = await this.$store.dispatch("apiRequest", {
url: "/card",
logging: false,
data: {
page_size: 1
}
page_size: 1,
},
});

if (!card) {
this.apiKey = "";
} else {
this.$router.push("/");
}
}
}
},
},
};
</script>

Expand Down
Loading