From 5a7bfecb4bbc573e4cf9b2a2226f489f008f2ff0 Mon Sep 17 00:00:00 2001 From: Andreani Jean Date: Tue, 10 Jan 2023 16:24:44 +0100 Subject: [PATCH] add eslint + doc README + env var --- .env | 1 + .eslintrc.js | 26 + README.md | 22 - package.json | 4 +- src/App.vue | 2 +- src/main.ts | 28 +- src/views/HomeView.vue | 14 +- tsconfig.app.json | 3 +- yarn-error.log | 4356 ++++++++++++++++++++++++++++++++++++++++ yarn.lock | 2 +- 10 files changed, 4408 insertions(+), 50 deletions(-) create mode 100644 .eslintrc.js create mode 100644 yarn-error.log diff --git a/.env b/.env index e69de29..f44be05 100644 --- a/.env +++ b/.env @@ -0,0 +1 @@ +VITE_API_URL=http://dev.geovisio.xuan.codeursenliberte.fr/api/search \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..bb2d7c1 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,26 @@ +module.exports = { + env: { + node: true, + }, + parser: "vue-eslint-parser", + parserOptions: { + parser: "@typescript-eslint/parser", + extraFileExtensions: [".vue"], + ecmaVersion: 2020, + sourceType: "module", + }, + plugins: ["@typescript-eslint"], + extends: [ + "eslint:recommended", + "plugin:@typescript-eslint/eslint-recommended", + "plugin:@typescript-eslint/recommended", + "plugin:prettier/recommended", + "plugin:vue/base", + "prettier", + ], + rules: { + "vue/require-default-prop": "off", + // override/add rules settings here, such as: + // 'vue/no-unused-vars': 'error' + }, +}; diff --git a/README.md b/README.md index 1058639..97f925f 100644 --- a/README.md +++ b/README.md @@ -50,25 +50,3 @@ npm run workflows:unit ```sh npm run lint ``` - -## Deploy with Github Pages - -The deploy is on the `gh-pages` branch. -1 - You must build a static project : - -```sh -vite build -``` - -2 - Add and Commit : - -```sh -ga . -gc -m 'my commit' -``` - -3 - Push on the specific branch - -```sh -git subtree push --prefix dist origin gh-pages -``` diff --git a/package.json b/package.json index bd240ed..b45600b 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "private": true, "scripts": { "dev": "vite", - "start": "vite preview --port $PORT", + "start": "vite --port $PORT", "build": "run-p type-check build-only", "preview": "vite preview", "test:unit": "vitest --environment jsdom --root src/", @@ -25,7 +25,7 @@ "devDependencies": { "@rushstack/eslint-patch": "^1.1.4", "@types/jsdom": "^20.0.1", - "@types/node": "^18.11.9", + "@types/node": "^18.11.18", "@typescript-eslint/eslint-plugin": "^5.46.0", "@typescript-eslint/parser": "^5.4.0", "@vitejs/plugin-vue": "^3.2.0", diff --git a/src/App.vue b/src/App.vue index 4696e15..bc3bc39 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,5 +1,5 @@