Skip to content

fix: Loosen new inherited rules

Mark Florian requested to merge loosen-rules into main

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 in no-restricted-exports. The inherited configuration disallows both default and then as named exports. The latter is reasonable, as it can cause confusion/breakage if you're dynamically importing a module with import(). The former is more of a stylistic choice about prefering export default over export { 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

Merge request reports