Skip to content

Incorrect multiline import indent #1524

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
2 tasks done
Djaler opened this issue Jun 25, 2021 · 3 comments · Fixed by #1525
Closed
2 tasks done

Incorrect multiline import indent #1524

Djaler opened this issue Jun 25, 2021 · 3 comments · Fixed by #1525

Comments

@Djaler
Copy link

Djaler commented Jun 25, 2021

Checklist

  • I have tried restarting my IDE and the issue persists.
  • I have read the FAQ and my problem is not listed.

Tell us about your environment

  • ESLint version: 7.23.0
  • eslint-plugin-vue version: 7.12.0

Please show your full configuration:

module.exports = {
  extends: [
    'plugin:vue/recommended',
  ],
  plugins: ['vue'],
  rules: {
    'vue/script-indent': ['warn', 4, {
        baseIndent: 1,
        switchCase: 1,
    }],
  },
};

What did you do?

<script lang="ts">
    import {
        computed, defineComponent, PropType, ref, watch,
    } from '@vue/composition-api';

What did you expect to happen?
Nothing

What actually happened?
15:1 warning Expected indentation of 8 spaces but found 4 spaces vue/script-indent

Temporary workaround - add 'ImportDeclaration' to ignores option of vue/script-indent rule.

@Djaler
Copy link
Author

Djaler commented Jun 25, 2021

Looks like this was broken in #1520, because 7.11.1 works good in this case

@Djaler
Copy link
Author

Djaler commented Jun 25, 2021

Wow. That was fast! Thanks

@ota-meshi
Copy link
Member

Thanks for reporting this bug! I fixed and released it.
https://github.com/vuejs/eslint-plugin-vue/releases/tag/v7.12.1

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants