Skip to content

Commit

Permalink
refactor: eslint fixes [WTEL-4144]
Browse files Browse the repository at this point in the history
  • Loading branch information
dlohvinov committed Jan 12, 2024
1 parent 82dc6f8 commit b757778
Show file tree
Hide file tree
Showing 21 changed files with 261 additions and 234 deletions.
13 changes: 3 additions & 10 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,11 @@ module.exports = {
es2022: true,
},
extends: [
'plugin:vue/vue3-essential',
'@vue/airbnb',
'plugin:vue/vue3-recommended',
],
parserOptions: {
parser: '@babel/eslint-parser',
},
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-console': 'off',
'no-debugger': 'off',
'no-underscore-dangle': 'off',
'import/prefer-default-export': 'off',
},
Expand All @@ -23,9 +19,6 @@ module.exports = {
'**/__tests__/*.{j,t}s?(x)',
'**/tests/unit/**/*.spec.{j,t}s?(x)',
],
env: {
jest: true,
},
},
],
};
114 changes: 52 additions & 62 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"dev": "vite",
"build": "vite build",
"serve": "vite preview",
"test:unit": "vitest"
"test:unit": "vitest",
"lint:fix": "eslint --fix --ext .js,.vue src"
},
"dependencies": {
"@vue/compat": "^3.3.9",
Expand All @@ -32,7 +33,7 @@
"@vitest/coverage-v8": "^1.1.3",
"eslint": "^8.56.0",
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-vue": "^8.7.1",
"eslint-plugin-vue": "^9.20.0",
"happy-dom": "^13.0.0",
"husky": "^8.0.3",
"node-polyfill-webpack-plugin": "^2.0.1",
Expand Down
2 changes: 1 addition & 1 deletion src/app.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<router-view></router-view>
<router-view />
</template>

<style lang="scss">
Expand Down
6 changes: 3 additions & 3 deletions src/app/components/the-crm-workspace.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<main class="object-wrap">
<section class="object">
<wt-app-header>
<wt-notifications-bar></wt-notifications-bar>
<wt-notifications-bar />
<wt-navigation-bar
:current-app="currentApp"
:nav="nav"
:dark-mode="darkMode"
></wt-navigation-bar>
/>
<wt-logo
:dark-mode="darkMode"
/>
Expand All @@ -16,7 +16,7 @@
:apps="apps"
:current-app="currentApp"
:dark-mode="darkMode"
></wt-app-navigator>
/>
<wt-header-actions
:build-info="{ release, build }"
:user="userinfo"
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/utils/access-denied-component.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<wt-error-page
type="403"
@back="goToApplicationHub"
></wt-error-page>
/>
</template>

<script setup>
Expand Down
16 changes: 8 additions & 8 deletions src/modules/contacts/components/contact-popup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
width="480"
@close="close"
>
<template v-slot:title>
<template #title>
{{ props.id ? t('reusable.edit') : t('reusable.new') }}
{{ t('contacts.contact', 1).toLowerCase() }}
</template>
<template v-slot:main>
<template #main>
<form class="contact-popup-form">
<wt-input
:value="draft.name.commonName"
Expand All @@ -17,19 +17,19 @@
required
prevent-trim
@input="draft.name.commonName = $event"
></wt-input>
/>
<wt-select
:value="draft.timezones[0]?.timezone"
:label="t('date.timezone', 1)"
:search-method="TimezonesAPI.getLookup"
@input="draft.timezones[0] = { timezone: $event }"
></wt-select>
/>
<wt-select
:value="draft.managers[0]?.user"
:label="t('contacts.manager', 1)"
:search-method="UsersAPI.getLookup"
@input="draft.managers[0] = { user: $event }"
></wt-select>
/>
<wt-tags-input
:value="draft.labels"
:label="t('vocabulary.labels', 1)"
Expand All @@ -38,15 +38,15 @@
track-by="label"
taggable
@input="draft.labels = $event"
></wt-tags-input>
/>
<wt-textarea
:value="draft.about"
:label="t('vocabulary.description')"
@input="draft.about = $event"
></wt-textarea>
/>
</form>
</template>
<template v-slot:actions>
<template #actions>
<wt-button
:disabled="v$.$invalid"
:loading="isSaving"
Expand Down
Loading

0 comments on commit b757778

Please sign in to comment.