no-restricted-syntax: # see https://stackoverflow.com/a/65205076 - error - message: Please don't use useMediaQuery(query) . Use useMediaQuery2(query) instead selector: CallExpression[callee.name='useMediaQuery'][arguments.length=1]
- All code that calls
useMediaQuery(query)
will be marked as error - Your
useMediaQuery2
may be still callinguseMediaQuery
, but it will call it with more than one arguments. So it is still valid