Skip to content

Fix 'no-shared-component-data' false positive when using arrow functions #156

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

Merged
merged 2 commits into from
Aug 16, 2017

Conversation

armano2
Copy link
Contributor

@armano2 armano2 commented Aug 14, 2017

fixes #154


}
}
`,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suspect that this test case is not correct.
The filename is .vue and the code is in outside of <script> element.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is sort of correct @mysticatea I think. This plugin doesn't transform <script></script> from a vue file. It's part of eslint-vue-parser responsibilities so here we expect that any code inside script tag will be accessible as usual. That's why we write this code directly without extra script tag. All we need to know in our rules is the extension of the file to detect if simple export default should be treated as component.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I was under the impression that parserOptions has parser: "vue-eslint-parser". I'm sorry.

@mysticatea mysticatea merged commit b25be73 into vuejs:master Aug 16, 2017
@armano2 armano2 deleted the 154-no-shared-component-data branch August 16, 2017 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

'no-shared-component-data' false positive when using arrow functions
3 participants