fisker Cheung

Results 1279 comments of fisker Cheung

Changed `checkGlobalVariables` to `false` by default, also use suggestions for global variables to be safe.

I decided to remain CommonJS support in this PR, at least before https://github.com/eslint/eslint/issues/17863 gets solved, people still need the config file in CommonJS.

Questions: - Do we want the entry point to be `eslint-plugin-unicorn/configs/recommended` or `eslint-plugin-unicorn/recommended` (@jjangga0214 proposaled original) - Do we still want to keep the equivalence of `{env: {es2024: true}}` (legacy),...

> just unicorn.configs.recommended. We can't, we already have `unicorn.configs.recommended` as legacy config. So `unicorn.configs['flat/recommended']` for now?

> This would be better then, IMHO. > > ```js > import unicorn from 'eslint-plugin-unicorn/flat' > > export default [ > unicorn.configs.recommended, > ] > ``` We can switch back...

> @fisker this is a LOT of `await` calls Why is this needed that much for a relative linear top to bottom IO file write? I didn't get which part...

I still can't understand the problem here. Are you saying `compareFiles` can be sync? Doesn't it calls `prettier.format`? And `prettier.format` returns a `Promise`. Anyway, I pushed those changes just to...

Once we decide to accept, If someone wants to fix it, [this piece of code maybe useful](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/a9337e847e0ca4d725bdedf8f13e24c7d0dfcda9/rules/no-useless-length-check.js#L35)

@aladdin-add Is there case will be broken? Do you mean setter will not be called?

>what you mean by "setter will not be called"? ```js const a = {set b(v) {console.log('setter called')}, get b() {return 1}} a.b = a.b || 1 // will call setter...