Closed TatsuyaYamamoto closed 1 year ago
https://github.com/vuejs/vue-eslint-parser/actions/runs/4810002085/jobs/8565427992?pr=190
Error: Cannot find module './package.json'
I'll fix this test
@ota-meshi
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;
}
Should I bind the version string with rollup at build time?
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!
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: