fisker Cheung

Results 1279 comments of fisker Cheung

This not implemented > Replace const __dirname = path.dirname(fileURLToPath(import.meta.url)); with them.

Strictly speaking, the auto fix isn't correct, ```js if (foo.length === 0 > 0) ; ``` means ```js if (foo.length === (0 > 0)) ; ``` not ```js if ((foo.length...

I don't think this is the real case, when the first argument is literal, it's ignored, is it a variable?

I don't there is anything we can do, you'll have to use `eslint-disable` https://github.com/sindresorhus/eslint-plugin-unicorn/issues/1385#issuecomment-871028613

why close? I think its great, and already using

Optional chaining is now stage 4!

> Looking into the ASTExplorer, I guess the simple version of the first failure case below would be: This is not right they are the same, one expression plus two...

> Oh, I just realized this may be difficult to implement without variable type information. Actually, not really nessary, if it's unknown type, we can assume it's type-casting, `const foo...

The rule could be two parts 1. forbid string literal as expression. 2. No expression-only template. --- Update: String concatenation should fobid too `` `before${ "head" + expression + "tail"...