linter-bundle
Version:
Ready-to use bundle of linting tools, containing configurations for ESLint, stylelint and markdownlint.
26 lines (17 loc) • 633 B
Markdown
and before the `>` in TypeScript generics. Ensuring that no unnecessary spaces are used around generics helps maintain consistency and readability in your code.
Examples of **incorrect** code for this rule:
```ts
declare function foo< T>(x: T): T; // Space after '<'
function bar<U >(): U { // Space before '>'
return null as U;
}
```
Examples of **correct** code for this rule:
```ts
declare function foo<T>(x: T): T;
function bar<U>(): U {
return null as U;
}
```
This rule disallows spaces after the `<`