Closed not-so-smart closed 2 years ago
All imports not used as values should be labeled as type-only imports.
Example: https://github.com/not-so-smart/node-groupme/blob/be8988e4264b8a580771d5f37e521fcf29a09563/src/structures/Message.ts#L1 This line should become:
import type { Channel, User } from "..";
so as to distinguish it from "real" imports which are passed through to the compiled JS.
This PR correctly labels all instances of type-only imports as such, and adds the following line to tsconfig.json to enforce this rule:
tsconfig.json
"importsNotUsedAsValues": "error",
All imports not used as values should be labeled as type-only imports.
Example: https://github.com/not-so-smart/node-groupme/blob/be8988e4264b8a580771d5f37e521fcf29a09563/src/structures/Message.ts#L1 This line should become:
so as to distinguish it from "real" imports which are passed through to the compiled JS.
This PR correctly labels all instances of type-only imports as such, and adds the following line to
tsconfig.json
to enforce this rule: