[Conversation]: Improve Linter Settings #469
Labels
infrastructure
Anything non feature/* related that improves general working of the Dashboard
kind/documentation
Improvements or additions to documentation
priority/low
An issue with the product that doesn't impact the user much or not at all (ie tech debt)
quality
An issue to improve the quality of our code -- e2e or unit test related
Milestone
We should look at improving our linter to maybe get prettier to format things to our preference.
Topics I think we can talk about (feel free to add more)
Unnecessary braces
{
in a directly returned functionBraces around straight returns
Auto sort imports
Get them so all our 3rd party libs are at the top
..
sorting so that the items further away go under 3rd party imports, working down to local files./some-file
Support more tsconfig paths
Have it so alias paths can snap us back to the root to grab types/constants/utils/services/etc
Note: When it's 1 file -- it can get confusing.
import { } from 'k8sTypes'
looks weird. We need a leading character to signify it's a special import.Reassigning variables passed to you
#693 (comment)
Stop console logs of any kind
We can ignore the ones we need for stability/error reporting -- but we should stop all logs from accidentally allowing debug code from slipping in.
No else return
Prevent
if () { return } else { return }
so that the code structure is more malleable in the future.https://eslint.org/docs/latest/rules/no-else-return
Always type argumentless variables
What is icon? Is icon the string? the JSX? We should force typing here so it has more contextual usage.
The text was updated successfully, but these errors were encountered: