OpenEnergyDashboard / OED

Open Energy Dashboard (OED)
Mozilla Public License 2.0
73 stars 252 forks source link

don't import * unless essential #1190

Open huss opened 2 months ago

huss commented 2 months ago

Is your feature request related to a problem? Please describe.

lodash is often imported as import * as _ from 'lodash';. A few newer places only do the needed items from lodash. OED would like to change to only import what is needed in each file.

Describe the solution you'd like

See src/client/app/components/LineChartComponent.tsx that does import { debounce } from 'lodash'; as an example of what is desired.

Describe alternatives you've considered

Leave as is and have extra items available with possible misuse.

Additional context

None

nlin21 commented 1 week ago

I will work on this issue