mirror of
https://github.com/frappe/books.git
synced 2025-03-21 02:22:23 +00:00
[eslint] Semi always
This commit is contained in:
parent
64f166470d
commit
2b68d2b57a
@ -25,8 +25,8 @@ module.exports = {
|
|||||||
'generator-star-spacing': 'off',
|
'generator-star-spacing': 'off',
|
||||||
// allow debugger during development
|
// allow debugger during development
|
||||||
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
|
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
|
||||||
'semi': 2,
|
'semi': ['error', 'always'],
|
||||||
'indent': ["error", 2],
|
'indent': ['error', 2],
|
||||||
'space-before-function-paren': 'off'
|
'space-before-function-paren': 'off'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
<template functional>
|
<template functional>
|
||||||
<button type="button"
|
<button type="button"
|
||||||
:class="['btn btn-sm', 'btn-' + Object.keys(props).find(key => ['primary', 'secondary', 'light', 'dark'].includes(key))]"
|
:class="['btn btn-sm', 'btn-' + Object.keys(props).find(key => ['primary', 'secondary', 'light', 'dark'].includes(key))]"
|
||||||
v-bind="data.attrs"
|
v-bind="data.attrs"
|
||||||
v-on="listeners"
|
v-on="listeners"
|
||||||
>
|
>
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</button>
|
</button>
|
||||||
</template>
|
</template>
|
24
src/main.js
24
src/main.js
@ -2,18 +2,19 @@
|
|||||||
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
|
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
|
||||||
|
|
||||||
// vue imports
|
// vue imports
|
||||||
import Vue from 'vue'
|
import Vue from 'vue';
|
||||||
import App from './App'
|
import App from './App';
|
||||||
import router from './router'
|
import router from './router';
|
||||||
|
|
||||||
// frappejs imports
|
// frappejs imports
|
||||||
|
import io from 'socket.io-client';
|
||||||
import frappe from 'frappejs';
|
import frappe from 'frappejs';
|
||||||
import HTTPClient from 'frappejs/backends/http';
|
import HTTPClient from 'frappejs/backends/http';
|
||||||
import Observable from 'frappejs/utils/observable';
|
import Observable from 'frappejs/utils/observable';
|
||||||
import common from 'frappejs/common';
|
import common from 'frappejs/common';
|
||||||
import coreModels from 'frappejs/models';
|
import coreModels from 'frappejs/models';
|
||||||
import models from '../models';
|
import models from '../models';
|
||||||
import io from 'socket.io-client';
|
import { _ } from 'frappejs/utils';
|
||||||
|
|
||||||
// vue components
|
// vue components
|
||||||
import NotFound from './components/NotFound';
|
import NotFound from './components/NotFound';
|
||||||
@ -35,7 +36,7 @@ frappe.db.bindSocketClient(socket);
|
|||||||
frappe.registerModels(models);
|
frappe.registerModels(models);
|
||||||
frappe.docs = new Observable();
|
frappe.docs = new Observable();
|
||||||
frappe.getSingle('SystemSettings');
|
frappe.getSingle('SystemSettings');
|
||||||
registerReportMethods()
|
registerReportMethods();
|
||||||
|
|
||||||
frappe.getSingle('AccountingSettings')
|
frappe.getSingle('AccountingSettings')
|
||||||
.then(accountingSettings => {
|
.then(accountingSettings => {
|
||||||
@ -48,7 +49,7 @@ frappe.getSingle('AccountingSettings')
|
|||||||
|
|
||||||
window.frappe = frappe;
|
window.frappe = frappe;
|
||||||
|
|
||||||
Vue.config.productionTip = false
|
Vue.config.productionTip = false;
|
||||||
|
|
||||||
Vue.component('not-found', NotFound);
|
Vue.component('not-found', NotFound);
|
||||||
Vue.component('feather-icon', FeatherIcon);
|
Vue.component('feather-icon', FeatherIcon);
|
||||||
@ -56,10 +57,19 @@ Vue.component('frappe-control', FrappeControl);
|
|||||||
Vue.component('f-button', Button);
|
Vue.component('f-button', Button);
|
||||||
Vue.component('indicator', Indicator);
|
Vue.component('indicator', Indicator);
|
||||||
|
|
||||||
|
Vue.mixin({
|
||||||
|
methods: {
|
||||||
|
// global translation function in every component
|
||||||
|
_(...args) {
|
||||||
|
return _(...args);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
/* eslint-disable no-new */
|
/* eslint-disable no-new */
|
||||||
new Vue({
|
new Vue({
|
||||||
el: '#app',
|
el: '#app',
|
||||||
router,
|
router,
|
||||||
components: { App },
|
components: { App },
|
||||||
template: '<App/>'
|
template: '<App/>'
|
||||||
})
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user