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

more rules candidates

Open aladdin-add opened this issue 6 years ago • 16 comments

aladdin-add avatar Feb 10 '19 10:02 aladdin-add

Also max-len, which will be hard.

g-plane avatar Feb 10 '19 10:02 g-plane

Do we need to consider indent if we implement "max-len"?

g-plane avatar Feb 11 '19 05:02 g-plane

every rule should be standalone. that's means it could not depend on rule indent.

related issue: https://github.com/eslint/eslint/issues/11325

aladdin-add avatar Feb 11 '19 05:02 aladdin-add

If we implement "max-len", I think I don't need to use Prettier in other projects any more.

g-plane avatar Feb 11 '19 07:02 g-plane

Should we add autofix for "no-unreachable"?

g-plane avatar Feb 12 '19 00:02 g-plane

Does no-async-promise-executor need to be fixed?

g-plane avatar Feb 12 '19 02:02 g-plane

no-unreachabl sounds good to me!

not very sure about no-async-promise-executor. :(

aladdin-add avatar Feb 12 '19 04:02 aladdin-add

我们不妨去 ESLint 的列表找找哪些规则还没有 autofix 的,然后看看哪些值得去实现,接着在这个 repo 针对每个规则单独开 issue 进行讨论(实现思路),如果讨论没问题就打个 accepted 的 label,如果思路不可行就直接关闭掉 issue。你怎么看?

g-plane avatar Feb 12 '19 06:02 g-plane

可以,优先考虑在 eslint:recommended 中的规则

aladdin-add avatar Feb 12 '19 06:02 aladdin-add

我不确定还要不要实现 max-len 的 autofix,因为修复出来的结果往往是 opinionated 的,而我们也许不能保证这是不是用户想要的结果。

g-plane avatar Feb 24 '19 16:02 g-plane

  • sort-keys

refs: https://github.com/eslint/eslint/issues/11542

aladdin-add avatar Mar 25 '19 04:03 aladdin-add

How about no-lone-blocks?`https://eslint.org/docs/rules/no-lone-blocks

mekwall avatar Feb 20 '20 10:02 mekwall

@mekwall sounds good to me!

aladdin-add avatar Feb 20 '20 11:02 aladdin-add

Someone implemented sort-keys but it was a year ago https://www.npmjs.com/package/eslint-plugin-sort-keys-fix

trajano avatar Apr 21 '21 18:04 trajano

any updates on max-len?

danielanthonyl avatar Feb 06 '22 16:02 danielanthonyl

Please add max-len. Its the only thing holding me (and it seems others) back from throwing Prettier out …

cseelus avatar Feb 09 '24 20:02 cseelus