From a2601f1c8690f8cb1e13e40226d63e53e5ade45e Mon Sep 17 00:00:00 2001 From: Adam Procter <adam.procter@soton.ac.uk> Date: Wed, 14 Jul 2021 14:40:08 +0100 Subject: [PATCH] fixed up eslint to be single quotes and vetur working --- .eslintrc.js | 15 +++++++++++++++ .prettierrc.js | 4 ++++ jsconfig.json | 5 +++++ package.json | 16 +--------------- src/components/SampleComponent.vue | 4 ++-- src/views/Home.vue | 16 +++++++++++++--- tsconfig.json | 12 ++++++++++++ 7 files changed, 52 insertions(+), 20 deletions(-) create mode 100644 .eslintrc.js create mode 100644 .prettierrc.js create mode 100644 jsconfig.json create mode 100644 tsconfig.json diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..5fa68cb --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,15 @@ +module.exports = { + "root": true, + "env": { + "node": true + }, + "extends": [ + "plugin:vue/vue3-essential", + "eslint:recommended", + "@vue/prettier" + ], + "parserOptions": { + "parser": "babel-eslint" + }, + "rules": {} + } \ No newline at end of file diff --git a/.prettierrc.js b/.prettierrc.js new file mode 100644 index 0000000..3f714ac --- /dev/null +++ b/.prettierrc.js @@ -0,0 +1,4 @@ +module.exports = { + singleQuote: true, + semi: false, +} diff --git a/jsconfig.json b/jsconfig.json new file mode 100644 index 0000000..ff77941 --- /dev/null +++ b/jsconfig.json @@ -0,0 +1,5 @@ +{ + "include": [ + "./src/**/*" + ] + } \ No newline at end of file diff --git a/package.json b/package.json index 19278af..7de91e4 100644 --- a/package.json +++ b/package.json @@ -28,21 +28,7 @@ "eslint-plugin-vue": "^7.0.0", "prettier": "^2.2.1" }, - "eslintConfig": { - "root": true, - "env": { - "node": true - }, - "extends": [ - "plugin:vue/vue3-essential", - "eslint:recommended", - "@vue/prettier" - ], - "parserOptions": { - "parser": "babel-eslint" - }, - "rules": {} - }, + "browserslist": [ "> 1%", "last 2 versions", diff --git a/src/components/SampleComponent.vue b/src/components/SampleComponent.vue index bf4199c..93c69f1 100644 --- a/src/components/SampleComponent.vue +++ b/src/components/SampleComponent.vue @@ -6,8 +6,8 @@ <script> export default { - name: "SampleComponent", -}; + name: 'SampleComponent', +} </script> <!-- Add "scoped" attribute to limit CSS to this component only --> diff --git a/src/views/Home.vue b/src/views/Home.vue index 50a02b0..dda3e77 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -6,12 +6,22 @@ <script> // @ is an alias to /src -import SampleComponent from "@/components/SampleComponent.vue"; +import SampleComponent from '@/components/SampleComponent.vue' +import axios from 'axios' export default { - name: "Home", + name: 'Home', components: { SampleComponent, }, -}; + + data() { + return { + new_spaces: null, + } + }, + created() { + axios.get('https://kinopio.club/space/new-spaces') + }, +} </script> diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..6ce8cfb --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,12 @@ +{ + "include": [ + "./src/**/*" + ], + "compilerOptions": { + "module": "es2015", + "moduleResolution": "node", + "target": "es5", + "sourceMap": true, + "allowJs": true + } + } \ No newline at end of file -- GitLab