Skip to content

Commit

Permalink
style: apply tslint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
luqven committed Jul 8, 2021
1 parent 201a84f commit ff79e09
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 24 deletions.
2 changes: 1 addition & 1 deletion src/plugins/vue-imgix/index.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
12 changes: 6 additions & 6 deletions src/plugins/vue-imgix/ix-img.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});
},
});
3 changes: 1 addition & 2 deletions src/plugins/vue-imgix/ix-source.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { ensureVueImgixClientSingleton, IVueImgixClient } from './vue-imgix';
import { defineComponent, h } from 'vue';


const defaultAttributeMap = {
src: 'src',
srcset: 'srcset',
Expand Down Expand Up @@ -35,6 +34,6 @@ export const IxSource = defineComponent({
[attributeConfig.srcset]: srcset,
};

return () => h('source', childAttrs );
return () => h('source', childAttrs);
},
});
9 changes: 4 additions & 5 deletions tests/unit/picture-mode.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createApp } from 'vue'
import { createApp } from 'vue';
import { render, screen } from '@testing-library/vue';
import '@testing-library/jest-dom';

Expand All @@ -16,7 +16,6 @@ describe.skip('Picture Mode', () => {
});

describe('ix-picture', () => {

it('should render a picture', () => {
render(IxPicture, {
props: {
Expand All @@ -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', () => {
Expand Down
20 changes: 10 additions & 10 deletions vue.config.js
Original file line number Diff line number Diff line change
@@ -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,
},
},
};
});
},
};

0 comments on commit ff79e09

Please sign in to comment.