generated from nhcarrigan/template
feat: document eslint-config, alt-gen, and naomiai (#54)
Reviewed-on: https://codeberg.org/nhcarrigan/docs/pulls/54 Co-authored-by: Naomi Carrigan <commits@nhcarrigan.com> Co-committed-by: Naomi Carrigan <commits@nhcarrigan.com>
This commit is contained in:
@ -190,7 +190,7 @@ These rules apply to all TypeScript code, and will run on files in `src/**/*.ts`
|
||||
- Variables within the same declaration block must be sorted alphabetically.
|
||||
- If using the `Symbol` function, you must include a description.
|
||||
- Do not compare to `NaN`, use `Number.isNaN()`.
|
||||
- `typeof` comparators must be a vaild return type of `typeof`.
|
||||
- `typeof` comparators must be a valid return type of `typeof`.
|
||||
- Conditions should always start with the variable, not the constant.
|
||||
|
||||
### 2.1.2. `typescript-eslint` Enforced Rules
|
||||
@ -442,7 +442,7 @@ These rules apply to TSX, and will run on files in `src/**/*.tsx`.
|
||||
- If a radio button or checkbox is checked, it must be `readonly` or have an `onChange` handler.
|
||||
- Default properties should match the property types.
|
||||
- Properties, state, and context should always be destructured.
|
||||
- Components must always have a nmae.
|
||||
- Components must always have a name.
|
||||
- A component cannot consume another component's propTypes.
|
||||
- PropTypes cannot use `any`, `array`, or `object`.
|
||||
- `forwardRef` components must use `ref`.
|
||||
|
Reference in New Issue
Block a user