Skip to content

Commit a8d123c

Browse files
chore(deps): update eslint packages (#7086)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Vladimir Sheremet <[email protected]>
1 parent c60ee27 commit a8d123c

47 files changed

Lines changed: 581 additions & 564 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"test:browser:playwright": "pnpm -C test/browser run test:playwright"
3737
},
3838
"devDependencies": {
39-
"@antfu/eslint-config": "^3.11.2",
39+
"@antfu/eslint-config": "^3.16.0",
4040
"@antfu/ni": "^23.2.0",
4141
"@playwright/test": "^1.49.1",
4242
"@rollup/plugin-commonjs": "^28.0.2",
@@ -51,7 +51,7 @@
5151
"bumpp": "^9.10.1",
5252
"changelogithub": "^0.13.11",
5353
"esbuild": "^0.24.2",
54-
"eslint": "^9.16.0",
54+
"eslint": "^9.18.0",
5555
"magic-string": "^0.30.17",
5656
"pathe": "^2.0.1",
5757
"rimraf": "^6.0.1",

packages/browser/src/node/commands/screenshot.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ export const screenshot: BrowserCommand<[string, ScreenshotOptions]> = async (
1818
const path = options.path
1919
? resolve(dirname(context.testPath), options.path)
2020
: resolveScreenshotPath(
21-
context.testPath,
22-
name,
23-
context.project.config,
24-
)
21+
context.testPath,
22+
name,
23+
context.project.config,
24+
)
2525
const savePath = normalize(path)
2626
await mkdir(dirname(path), { recursive: true })
2727

packages/browser/src/node/plugin.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -571,12 +571,12 @@ function resolveCoverageFolder(vitest: Vitest) {
571571
const options = vitest.config
572572
const htmlReporter = options.coverage?.enabled
573573
? toArray(options.coverage.reporter).find((reporter) => {
574-
if (typeof reporter === 'string') {
575-
return reporter === 'html'
576-
}
574+
if (typeof reporter === 'string') {
575+
return reporter === 'html'
576+
}
577577

578-
return reporter[0] === 'html'
579-
})
578+
return reporter[0] === 'html'
579+
})
580580
: undefined
581581

