chore(clean): Fixed formatting, enforce prettier rules + new version.

This commit is contained in:
Ferdinand Thiessen 2021-12-06 01:28:35 +01:00
parent 7d3e47494f
commit e2d499d053
6 changed files with 56 additions and 57 deletions

View File

@ -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',
},
};

View File

@ -1,41 +1,45 @@
{
"license": "MIT",
"version": "1.0.0-alpha.2",
"name": "@flaschengeist/users",
"author": "Ferdinand Thiessen <rpm@fthiessen.de>",
"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 <rpm@fthiessen.de>",
"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"
}
}

View File

@ -23,6 +23,7 @@ export default defineComponent({
const emptyUser = {
userid: '',
display_name: '',
deleted: false,
firstname: '',
lastname: '',
mail: '',

View File

@ -17,7 +17,7 @@
map-options
clearable
@new-value="createRole"
@update:modelValue="updateRole"
@update:model-value="updateRole"
@clear="removeRole"
/>
</q-card-section>
@ -30,7 +30,7 @@
:options="permissions"
color="primary"
type="checkbox"
@update:modelValue="updatePermissions"
@update:model-value="updatePermissions"
/>
</q-scroll-area>
</q-card-section>

View File

@ -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,

View File

@ -8,7 +8,7 @@
<MainUserSettings :user="currentUser" @update:user="updateUser" />
</q-card>
<div class="col-12 text-left text-h6">Aktive Sessions:</div>
<Session
<user-session
v-for="(session, index) in sessions"
:key="'session' + index"
v-model="sessions[index]"
@ -22,12 +22,12 @@
import { useMainStore, useUserStore, useSessionStore } from '@flaschengeist/api';
import MainUserSettings from '../components/settings/MainUserSettings.vue';
import { defineComponent, onBeforeMount, ref } from 'vue';
import Session from '../components/settings/Session.vue';
import UserSession from '../components/settings/UserSession.vue';
import { Notify } from 'quasar';
export default defineComponent({
name: 'UserSettings',
components: { Session, MainUserSettings },
components: { MainUserSettings, UserSession },
setup() {
const mainStore = useMainStore();
const sessionStore = useSessionStore();