From 52a2c01a29774f2b724e45c7c5bbbd0b71665a5c Mon Sep 17 00:00:00 2001 From: "e.valeev" Date: Thu, 25 May 2017 03:16:09 +0300 Subject: [PATCH] Change syntax to eslint-standart friendly for generated component --- dist/blueprints/component/index.vue | 6 +++--- dist/blueprints/component/temp.component.js | 10 +++------- .../component/temp.component.spec.js | 20 +++++++++---------- dist/blueprints/component/temp.sty.extension | 5 ++--- dist/config/config.json | 4 ++-- lib/blueprints/component/index.vue | 6 +++--- lib/blueprints/component/temp.component.js | 10 +++------- .../component/temp.component.spec.js | 20 +++++++++---------- lib/blueprints/component/temp.sty.extension | 5 ++--- 9 files changed, 38 insertions(+), 48 deletions(-) diff --git a/dist/blueprints/component/index.vue b/dist/blueprints/component/index.vue index 5753f89..0c4f2c2 100644 --- a/dist/blueprints/component/index.vue +++ b/dist/blueprints/component/index.vue @@ -1,4 +1,4 @@ - - - + + + diff --git a/dist/blueprints/component/temp.component.js b/dist/blueprints/component/temp.component.js index cfaa893..a676acf 100644 --- a/dist/blueprints/component/temp.component.js +++ b/dist/blueprints/component/temp.component.js @@ -1,19 +1,15 @@ -export default { +export default { name: '{{name | kebabCase}}', props: [], - mounted() { - + mounted () { }, - data() { + data () { return { - } }, methods: { - }, computed: { - } } diff --git a/dist/blueprints/component/temp.component.spec.js b/dist/blueprints/component/temp.component.spec.js index 50613f3..50ff88f 100644 --- a/dist/blueprints/component/temp.component.spec.js +++ b/dist/blueprints/component/temp.component.spec.js @@ -1,29 +1,29 @@ -import Vue from 'vue'; -import {{name | camelCase}}Component from './index.vue'; +import Vue from 'vue' +import {{name | camelCase}}Component from './index.vue' // Here are some Jasmine 2.0 tests, though you can // use any test runner / assertion library combo you prefer describe('{{name | camelCase}}Component', () => { // Inspect the raw component options it('has a created hook', () => { - // expect(typeof {{name | camelCase}}Component.created).toBe('function'); + // expect(typeof {{name | camelCase}}Component.created).toBe('function') }) // Evaluate the results of functions in // the raw component options it('sets the correct default data', () => { // expect(typeof {{name | camelCase}}Component.data).toBe('function') - // const defaultData = {{name | camelCase}}Component.data(); - // expect(defaultData.message).toBe('hello!'); + // const defaultData = {{name | camelCase}}Component.data() + // expect(defaultData.message).toBe('hello!') }) // Inspect the component instance on mount it('correctly sets the message when created', () => { - // const vm = new Vue({{name | camelCase}}Component).$mount(); - // expect(vm.message).toBe('bye!'); + // const vm = new Vue({{name | camelCase}}Component).$mount() + // expect(vm.message).toBe('bye!') }) // Mount an instance and inspect the render output it('renders the correct message', () => { - // const Ctor = Vue.extend({{name | camelCase}}Component); - // const vm = new Ctor().$mount(); - // expect(vm.$el.textContent).toBe('bye!'); + // const Ctor = Vue.extend({{name | camelCase}}Component) + // const vm = new Ctor().$mount() + // expect(vm.$el.textContent).toBe('bye!') }) }) \ No newline at end of file diff --git a/dist/blueprints/component/temp.sty.extension b/dist/blueprints/component/temp.sty.extension index 7b40ab8..19a50b7 100644 --- a/dist/blueprints/component/temp.sty.extension +++ b/dist/blueprints/component/temp.sty.extension @@ -1,3 +1,2 @@ -.{{name | kebabCase}} { - -} \ No newline at end of file +.{{name | kebabCase}} + // styles \ No newline at end of file diff --git a/dist/config/config.json b/dist/config/config.json index 1abb38b..8e2cf0d 100644 --- a/dist/config/config.json +++ b/dist/config/config.json @@ -1,7 +1,7 @@ { "filesType": { "js": "js", - "html": "pug", - "style": "less" + "html": "html", + "style": "scss" } } \ No newline at end of file diff --git a/lib/blueprints/component/index.vue b/lib/blueprints/component/index.vue index 5753f89..0c4f2c2 100644 --- a/lib/blueprints/component/index.vue +++ b/lib/blueprints/component/index.vue @@ -1,4 +1,4 @@ - - - + + + diff --git a/lib/blueprints/component/temp.component.js b/lib/blueprints/component/temp.component.js index cfaa893..a676acf 100644 --- a/lib/blueprints/component/temp.component.js +++ b/lib/blueprints/component/temp.component.js @@ -1,19 +1,15 @@ -export default { +export default { name: '{{name | kebabCase}}', props: [], - mounted() { - + mounted () { }, - data() { + data () { return { - } }, methods: { - }, computed: { - } } diff --git a/lib/blueprints/component/temp.component.spec.js b/lib/blueprints/component/temp.component.spec.js index 50613f3..50ff88f 100644 --- a/lib/blueprints/component/temp.component.spec.js +++ b/lib/blueprints/component/temp.component.spec.js @@ -1,29 +1,29 @@ -import Vue from 'vue'; -import {{name | camelCase}}Component from './index.vue'; +import Vue from 'vue' +import {{name | camelCase}}Component from './index.vue' // Here are some Jasmine 2.0 tests, though you can // use any test runner / assertion library combo you prefer describe('{{name | camelCase}}Component', () => { // Inspect the raw component options it('has a created hook', () => { - // expect(typeof {{name | camelCase}}Component.created).toBe('function'); + // expect(typeof {{name | camelCase}}Component.created).toBe('function') }) // Evaluate the results of functions in // the raw component options it('sets the correct default data', () => { // expect(typeof {{name | camelCase}}Component.data).toBe('function') - // const defaultData = {{name | camelCase}}Component.data(); - // expect(defaultData.message).toBe('hello!'); + // const defaultData = {{name | camelCase}}Component.data() + // expect(defaultData.message).toBe('hello!') }) // Inspect the component instance on mount it('correctly sets the message when created', () => { - // const vm = new Vue({{name | camelCase}}Component).$mount(); - // expect(vm.message).toBe('bye!'); + // const vm = new Vue({{name | camelCase}}Component).$mount() + // expect(vm.message).toBe('bye!') }) // Mount an instance and inspect the render output it('renders the correct message', () => { - // const Ctor = Vue.extend({{name | camelCase}}Component); - // const vm = new Ctor().$mount(); - // expect(vm.$el.textContent).toBe('bye!'); + // const Ctor = Vue.extend({{name | camelCase}}Component) + // const vm = new Ctor().$mount() + // expect(vm.$el.textContent).toBe('bye!') }) }) \ No newline at end of file diff --git a/lib/blueprints/component/temp.sty.extension b/lib/blueprints/component/temp.sty.extension index 7b40ab8..19a50b7 100644 --- a/lib/blueprints/component/temp.sty.extension +++ b/lib/blueprints/component/temp.sty.extension @@ -1,3 +1,2 @@ -.{{name | kebabCase}} { - -} \ No newline at end of file +.{{name | kebabCase}} + // styles \ No newline at end of file