- Use only Fat Arrow Syntax for all functions.
- Redux props must be PascalCase.
- React props must be camelCase.
- Constants must be all caps separated with underscore.
- Action Constants are always PascalCase.
- No consoles strictly.
- Avoid setTimeout, setInterval.
- Avoid use
any
data type. - TSLINT must give no errors or warnings.
- Keep the react state and redux store clean.
- No HARD CODE data.
- Private variables or methods must start with underscore.
- Public props or methods must be camelCase.
- Action Constants are always PascalCase.
- Methods or Variables must clearly say what they are doing or what they have.
- Any interface that is imported in more than one place must be in interfaces folder.
- React state internal values must be camelCase.
- React state values from API must be PascalCase.
- All values in state are optional.
- Don't add type for constructor param props. (React 16+)
- All class names must be in small case and seperated with underscore only.
- No styles should be written on HTML elements.
- No styles should be written in hierarchy (ex: div > label) (Why ? Because HTMl structure will change as required. so you cannot rely on it).
- Generic names should be written for commonly used classes.
- Class names must be appropriate to that component or must be generic.