Verified Commit 4dac48d2 authored by Mark Florian's avatar Mark Florian 🔴 Committed by Lukas Eipert
Browse files

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
parent e9c32d10
Loading
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment