Skip to content

Commit f47de61

Browse files
committed
fix(no-use-context): use 'settings.version' instead of 'getSettingsFromContext' for version check
1 parent 709b4b7 commit f47de61

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

packages/plugins/eslint-plugin-react-x/src/rules/no-use-context.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ export default createRule<[], MessageID>({
3838
if (!context.sourceCode.text.includes("useContext")) {
3939
return {};
4040
}
41-
const { version } = getSettingsFromContext(context);
42-
if (compare(version, "19.0.0", "<")) {
41+
if (compare(settings.version, "19.0.0", "<")) {
4342
return {};
4443
}
4544
return {

0 commit comments

Comments
 (0)