You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// a user might set prefer-inline but not have a supporting TypeScript version. Flow does not support inline types so this should fail in that case as well.
Hi!
I noticed that the
prefer-inline
option forimport/no-duplicates
actively forbids using that option with Flow:eslint-plugin-import/src/rules/no-duplicates.js
Lines 119 to 123 in 766af5f
However, Flow does support inline types (See this Try flow online REPL):
So we don't need this:
This is even implemented as explicitly allowed in another rule,
import/consinstent-type-specifier-style
: https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/consistent-type-specifier-style.mdI spotted this when upgrading from eslint-plugin-import v2.26.0 to v2.27.5 that this old code that works and didn't show lint errors:
Now should be written like this instead:
Notice how the imports from
common/types/locale
remained the same while the imports fromcommon/types/money
showed errors.Expected outcome
I'd expect this to work with Flow:
Actual outcome
Error:
The text was updated successfully, but these errors were encountered: