fix: Loosen new inherited rules
fix: Loosen new inherited rules
The recent bump of eslint-config-airbnb-base
added some new
rules/rule options that aren't really appropriate for us, so we
disable/tweak them here.
Specifically:
- Disable
default-param-last
, as it's more about style than correctness, and would require a fair amount of refactoring to fix all existing violations. - Do not disallow
default
as a named export inno-restricted-exports
. The inherited configuration disallows bothdefault
andthen
as named exports. The latter is reasonable, as it can cause confusion/breakage if you're dynamically importing a module withimport()
. The former is more of a stylistic choice about preferingexport default
overexport { foo as default }
. While there are subtle differences between the two, it seems unnecessary to disallow as it can make re-exporting things more succinct, e.g.,export { Foo as default } from 'foo';
.
Edited by Mark Florian