Skip to content

Commit f3fff3b

Browse files
Copilotsiddharthkp
andcommitted
Remove ESLint version compatibility code
Co-authored-by: siddharthkp <1863771+siddharthkp@users.noreply.github.com>
1 parent f0dcebd commit f3fff3b

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/rules/spread-props-first.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ module.exports = {
3333

3434
// If we found a spread after a named prop, report it
3535
if (firstSpreadAfterNamedPropIndex !== -1) {
36-
// Support both newer (sourceCode property) and older (getSourceCode method) ESLint versions
37-
const sourceCode = context.sourceCode ?? context.getSourceCode()
36+
const sourceCode = context.sourceCode
3837
const spreadAttr = attributes[firstSpreadAfterNamedPropIndex]
3938
const namedAttr = attributes[lastNamedPropIndex]
4039

0 commit comments

Comments
 (0)