582582
if (!htmlReporter) {
@@ -591,8 +591,8 @@ function resolveCoverageFolder(vitest: Vitest) {
591591

592592
const subdir
593593
= Array.isArray(htmlReporter)
594-
&& htmlReporter.length > 1
595-
&& 'subdir' in htmlReporter[1]
594+
&& htmlReporter.length > 1
595+
&& 'subdir' in htmlReporter[1]
596596
? htmlReporter[1].subdir
597597
: undefined
598598

packages/browser/src/node/serverTester.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export async function resolveTester(
3737
// if decoded test file is "__vitest_all__" or not in the list of known files, run all tests
3838
const tests
3939
= testFile === '__vitest_all__'
40-
|| !testFiles.includes(testFile)
40+
|| !testFiles.includes(testFile)
4141
? '__vitest_browser_runner__.files'
4242
: JSON.stringify([testFile])
4343
const iframeId = JSON.stringify(testFile)

packages/expect/src/jest-asymmetric-matchers.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -187,12 +187,12 @@ export class ArrayContaining<T = unknown> extends AsymmetricMatcher<Array<T>> {
187187
const matcherContext = this.getMatcherContext()
188188
const result
189189
= this.sample.length === 0
190-
|| (Array.isArray(other)
191-
&& this.sample.every(item =>
192-
other.some(another =>
193-
equals(item, another, matcherContext.customTesters),
194-
),
195-
))
190+
|| (Array.isArray(other)
191+
&& this.sample.every(item =>
192+
other.some(another =>
193+
equals(item, another, matcherContext.customTesters),
194+
),
195+
))
196196

197197
return this.inverse ? !result : result
198198
}

packages/expect/src/jest-expect.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export const JestChaiExpect: ChaiPlugin = (chai, utils) => {
8181
if (!isNot) {
8282
const message
8383
= utils.flag(this, 'message')
84-
|| 'expected promise to throw an error, but it didn\'t'
84+
|| 'expected promise to throw an error, but it didn\'t'
8585
const error = {
8686
showDiff: false,
8787
}
@@ -469,7 +469,7 @@ export const JestChaiExpect: ChaiPlugin = (chai, utils) => {
469469
const { value, exists } = getValue()
470470
const pass
471471
= exists
472-
&& (args.length === 1 || jestEquals(expected, value, customTesters))
472+
&& (args.length === 1 || jestEquals(expected, value, customTesters))
473473

474474
const valueString
475475
= args.length === 1 ? '' : ` with value ${utils.objDisplay(expected)}`
@@ -751,7 +751,7 @@ export const JestChaiExpect: ChaiPlugin = (chai, utils) => {
751751
if (!isNot) {
752752
const message
753753
= utils.flag(this, 'message')
754-
|| 'expected promise to throw an error, but it didn\'t'
754+
|| 'expected promise to throw an error, but it didn\'t'
755755
const error = {
756756
showDiff: false,
757757
}
@@ -774,7 +774,7 @@ export const JestChaiExpect: ChaiPlugin = (chai, utils) => {
774774
if (!isThrow && !isNot) {
775775
const message
776776
= utils.flag(this, 'message')
777-
|| 'expected function to throw an error, but it didn\'t'
777+
|| 'expected function to throw an error, but it didn\'t'
778778
const error = {
779779
showDiff: false,
780780
}

packages/expect/src/jest-utils.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ function eq(
218218
// Deep compare each member
219219
result
220220
= hasKey(b, key)
221-
&& eq(a[key], b[key], aStack, bStack, customTesters, hasKey)
221+
&& eq(a[key], b[key], aStack, bStack, customTesters, hasKey)
222222

223223
if (!result) {
224224
return false
@@ -603,11 +603,11 @@ export function subsetEquality(
603603
}
604604
const result
605605
= object != null
606-
&& hasPropertyInObject(object, key)
607-
&& equals(object[key], subset[key], [
608-
...filteredCustomTesters,
609-
subsetEqualityWithContext(seenReferences),
610-
])
606+
&& hasPropertyInObject(object, key)
607+
&& equals(object[key], subset[key], [
608+
...filteredCustomTesters,
609+
subsetEqualityWithContext(seenReferences),
610+
])
611611
// The main goal of using seenReference is to avoid circular node on tree.
612612
// It will only happen within a parent and its child, not a node and nodes next to it (same level)
613613
// We should keep the reference for a parent and its child only
@@ -759,9 +759,9 @@ export function getObjectSubset(
759759
trimmed[key] = seenReferences.has(object[key])
760760
? seenReferences.get(object[key])
761761
: getObjectSubsetWithContext(seenReferences)(
762-
object[key],
763-
subset[key],
764-
)
762+
object[key],
763+
subset[key],
764+
)
765765
}
766766
else {
767767
if (!seenReferences.has(object[key])) {

packages/mocker/src/node/esmWalker.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,9 +246,9 @@ export function esmWalker(
246246
const grandparent = stack[1]
247247
const hasBindingShortcut
248248
= isStaticProperty(parent)
249-
&& parent.shorthand
250-
&& (!isNodeInPattern(parent)
251-
|| isInDestructuringAssignment(parent, parentStack))
249+
&& parent.shorthand
250+
&& (!isNodeInPattern(parent)
251+
|| isInDestructuringAssignment(parent, parentStack))
252252

253253
const classDeclaration
254254
= (parent.type === 'PropertyDefinition'

packages/pretty-format/src/index.ts

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -343,22 +343,22 @@ function printPlugin(
343343
printed = isNewPlugin(plugin)
344344
? plugin.serialize(val, config, indentation, depth, refs, printer)
345345
: plugin.print(
346-
val,
347-
valChild => printer(valChild, config, indentation, depth, refs),
348-
(str) => {
349-
const indentationNext = indentation + config.indent
350-
return (
351-
indentationNext
352-
+ str.replaceAll(NEWLINE_REGEXP, `\n${indentationNext}`)
353-
)
354-
},
355-
{
356-
edgeSpacing: config.spacingOuter,
357-
min: config.min,
358-
spacing: config.spacingInner,
359-
},
360-
config.colors,
361-
)
346+
val,
347+
valChild => printer(valChild, config, indentation, depth, refs),
348+
(str) => {
349+
const indentationNext = indentation + config.indent
350+
return (
351+
indentationNext
352+
+ str.replaceAll(NEWLINE_REGEXP, `\n${indentationNext}`)
353+
)
354+
},
355+
{
356+
edgeSpacing: config.spacingOuter,
357+
min: config.min,
358+
spacing: config.spacingInner,
359+
},
360+
config.colors,
361+
)
362362
}
363363
catch (error: any) {
364364
throw new PrettyFormatPluginError(error.message, error.stack)

packages/pretty-format/src/plugins/DOMElement.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function testNode(val: any) {
3636
const { nodeType, tagName } = val
3737
const isCustomElement
3838
= (typeof tagName === 'string' && tagName.includes('-'))
39-
|| testHasAttribute(val)
39+
|| testHasAttribute(val)
4040

4141
return (
4242
(nodeType === ELEMENT_NODE

0 commit comments

Comments
 (0)