eslint-plugin-flowtype icon indicating copy to clipboard operation
eslint-plugin-flowtype copied to clipboard

feature: consistent-type-delimeter

Open Brianzchen opened this issue 4 years ago • 3 comments

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

Brianzchen avatar Sep 08 '21 05:09 Brianzchen

@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).

mrtnzlml avatar Sep 08 '21 15:09 mrtnzlml

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?

Brianzchen avatar Sep 08 '21 23:09 Brianzchen

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.

mrtnzlml avatar Sep 10 '21 01:09 mrtnzlml