Closed astorije closed 4 years ago
It doesn’t conflict with Prettier – it’s unnecessary when using Prettier, isn’t it?
Gotcha. Why is it unnecessary? It seems to me Prettier doesn't do anything about those, but I might be missing something.
Here are the examples from https://eslint.org/docs/rules/no-floating-decimal:
Prettier 1.19.1 Playground link
--parser babel
Input:
var num = .5;
var num = 2.;
var num = -.7;
Output:
var num = 0.5;
var num = 2;
var num = -0.7;
Oh wow you are totally right and I am totally wrong ahah. I guess I was testing on a file that had a parsing error or something, and Prettier was not running. Apologies for the noise and thanks for the responses!
I see that
no-floating-decimal
was disabled in v2.6.0 (a while ago!): https://github.com/prettier/eslint-config-prettier/commit/e47c6a6de6c3fae40f561759cb9fab79453db816However, it seems to me that it doesn't affect Prettier in any way. Do you recall why you turned it off and marked it as conflicting in the checker CLI tool? Is it something we can re-enable nowadays, e.g. it was breaking the parser before?