Closed AdriVanHoudt closed 9 years ago
ESLint 1.8 introduced these rules:
arrow-body-style
- I originally wanted to use this rule, set to "always"
, but we decided to allow implicit returns. The other setting is "as-needed"
, but I don't see much use for this. I talked to @hueniverse about it and it was decided that single line arrow functions can still be implemented as a normal function if you so choose. So, this rule is not much help.no-arrow-condition
- This rule helps catch typos and bad practices, so I'm +1 for enabling this rule.As for the new no-shadow
vs no-shadow-relaxed
, I'll leave that call up to @geek, as he wrote no-shadow-relaxed
.
cool, will wait for @geek and then let me know if you want a PR or you prefer doing it yourself ;)
PRs are welcome. The config is in lib/index.js
. Each changed rule gets a test in test/index.js
based on a fixture in test/fixtures/{rule-name}.js
. The test does not need to be comprehensive for the rule (that testing should be done in the rule itself).
ok will wait for @geek then ;)
@AdriVanHoudt good call, looks like we can switch to the new rule option.
@cjihrig unless you need it quicker I can only do a pr by end of the week
no-arrow-condition
rule in e7296ffd32b952591bd7e932bfad65906adacbef.no-shadow-relaxed
with no-shadow
in 9cde7d91c6de357dd64db693471d9db2bbae451c.:+1:
any eta on :shipit: ?
v6.0.0 has shipped. The lab PR is https://github.com/hapijs/lab/pull/480
This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.
The rules added with 1.8 seem useful to add also
no-shadow
now has anallow
option see http://eslint.org/docs/rules/no-shadow#allow which can replace https://www.npmjs.com/package/no-shadow-relaxed if I am correct