From e2d499d0537362413fb82f68c06dea17e7cc99d0 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Mon, 6 Dec 2021 01:28:35 +0100 Subject: [PATCH] chore(clean): Fixed formatting, enforce prettier rules + new version. --- .eslintrc.js | 18 ++-- package.json | 82 ++++++++++--------- src/components/NewUser.vue | 1 + src/components/settings/RoleSettings.vue | 4 +- .../settings/{Session.vue => UserSession.vue} | 2 +- src/pages/Settings.vue | 6 +- 6 files changed, 56 insertions(+), 57 deletions(-) rename src/components/settings/{Session.vue => UserSession.vue} (99%) diff --git a/.eslintrc.js b/.eslintrc.js index ab9cd5e..00e5be6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -17,11 +17,11 @@ module.exports = { project: resolve(__dirname, './tsconfig.json'), tsconfigRootDir: __dirname, ecmaVersion: 2019, // Allows for the parsing of modern ECMAScript features - sourceType: 'module' // Allows for the use of imports + sourceType: 'module', // Allows for the use of imports }, env: { - browser: true + browser: true, }, // Rules order is important, please avoid shuffling them @@ -44,7 +44,7 @@ module.exports = { // https://github.com/prettier/eslint-config-prettier#installation // usage with Prettier, provided by 'eslint-config-prettier'. - 'prettier', //'plugin:prettier/recommended' + 'plugin:prettier/recommended', ], plugins: [ @@ -54,10 +54,6 @@ module.exports = { // https://eslint.vuejs.org/user-guide/#why-doesn-t-it-work-on-vue-file // required to lint *.vue files 'vue', - - // https://github.com/typescript-eslint/typescript-eslint/issues/389#issuecomment-509292674 - // Prettier has not been included as plugin to avoid performance impact - // add it as an extension for your IDE ], // add your custom rules here @@ -66,10 +62,8 @@ module.exports = { // TypeScript quotes: ['warn', 'single', { avoidEscape: true }], - '@typescript-eslint/explicit-function-return-type': 'off', - '@typescript-eslint/explicit-module-boundary-types': 'off', // allow debugger during development only - 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off' - } -} + 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', + }, +}; diff --git a/package.json b/package.json index 0c7e3e5..23e3275 100644 --- a/package.json +++ b/package.json @@ -1,41 +1,45 @@ { - "license": "MIT", - "version": "1.0.0-alpha.2", - "name": "@flaschengeist/users", - "author": "Ferdinand Thiessen ", - "homepage": "https://flaschengeist.dev/Flaschengeist", - "description": "Flaschengeist users plugin", - "bugs": { - "url": "https://flaschengeist.dev/Flaschengeist/flaschengeist/issues" - }, - "repository": { - "type": "git", - "url": "https://flaschengeist.dev/Flaschengeist/flaschengeist-users" - }, - "main": "src/index.ts", - "scripts": { - "pretty": "prettier --config ./package.json --write '{,!(node_modules)/**/}*.{ts,vue}'", - "lint": "eslint --ext .js,.ts,.vue ./src" - }, - "devDependencies": { - "@flaschengeist/types": "^1.0.0-alpha.9", - "@quasar/app": "^3.2.3", - "@typescript-eslint/eslint-plugin": "^5.4.0", - "@typescript-eslint/parser": "^5.4.0", - "eslint": "^8.3.0", - "eslint-config-prettier": "^8.3.0", - "eslint-plugin-vue": "^8.1.1", - "prettier": "^2.5.0", - "quasar": "^2.3.3", - "typescript": "^4.5.2" - }, - "peerDependencies": { - "@flaschengeist/api": "^1.0.0-alpha.6" - }, - "prettier": { - "singleQuote": true, - "semi": true, - "printWidth": 100, - "arrowParens": "always" - } + "license": "MIT", + "version": "1.0.0-alpha.3", + "name": "@flaschengeist/users", + "author": "Ferdinand Thiessen ", + "homepage": "https://flaschengeist.dev/Flaschengeist", + "description": "Flaschengeist users plugin", + "bugs": { + "url": "https://flaschengeist.dev/Flaschengeist/flaschengeist/issues" + }, + "repository": { + "type": "git", + "url": "https://flaschengeist.dev/Flaschengeist/flaschengeist-users" + }, + "main": "src/index.ts", + "scripts": { + "format": "prettier --config ./package.json --write '{,!(node_modules|.*)/**/}*.{js,ts,vue}'", + "lint": "eslint --ext .js,.ts,.vue ./src" + }, + "devDependencies": { + "@flaschengeist/api": "^1.0.0-alpha.7", + "@flaschengeist/types": "^1.0.0-alpha.10", + "@quasar/app": "^3.2.4", + "@typescript-eslint/eslint-plugin": "^5.5.0", + "@typescript-eslint/parser": "^5.5.0", + "axios": "^0.24.0", + "eslint": "^8.4.0", + "eslint-config-prettier": "^8.3.0", + "eslint-plugin-prettier": "^4.0.0", + "eslint-plugin-vue": "^8.1.1", + "pinia": "^2.0.6", + "prettier": "^2.5.1", + "quasar": "^2.3.3", + "typescript": "^4.5.2" + }, + "peerDependencies": { + "@flaschengeist/api": "^1.0.0-alpha.7" + }, + "prettier": { + "singleQuote": true, + "semi": true, + "printWidth": 100, + "arrowParens": "always" } +} diff --git a/src/components/NewUser.vue b/src/components/NewUser.vue index 177635c..0149c13 100644 --- a/src/components/NewUser.vue +++ b/src/components/NewUser.vue @@ -23,6 +23,7 @@ export default defineComponent({ const emptyUser = { userid: '', display_name: '', + deleted: false, firstname: '', lastname: '', mail: '', diff --git a/src/components/settings/RoleSettings.vue b/src/components/settings/RoleSettings.vue index 05914d2..d8bf550 100644 --- a/src/components/settings/RoleSettings.vue +++ b/src/components/settings/RoleSettings.vue @@ -17,7 +17,7 @@ map-options clearable @new-value="createRole" - @update:modelValue="updateRole" + @update:model-value="updateRole" @clear="removeRole" /> @@ -30,7 +30,7 @@ :options="permissions" color="primary" type="checkbox" - @update:modelValue="updatePermissions" + @update:model-value="updatePermissions" /> diff --git a/src/components/settings/Session.vue b/src/components/settings/UserSession.vue similarity index 99% rename from src/components/settings/Session.vue rename to src/components/settings/UserSession.vue index 4630d6c..1bbf603 100644 --- a/src/components/settings/Session.vue +++ b/src/components/settings/UserSession.vue @@ -54,7 +54,7 @@ import { useMainStore, useSessionStore } from '@flaschengeist/api'; import { date } from 'quasar'; export default defineComponent({ - name: 'Session', + name: 'UserSession', props: { modelValue: { required: true, diff --git a/src/pages/Settings.vue b/src/pages/Settings.vue index 182ba43..22b0c5c 100644 --- a/src/pages/Settings.vue +++ b/src/pages/Settings.vue @@ -8,7 +8,7 @@
Aktive Sessions:
-