ecoCode-javascript
ecoCode-javascript copied to clipboard
Reduce the environmental footprint of your JS/TS software programs
### Current Behavior I have a custom Input react component that inherits the native HTML input attributes. In JSX, it looks something like this. ```js // This is within the...
### Solution you'd like La règle [no-torch](https://github.com/green-code-initiative/ecoCode-javascript/blob/main/eslint-plugin/docs/rules/no-torch.md) devrait detecter l'utilisation de la contrainte `torch` de l'API HTML5 [MediaTrackConstraints (torch)](https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints#torch) ```js const mediaStream = await navigator.mediaDevices.getUserMedia({video: true}); const [track] = mediaStream.getVideoTracks();...
### Solution you'd like Implements rules EC522 "avoid keep awake (screen on)" for react native and expo framework ### Is your feature request related to a problem? _No response_ ###...
### Solution you'd like update sonar ### Is your feature request related to a problem? _No response_ ### Alternatives you've considered _No response_ ### Additional Information _No response_
### Solution you'd like When iterating over any collection, fetch the size of the collection in advance to avoid fetching it on each iteration, this saves CPU cycles, and therefore...
### Solution you'd like Using single quote instead of quotation mark to avoid unecessary computations. ### Is your feature request related to a problem? _No response_ ### Alternatives you've considered...
### Solution you'd like We will avoid multiple if - else statement by using switch case instead to save performance. ### Is your feature request related to a problem? _No...