Skip to content

test(func-call-spacing): remove obsolete compatibility code #2830

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 31, 2025
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 9 additions & 11 deletions tests/lib/rules/func-call-spacing.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
*/
'use strict'

const { RuleTester, ESLint } = require('../../eslint-compat')
const semver = require('semver')
const { RuleTester } = require('../../eslint-compat')
const rule = require('../../../lib/rules/func-call-spacing')

const tester = new RuleTester({
Expand Down Expand Up @@ -61,10 +60,9 @@ tester.run('func-call-spacing', rule, {
`,
errors: [
{
message: semver.lt(ESLint.version, '7.0.0')
? 'Unexpected newline between function name and paren.'
: 'Unexpected whitespace between function name and paren.',
line: 3
message: 'Unexpected whitespace between function name and paren.',
line: 3,
column: 20
}
]
},
Expand All @@ -83,7 +81,8 @@ tester.run('func-call-spacing', rule, {
errors: [
{
message: 'Missing space between function name and paren.',
line: 3
line: 3,
column: 20
}
]
},
Expand All @@ -104,10 +103,9 @@ tester.run('func-call-spacing', rule, {
</style>`,
errors: [
{
message: semver.lt(ESLint.version, '7.0.0')
? 'Unexpected newline between function name and paren.'
: 'Unexpected whitespace between function name and paren.',
line: 4
message: 'Unexpected whitespace between function name and paren.',
line: 4,
column: 24
}
]
}
Expand Down
Loading