Airbnb's ESLint config with TypeScript support
1.05k
stars
98
forks
source link
Bug with generics: TS7060: This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma or explicit constraint. #330
Open
d00rsfan opened 9 months ago
Generic function:
const someFunction = <T>(param: T) => param;
in .mts files must be trailing coma in generic type:
const someFunction = <T,>(param: T) => param;
Problem is in lib/shared.js:69
generics: baseStyleRules['comma-dangle'][1].arrays,
which is declared in rules/style.js:46 as
arrays: 'always-multiline',