4 ms·
I've started to use const for every variable, then if I get an linting error about modifying a const, I switch it to let. It took about two weeks to train my h
by dsp1234 10y ago
I've started to use const for every variable, then if I get an linting error about modifying a const, I switch it to let.
It took about two weeks to train my hands/brain to type const before let/var.
- rkwz 10y agoI use https://www.npmjs.com/package/eslint-plugin-const-immutable https://www.npmjs.com/package/eslint-plugin-const-immutable for linting const usage. It even detects object props mutation!