-
-
Notifications
You must be signed in to change notification settings - Fork 74
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
Add exported meta object #190
Conversation
https://github.com/vuejs/vue-eslint-parser/actions/runs/4810002085/jobs/8565427992?pr=190
I'll fix this test |
Please advise. What path should I use to refer to package.json ? When testing, “index.ts” should refer to package.json with ". /package.json”, but after build, “index.js” should refer to package.json with ". /package.json”. Should I bind the version string with rollup at build time? |
How about writing it like this: get version() {
return require("./package.json").version;
} |
I think it would be better if possible. I think using getters may seem like magic 😅 |
@ota-meshi passed the tests in my local env! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this PR! LGTM!
Related issue: nothing
This PR’s purpose is to support ESLint flat config.
Loading vue-eslint-parser in flat config, ESLint check parser’s name and version in meta object.
https://github.com/eslint/eslint/blob/main/lib/config/flat-config-array.js#L196
https://github.com/eslint/eslint/blob/main/lib/config/flat-config-array.js#L45-L76
vue-eslint-parser can be used in the flat config by exporting the meta object like other packages: