feat: Prefer named exports
BREAKING CHANGE: This disables the `import/prefer-default-export` rule
set by `airbnb-base`, and enables the `import/no-default-export` rule.
Note that Vue single-file-components (SFCs) are exempted from the
`import/no-default-export` rule, since [default exports are required by
design][2].
This is done to align with the consensus reached in our [RFC on
exports][1].
In order to ease the transition, you can keep the old behaviour by
adding the following to your project's `.eslintrc.yml` (or equivalent):
rules:
import/prefer-named-export: error
import/no-default-export: off
Alternatively, you can exempt a subset of files, e.g.:
overrides:
- files:
- '**/*foo.js'
rules:
'import/no-default-export': error
[1]: rfcs#20
[2]: https://vue-loader.vuejs.org/spec.html#script
Loading