Skip to content

TypeScript Rules Meeting Minutes

Meeting Info

Date 2022-07-28
Topic Discussion about TypeScript rules
Attendee Calvin Yan, Rocky Chi, Selly Huang, Daniel Zhou, Ted Zhao, Jackson Liu, Kevin Qian
Note Taker Ted Zhao
Timer Rocky Chi
Duration 60 minutes

Meeting Agenda

  1. Discussion about TypeScript rules (30 mins)

Meeting Minutes

  1. Kevin - new member joined HEA team.
  2. Discussion about TypeScript ESLint. typescript-eslint
  • Results of discussion:
Rule Name Result Comments
1. Require that member overloads be consecutive
@typescript-eslint/adjacent-overload-signatures
Mandatory
2. Disallow awaiting a value that is not a Thenable
@typescript-eslint/await-thenable
Mandatory
3. Disallow @ts-<directive> comments or require descriptions after directive
@typescript-eslint/ban-ts-comment
Mandatory
4. Disallow the declaration of empty interfaces
@typescript-eslint/no-empty-interface
Mandatory
5. Disallow the any type
@typescript-eslint/no-explicit-any
Mandatory
6. Disallow extra non-null assertion
@typescript-eslint/no-extra-non-null-assertion
Mandatory
7. Disallow iterating over an array with a for-in loop
@typescript-eslint/no-for-in-array
Mandatory
8. Disallow explicit type declarations for variables or parameters initialized to a number, string, or boolean
@typescript-eslint/no-inferrable-types
Mandatory
9. Disallow non-null assertions after an optional chain expression
@typescript-eslint/no-non-null-asserted-optional-chain
Mandatory
10. Disallow returning a value with type any from a function
@typescript-eslint/no-unsafe-return
Mandatory
11. Disallow require statements except in import statements
@typescript-eslint/no-var-requires
Mandatory
12. Require using namespace keyword over module keyword to declare custom TypeScript modules
@typescript-eslint/prefer-namespace-keyword
Mandatory
13. Require both operands of addition to have type number or string
@typescript-eslint/restrict-plus-operands
Mandatory
14. Enforce template literal expressions to be of string type
@typescript-eslint/restrict-template-expressions
Mandatory Only allow use string or number type

Action Items

  1. Integrate ESLint plugin according to ESLint rules in VSCode and IDEA.
  2. Promote and implement HEA defined rules (JavaScript, Vue.js and TypeScript) in UAS portal project (alert-service-webui).
  3. Make annoucement about the frontend rules (JavaScript, Vue.js) in daily meeting.
  4. Annouce new standards or rules in HEA event once they are ready.

References

TypeScript ESLint