Closed Shinigami92 closed 2 years ago
Fixed with 0.5.0
. It also looks like end users don't need to explicitly install vue-eslint-parser
or our tokenizer anymore, so I removed them from the install instructions.
Fixed with
0.5.0
. It also looks like end users don't need to explicitly installvue-eslint-parser
or our tokenizer anymore, so I removed them from the install instructions.
@rashfael, we still should install vue-eslint-parser
as a peer dependency of tokenizer.
Interesting, what npm version did you try this on and which command did you run?
Interesting, what npm version did you try this on and which command did you run?
These are pnpm
’s warnings, v7.9.5
or any other.
Also, I use eslint-plugin-vue-pug
as optional peer dependency for my custom eslint config
I have no experience with pnpm
, which the internet says does not install peer dependencies automatically by default, in contrast to npm@7+
. Marking vue-eslint-parser
as peer dependency is correct in my opinion, and I cannot influence install behaviour of different package managers.
Yup, you’re right. I see two solutions:
vue-eslint-parser
as optional peer dependency via peerDependenciesMetavue-eslint-parser
to the install command as necessary dependencyOn the other hand, I don't understand the question deeply enough, but I see that vue-eslint-parser
is not used in vue-eslint-parser-template-tokenizer-pug
. So I think I don't need to install vue-eslint-parser
at all. Maybe vue-eslint-parser
should be a peer dependency of eslint-plugin-vue-pug
?
It's not optional, and it's also not a depedency of vue-eslint-parser-template-tokenizer-pug
. vue-eslint-parser
actually uses vue-eslint-parser-template-tokenizer-pug
as a plugin, configured in the configs provided by eslint-plugin-vue-pug
. The peerDependency
just enforces version compatibility. vue-eslint-parser
is a dependency of eslint-plugin-vue
, which is a peer dependency of eslint-plugin-vue-pug
. You need to have both installed side-by-side, which is why the installation instructions are npm install --save-dev eslint@8 eslint-plugin-vue eslint-plugin-vue-pug
to get something useful to run, which definitely should install vue-eslint-parser
via eslint-plugin-vue
. eslint
is also not a dependency of either plugin so I think having the parser also a peer dependency is in the spirit of things, since the tokenizer does not call the parser, same as a eslint-plugin does not call eslint.
I have double-checked everything. No more warning after updating pnpm
to version 7.11.0
. I should have checked everything right away. Sorry for wasting your time.
It’s amazing package. Thank you for your work.
https://github.com/rashfael/eslint-plugin-vue-pug/blob/94b6f3698c322a17a2bd83b9d1749e74557c3412/package.json#L45
Needs to support
^9