gajus / eslint-plugin-flowtype

Flow type linting rules for ESLint.
Other
1.08k stars 153 forks source link

feature: consistent-type-delimeter #500

Open Brianzchen opened 3 years ago

Brianzchen commented 3 years ago

I want to see a new rule where I can enforce more consistency on an object type. Currently , or ; can be used between object properties, the rule would enforce one or the other

mrtnzlml commented 3 years ago

@Brianzchen such consistency can be already achieved with prettier/prettier rule (Prettier already takes care of the consistency). It's true that it forces to use , instead of ; though and I am not sure if it's configurable. Either way, this new rule should be eventually added to https://github.com/prettier/eslint-config-prettier and disable it by default (as we do for many other rules).

Brianzchen commented 3 years ago

I don't use prettier and I don't think using flowtype should require me to need prettier so a separate rule here would be best fit since it's only necessary for flow object types. Could we just duplicate that rule here?

mrtnzlml commented 3 years ago

Makes sense. 👍

Could we just duplicate that rule here?

I don't think that's easily possible. I'd expect that the Eslint rule calls Prettier directly and just reports back the errors - so not much to copy here, unfortunately.