From 79f01e1733a10868e78ba2ae0d00e9a96906a1bc Mon Sep 17 00:00:00 2001 From: Resul Avan Date: Wed, 28 Oct 2020 02:57:58 +0100 Subject: [PATCH] sonarcloud integration --- README.md | 3 +++ src/nuxt.config.ts | 10 +++++++++- src/package.json | 14 ++++++++------ src/ts-shim.d.ts | 29 +++++++++++++++++++++++++++++ 4 files changed, 49 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 8de8bdd..7fd20d7 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,9 @@ # nuxt-typescript-ssr-firebase-auth [![BUILD](https://circleci.com/gh/rslvn/nuxt-typescript-ssr-firebase-auth.svg?style=shield)](https://circleci.com/gh/rslvn/nuxt-typescript-ssr-firebase-auth) +[![Coverage Code](https://sonarcloud.io/api/project_badges/measure?project=rslvn_nuxt-typescript-ssr-firebase-auth&metric=coverage)](https://sonarcloud.io/dashboard?id=rslvn_nuxt-typescript-ssr-firebase-auth) +[![Lines Of Code](https://sonarcloud.io/api/project_badges/measure?project=rslvn_nuxt-typescript-ssr-firebase-auth&metric=ncloc)](https://sonarcloud.io/dashboard?id=rslvn_nuxt-typescript-ssr-firebase-auth) +[![Technical Debit](https://sonarcloud.io/api/project_badges/measure?project=rslvn_nuxt-typescript-ssr-firebase-auth&metric=sqale_index)](https://sonarcloud.io/dashboard?id=rslvn_nuxt-typescript-ssr-firebase-auth) `nuxt generate` is really sucks!!! We lost `nuxtServerInit`, dynamic routing stuff etc. We need a good alternative to deploy our applications to the cloud without VPS and SSL configuration. diff --git a/src/nuxt.config.ts b/src/nuxt.config.ts index 2439aa7..a15a3b9 100644 --- a/src/nuxt.config.ts +++ b/src/nuxt.config.ts @@ -69,7 +69,15 @@ const config: Configuration = { ** Nuxt.js dev-modules */ buildModules: [ - '@nuxt/typescript-build', + ['@nuxt/typescript-build', { + typeCheck: { + async: true, + typescript: { + enable: true, + memoryLimit: 2048 + } + } + }], '@nuxtjs/stylelint-module' ], /* diff --git a/src/package.json b/src/package.json index 948b897..9301b74 100644 --- a/src/package.json +++ b/src/package.json @@ -71,6 +71,7 @@ "cookie-parser": "^1.4.5", "cookie-universal-nuxt": "^2.1.4", "cors": "^2.8.5", + "country-state-city": "^1.0.5", "cropperjs": "^1.5.7", "debounce": "^1.2.0", "dotenv": "^8.2.0", @@ -94,7 +95,8 @@ "vue-lazyload": "^1.3.3", "vue-meta": "^2.4.0", "vue-rx": "^6.2.0", - "vuex-class": "^0.3.2" + "vuex-class": "^0.3.2", + "world-cities": "file:../../world-cities" }, "devDependencies": { "@babel/core": "^7.7.7", @@ -107,7 +109,9 @@ "@nuxtjs/stylelint-module": "^4.0.0", "@types/jest": "^26.0.8", "@types/vfile-message": "^2.0.0", + "@vue/test-utils": "^1.0.0-beta.27", "babel-eslint": "^10.1.0", + "babel-jest": "^24.1.0", "core-js": "^3.6.5", "dts-generator": "^3.0.0", "eslint": "^7.5.0", @@ -118,16 +122,14 @@ "eslint-plugin-vue": "^6.2.2", "firebase-tools": "^8.6.0", "husky": "^4.2.5", + "jest": "^24.1.0", "jest-serializer-vue": "^2.0.2", "lint-staged": "^10.2.11", "node-sass": "^4.14.1", "prettier": "^2.0.5", "sass-loader": "^9.0.2", "stylelint": "^13.6.1", - "@vue/test-utils": "^1.0.0-beta.27", - "babel-jest": "^24.1.0", - "jest": "^24.1.0", - "vue-jest": "^4.0.0-0", - "ts-jest": "^25.0.0" + "ts-jest": "^25.0.0", + "vue-jest": "^4.0.0-0" } } diff --git a/src/ts-shim.d.ts b/src/ts-shim.d.ts index 7ff8baf..950fa42 100644 --- a/src/ts-shim.d.ts +++ b/src/ts-shim.d.ts @@ -11,3 +11,32 @@ declare module '*.vue' { import Vue from 'vue' export default Vue } + +declare module CityDB { + + export interface City { + id: number; + name: string; + latitude: string; + longitude: string; + } + + export interface State { + id: number; + name: string; + state_code: string; + cities: City[]; + } + + export interface Country { + id: number; + name: string; + iso3: string; + iso2: string; + phone_code: string; + capital: string; + currency: string; + states: State[]; + } + +}