Skip to content

Latest commit

 

History

History
24 lines (15 loc) · 672 Bytes

File metadata and controls

24 lines (15 loc) · 672 Bytes

Should not programmatically enable torch mode (@creedengo/no-torch)

⚠️ This rule warns in the ✅ recommended config.

Why is this an issue?

As a developer, you should avoid programmatically enabling torch mode.

The flashlight can significantly drain the device's battery. If it is turned on without the user's knowledge, it could lead to unwanted battery consumption.

import Torch from 'react-native-torch'; // Not-compliant
import axios from 'axios'; // Compliant

Resources

Documentation