Skip to content

Commit c51dac5

Browse files
committed
chore: remove disable for broken rule
rule got fixed
1 parent c6c7d4d commit c51dac5

File tree

7 files changed

+13
-34
lines changed

7 files changed

+13
-34
lines changed

packages/@lwc/compiler/src/transformers/__tests__/transform-html.spec.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,6 @@ describe('transformSync', () => {
7272
{ name: 'true', config: { enableStaticContentOptimization: true }, expected: true },
7373
{ name: 'unspecified', config: {}, expected: true },
7474
];
75-
// False positive: https://github.com/vitest-dev/eslint-plugin-vitest/issues/802
76-
// eslint-disable-next-line vitest/no-done-callback
7775
it.for(configs)('$name', ({ config, expected }) => {
7876
const template = `<template><img src="http://example.com/img.png" crossorigin="anonymous"></template>`;
7977
const { code, warnings } = transformSync(template, 'foo.html', {

packages/@lwc/compiler/src/transformers/__tests__/transform-javascript.spec.ts

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -253,24 +253,19 @@ describe('sourcemaps', () => {
253253
{ name: 'invalid string', sourcemap: 'invalid' },
254254
{ name: 'object', sourcemap: {} },
255255
{ name: 'numbers', sourcemap: 123 },
256-
])(
257-
'$name',
258-
// False positive: https://github.com/vitest-dev/eslint-plugin-vitest/issues/802
259-
// eslint-disable-next-line vitest/no-done-callback
260-
({ sourcemap }) => {
261-
expect(() =>
262-
transformSync(source, 'foo.js', {
263-
...TRANSFORMATION_OPTIONS,
264-
outputConfig: {
265-
// @ts-expect-error Property can be passed from JS environments with no type checking.
266-
sourcemap,
267-
},
268-
})
269-
).toThrow(
270-
`LWC1021: Expected a boolean value or 'inline' for outputConfig.sourcemap, received "${sourcemap}".`
271-
);
272-
}
273-
);
256+
])('$name', ({ sourcemap }) => {
257+
expect(() =>
258+
transformSync(source, 'foo.js', {
259+
...TRANSFORMATION_OPTIONS,
260+
outputConfig: {
261+
// @ts-expect-error Property can be passed from JS environments with no type checking.
262+
sourcemap,
263+
},
264+
})
265+
).toThrow(
266+
`LWC1021: Expected a boolean value or 'inline' for outputConfig.sourcemap, received "${sourcemap}".`
267+
);
268+
});
274269
});
275270
});
276271

packages/@lwc/rollup-plugin/src/__tests__/enableStaticContentOptimization/enableStaticContentOptimization.spec.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ describe('enableStaticContentOptimization:', () => {
4747
{ name: 'unspecified', opts: {}, expected: true },
4848
];
4949

50-
// False positive: https://github.com/vitest-dev/eslint-plugin-vitest/issues/802
51-
// eslint-disable-next-line vitest/no-done-callback
5250
it.for(configs)('$name', async ({ opts, expected }) => {
5351
const { code, warnings } = await runRollup('fixtures/basic/basic.js', opts);
5452
expect(warnings).toEqual([]);

packages/@lwc/ssr-compiler/src/__tests__/api-decorator.spec.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ describe('thows error', () => {
4343
return "foo";
4444
}`,
4545
],
46-
// False positive: https://github.com/vitest-dev/eslint-plugin-vitest/issues/802
47-
// eslint-disable-next-line vitest/no-done-callback
4846
])(`%s`, ([, body]) => {
4947
const src = /* js */ `
5048
import { api, LightningElement } from "lwc";
@@ -112,8 +110,6 @@ describe('thows error', () => {
112110
['tabindex', 'tabIndex'],
113111
['maxlength', 'maxLength'],
114112
['maxvalue', 'maxValue'],
115-
// False positive: https://github.com/vitest-dev/eslint-plugin-vitest/issues/802
116-
// eslint-disable-next-line vitest/no-done-callback
117113
] as [prop: string, suggestion: string][])('%s', ([prop, suggestion]) => {
118114
const src = /* js */ `
119115
import { api, LightningElement } from "lwc";
@@ -128,8 +124,6 @@ describe('thows error', () => {
128124
});
129125

130126
describe('disallowed props', () => {
131-
// False positive: https://github.com/vitest-dev/eslint-plugin-vitest/issues/802
132-
// eslint-disable-next-line vitest/no-done-callback
133127
test.for(['class', 'is', 'slot', 'style'])('%s', (prop) => {
134128
const src = /* js */ `
135129
import { api, LightningElement } from 'lwc'

packages/@lwc/ssr-runtime/src/__tests__/stubs.spec.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ import * as runtime from '../index';
33
import * as stubs from '../stubs';
44

55
describe('no stubs are unused', () => {
6-
// False positive: https://github.com/vitest-dev/eslint-plugin-vitest/issues/802
7-
// eslint-disable-next-line vitest/no-done-callback
86
test.for(Object.entries(stubs))('%s is used', ([key, value]) => {
97
expect(runtime).toHaveProperty(key);
108
expect(runtime[key as keyof typeof runtime]).toBe(value);

packages/@lwc/ssr-runtime/src/__tests__/to-iterator-directive.spec.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ describe('toIteratorDirective', () => {
1616
],
1717
] as const;
1818

19-
// False positive: https://github.com/vitest-dev/eslint-plugin-vitest/issues/802
20-
// eslint-disable-next-line vitest/no-done-callback
2119
it.for(iterables)('%s is converted', ([_label, iter]) => {
2220
const generator = toIteratorDirective(iter);
2321
expect([...generator]).toEqual([

packages/@lwc/template-compiler/src/__tests__/index.spec.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,6 @@ describe('parse', () => {
7575
{ name: 'true', config: { enableStaticContentOptimization: true }, expected: true },
7676
{ name: 'unspecified', config: {}, expected: true },
7777
];
78-
// False positive: https://github.com/vitest-dev/eslint-plugin-vitest/issues/802
79-
// eslint-disable-next-line vitest/no-done-callback
8078
it.for(configs)('$name', ({ config, expected }) => {
8179
const template = `<template><img src="http://example.com/img.png" crossorigin="anonymous"></template>`;
8280
const { code, warnings } = compile(template, '', config);

0 commit comments

Comments
 (0)