Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Script setup and normal script inheritAttrs #81

Closed
sadeghbarati opened this issue Apr 22, 2022 · 1 comment
Closed

Script setup and normal script inheritAttrs #81

sadeghbarati opened this issue Apr 22, 2022 · 1 comment

Comments

@sadeghbarati
Copy link

https://vuejs.org/api/sfc-script-setup.html#usage-alongside-normal-script

'vue/component-tags-order': ['error', {
    order: ['script', 'template', 'style'],
}],
/**
 * @type {import('eslint').Linter.Config}
 */
module.exports = {
  extends: '@antfu',
  ignorePatterns: '*.json',
   rules: {
    '@typescript-eslint/no-unused-vars': 'off',
    'vue/component-tags-order': ['error', {
      order: ['script:not([setup])', 'script[setup]', 'template', 'style'],
    }],
}

with your config and overridden config still getting error, and eslint fix move normal script content into script setup

<script></script>

<script setup>
	
	export default {
		inheritAttrs: false
	}
</script>
@sadeghbarati sadeghbarati reopened this Jun 8, 2022
@sadeghbarati sadeghbarati changed the title Two script inheritAttrs Script setup and normal script inheritAttrs Jun 8, 2022
@sadeghbarati
Copy link
Author

'import/first': 'off',

gravitano added a commit to gitsindonesia/nuxt-starter that referenced this issue Nov 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant