Skip to content

Commit

Permalink
fix: lint templates for recommended eslint settings
Browse files Browse the repository at this point in the history
  • Loading branch information
jacekkarczmarczyk committed May 30, 2019
1 parent d93e60b commit 0c3ce75
Show file tree
Hide file tree
Showing 8 changed files with 70 additions and 76 deletions.
14 changes: 6 additions & 8 deletions generator/templates/default/src/App.js.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,18 @@

<script>
<%_ if (!options.router) { _%>
import HelloWorld from './components/HelloWorld'
import HelloWorld from './components/HelloWorld';
<%_ } _%>
export default {
name: 'App',
<%_ if (!options.router) { _%>
components: {
HelloWorld
HelloWorld,
},
<%_ } _%>
data () {
return {
//
}
}
}
data: () => ({
//
}),
};
</script>
16 changes: 7 additions & 9 deletions generator/templates/default/src/App.ts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,20 @@
</template>

<script lang="ts">
import Vue from 'vue'
import Vue from 'vue';
<%_ if (!options.router) { _%>
import HelloWorld from './components/HelloWorld.vue'
import HelloWorld from './components/HelloWorld.vue';
<%_ } _%>
export default Vue.extend({
name: 'App',
<%_ if (!options.router) { _%>
components: {
HelloWorld
HelloWorld,
},
<%_ } _%>
data () {
return {
//
}
}
})
data: () => ({
//
}),
});
</script>
35 changes: 17 additions & 18 deletions generator/templates/default/src/components/HelloWorld.js.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,54 +90,53 @@ export default {
ecosystem: [
{
text: 'vuetify-loader',
href: 'https://github.com/vuetifyjs/vuetify-loader'
href: 'https://github.com/vuetifyjs/vuetify-loader',
},
{
text: 'github',
href: 'https://github.com/vuetifyjs/vuetify'
href: 'https://github.com/vuetifyjs/vuetify',
},
{
text: 'awesome-vuetify',
href: 'https://github.com/vuetifyjs/awesome-vuetify'
}
href: 'https://github.com/vuetifyjs/awesome-vuetify',
},
],
importantLinks: [
{
text: 'Documentation',
href: 'https://vuetifyjs.com'
href: 'https://vuetifyjs.com',
},
{
text: 'Chat',
href: 'https://community.vuetifyjs.com'
href: 'https://community.vuetifyjs.com',
},
{
text: 'Made with Vuetify',
href: 'https://madewithvuetifyjs.com'
href: 'https://madewithvuetifyjs.com',
},
{
text: 'Twitter',
href: 'https://twitter.com/vuetifyjs'
href: 'https://twitter.com/vuetifyjs',
},
{
text: 'Articles',
href: 'https://medium.com/vuetify'
}
href: 'https://medium.com/vuetify',
},
],
whatsNext: [
{
text: 'Explore components',
href: 'https://vuetifyjs.com/components/api-explorer'
href: 'https://vuetifyjs.com/components/api-explorer',
},
{
text: 'Select a layout',
href: 'https://vuetifyjs.com/layout/pre-defined'
href: 'https://vuetifyjs.com/layout/pre-defined',
},
{
text: 'Frequently Asked Questions',
href: 'https://vuetifyjs.com/getting-started/frequently-asked-questions'
}
]
})
}
href: 'https://vuetifyjs.com/getting-started/frequently-asked-questions',
},
],
}),
};
</script>
37 changes: 18 additions & 19 deletions generator/templates/default/src/components/HelloWorld.ts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -85,61 +85,60 @@
</template>

<script lang="ts">
import Vue from 'vue'
import Vue from 'vue';
export default Vue.extend({
data: () => ({
ecosystem: [
{
text: 'vuetify-loader',
href: 'https://github.com/vuetifyjs/vuetify-loader'
href: 'https://github.com/vuetifyjs/vuetify-loader',
},
{
text: 'github',
href: 'https://github.com/vuetifyjs/vuetify'
href: 'https://github.com/vuetifyjs/vuetify',
},
{
text: 'awesome-vuetify',
href: 'https://github.com/vuetifyjs/awesome-vuetify'
}
href: 'https://github.com/vuetifyjs/awesome-vuetify',
},
],
importantLinks: [
{
text: 'Documentation',
href: 'https://vuetifyjs.com'
href: 'https://vuetifyjs.com',
},
{
text: 'Chat',
href: 'https://community.vuetifyjs.com'
href: 'https://community.vuetifyjs.com',
},
{
text: 'Made with Vuetify',
href: 'https://madewithvuetifyjs.com'
href: 'https://madewithvuetifyjs.com',
},
{
text: 'Twitter',
href: 'https://twitter.com/vuetifyjs'
href: 'https://twitter.com/vuetifyjs',
},
{
text: 'Articles',
href: 'https://medium.com/vuetify'
}
href: 'https://medium.com/vuetify',
},
],
whatsNext: [
{
text: 'Explore components',
href: 'https://vuetifyjs.com/components/api-explorer'
href: 'https://vuetifyjs.com/components/api-explorer',
},
{
text: 'Select a layout',
href: 'https://vuetifyjs.com/layout/pre-defined'
href: 'https://vuetifyjs.com/layout/pre-defined',
},
{
text: 'Frequently Asked Questions',
href: 'https://vuetifyjs.com/getting-started/frequently-asked-questions'
}
]
})
})
href: 'https://vuetifyjs.com/getting-started/frequently-asked-questions',
},
],
}),
});
</script>
24 changes: 12 additions & 12 deletions generator/templates/default/src/plugins/vuetify.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
import Vue from 'vue'
import Vue from 'vue';
<%_ if (useAlaCarte) { _%>
import Vuetify from 'vuetify/lib'
import Vuetify from 'vuetify/lib';
<%_ } else { _%>
import Vuetify from 'vuetify'
import 'vuetify/dist/vuetify.min.css'
import Vuetify from 'vuetify';
import 'vuetify/dist/vuetify.min.css';
<%_ } _%>
<%_ if (locale !== 'en') { _%>
import <%= locale.replace(/-/g, '') %> from 'vuetify/<%= typescript ? 'src' : 'es5' %>/locale/<%= locale %>'
import <%= locale.replace(/-/g, '') %> from 'vuetify/<%= typescript ? 'src' : 'es5' %>/locale/<%= locale %>';
<%_ } _%>
Vue.use(Vuetify)
Vue.use(Vuetify);
export default new Vuetify({
<%_ if (useTheme) { _%>
theme: {
<%_ if (useCustomProperties) { _%>
options: {
customProperties: true
customProperties: true,
},
<%_ } _%>
themes: {
Expand All @@ -28,17 +28,17 @@ export default new Vuetify({
info: '#2196F3',
success: '#4CAF50',
warning: '#FFC107'
}
}
},
},
},
<%_ } _%>
<%_ if (locale !== 'en') { _%>
lang: {
locales: { <%= locale.replace(/-/g, '') %> },
current: '<%= locale %>'
current: '<%= locale %>',
},
<%_ } _%>
icons: {
iconfont: '<%= iconFont %>',
}
})
},
});
8 changes: 4 additions & 4 deletions generator/templates/default/src/views/Home.js.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
</template>

<script>
import HelloWorld from '../components/HelloWorld'
import HelloWorld from '../components/HelloWorld';
export default {
components: {
HelloWorld
}
}
HelloWorld,
},
};
</script>
10 changes: 5 additions & 5 deletions generator/templates/default/src/views/Home.ts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
</template>

<script lang="ts">
import Vue from 'vue'
import HelloWorld from '../components/HelloWorld.vue'
import Vue from 'vue';
import HelloWorld from '../components/HelloWorld.vue';
export default Vue.extend({
components: {
HelloWorld
}
})
HelloWorld,
},
});
</script>
2 changes: 1 addition & 1 deletion generator/tools/vuetify.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function renderFiles (api, opts) {
}

function addImports (api) {
api.injectImports(api.entryFile, `import vuetify from './plugins/vuetify'`)
api.injectImports(api.entryFile, `import vuetify from './plugins/vuetify';`)
api.injectRootOptions(api.entryFile, 'vuetify')
}

Expand Down

0 comments on commit 0c3ce75

Please sign in to comment.