From ff79e097952d943f2a6cea77fdecd7e88293aea2 Mon Sep 17 00:00:00 2001 From: Luis Ball Date: Thu, 8 Jul 2021 13:33:44 -0700 Subject: [PATCH] style: apply tslint fix --- src/plugins/vue-imgix/index.ts | 2 +- src/plugins/vue-imgix/ix-img.tsx | 12 ++++++------ src/plugins/vue-imgix/ix-source.tsx | 3 +-- tests/unit/picture-mode.spec.tsx | 9 ++++----- vue.config.js | 20 ++++++++++---------- 5 files changed, 22 insertions(+), 24 deletions(-) diff --git a/src/plugins/vue-imgix/index.ts b/src/plugins/vue-imgix/index.ts index cbcabe80..87cd51b1 100644 --- a/src/plugins/vue-imgix/index.ts +++ b/src/plugins/vue-imgix/index.ts @@ -1,4 +1,4 @@ -import { app } from '@/main' +import { app } from '@/main'; import { IxPicture } from './ix-picture'; import { IxSource } from './ix-source'; import { IVueUseImgixOptions } from './types'; diff --git a/src/plugins/vue-imgix/ix-img.tsx b/src/plugins/vue-imgix/ix-img.tsx index ed9feff5..9b287a21 100644 --- a/src/plugins/vue-imgix/ix-img.tsx +++ b/src/plugins/vue-imgix/ix-img.tsx @@ -50,12 +50,12 @@ export const IxImg = defineComponent({ return () => h('img', { - [attributeConfig.src]: src, - [attributeConfig.srcset]: srcset, - width: props.width, - height: props.height, - sizes: props.sizes, - ['data-testid']: attrs['data-testid'] || undefined, + [attributeConfig.src]: src, + [attributeConfig.srcset]: srcset, + width: props.width, + height: props.height, + sizes: props.sizes, + ['data-testid']: attrs['data-testid'] || undefined, }); }, }); diff --git a/src/plugins/vue-imgix/ix-source.tsx b/src/plugins/vue-imgix/ix-source.tsx index 4e61a64c..ca427456 100644 --- a/src/plugins/vue-imgix/ix-source.tsx +++ b/src/plugins/vue-imgix/ix-source.tsx @@ -1,7 +1,6 @@ import { ensureVueImgixClientSingleton, IVueImgixClient } from './vue-imgix'; import { defineComponent, h } from 'vue'; - const defaultAttributeMap = { src: 'src', srcset: 'srcset', @@ -35,6 +34,6 @@ export const IxSource = defineComponent({ [attributeConfig.srcset]: srcset, }; - return () => h('source', childAttrs ); + return () => h('source', childAttrs); }, }); diff --git a/tests/unit/picture-mode.spec.tsx b/tests/unit/picture-mode.spec.tsx index dc27a7f6..09cde608 100644 --- a/tests/unit/picture-mode.spec.tsx +++ b/tests/unit/picture-mode.spec.tsx @@ -1,4 +1,4 @@ -import { createApp } from 'vue' +import { createApp } from 'vue'; import { render, screen } from '@testing-library/vue'; import '@testing-library/jest-dom'; @@ -16,7 +16,6 @@ describe.skip('Picture Mode', () => { }); describe('ix-picture', () => { - it('should render a picture', () => { render(IxPicture, { props: { @@ -39,9 +38,9 @@ describe.skip('Picture Mode', () => { `, }), ); - expect(getByTestId('test-picture') - .querySelectorAll('source')) - .toHaveLength(1); + expect( + getByTestId('test-picture').querySelectorAll('source'), + ).toHaveLength(1); }); it('the developer can pass an ix-img component as a fallback src', () => { diff --git a/vue.config.js b/vue.config.js index abfe3849..e9864829 100644 --- a/vue.config.js +++ b/vue.config.js @@ -1,19 +1,19 @@ module.exports = { - chainWebpack: config => { - config.resolve.alias.set('vue', '@vue/compat') + chainWebpack: (config) => { + config.resolve.alias.set('vue', '@vue/compat'); config.module .rule('vue') .use('vue-loader') - .tap(options => { + .tap((options) => { return { ...options, compilerOptions: { compatConfig: { - MODE: 2 - } - } - } - }) - } -} + MODE: 2, + }, + }, + }; + }); + }, +};