flow-typed / eslint-plugin-ft-flow

https://www.npmjs.com/package/eslint-plugin-ft-flow
Other
19 stars 11 forks source link

Fix mapped types throwing eslint errors #43

Open Brianzchen opened 1 year ago

Brianzchen commented 1 year ago
type TypographyPathifyT = {
  [key in keyof TypographyVariantsT]: string,
};

Will first produce 'key' is defined but never used.eslint[no-unused-vars](https://eslint.org/docs/latest/rules/no-unused-vars) and then using mapped types more will produce, 'key' is already defined.eslint[no-redeclare](https://eslint.org/docs/latest/rules/no-redeclare)