- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 681
Compatibility with ESLint 4 #21
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
Comments
Hi @BenoitZugmeyer. This is a problem indeed, and we should probably fix it, but in the meanwhile we just released |
Ah well it's a bit awkward now because Two options:
Option (2) is technically violating semver, but the breaking changes are relatively small and it would probably be less confusion for the users. |
Our 3.0.0 resolves this issue and adds new rules so it's the recommended way of getting rid of this problem. But if we want to update previous release I'm opting for 2nd option @yyx990803 proposed to not confuse users too much. @BenoitZugmeyer is |
Yes, compatible with all versions of eslint starting from v2. |
Hi, I just tried to use https://github.com/vuejs/eslint-plugin-vue/tree/dev (@beta) without any luck. Seems like the README is providing an installation procedure that does not work. There's no recommended.js file inside the node_modules/eslint-plugin-vue |
Hey @vvo, you either need to specify 3.0.0 in package.json or do "npm install eslint-plugin-vue@beta". Readme is being updated as we speak. Stay tuned, it should be on master branch soon, probably tomorrow :) |
I did install @beta but then it said it was not able to find eslint-plugin-vue, if you look at the package.json inside the installed npm package, it has a main to lib/index.js but there's no lib/index.js |
Try now @vvo, I just merged #23 and released 3.0.1, still as |
Do I need to somehow enforce eslint to also pass on .vue files (like with the html plugin)? If so we should maybe say so in readme? |
I cannot get it work:
Eslint project: https://github.com/algolia/eslint-config-algolia/tree/feat/eslint-plugin-vue You can try in a new repo: terminal yarn add \
eslint babel-eslint prettier \
eslint-config-algolia@next eslint-config-prettier \
eslint-plugin-import eslint-plugin-jest eslint-plugin-prettier \
--dev
yarn add eslint-plugin-vue@3.0.1 --dev .eslintrc.js module.exports = {
extends: 'algolia/vue',
}; The try to lint anything, it will fail. |
Also does it lint JavaScript inside |
@vvo That error happens in
Yes. The top-level |
Regarding .vue files - you need to specify it while linting ( |
@mysticatea That's what I thought too but I was wondering why it was failing since the use of eslint-plugin-vue, because inside eslint-plugin-vue we use somme ESLint APIs that are not inside eslint-plugin-import? eslint-plugin-import is a package that is pretty popular inside the ESLint community, might be worth trying to fix that together? |
The |
Thanks for the detailed explanation, I am unsure I can fix that myself, maybe @ljharb has more knowledge on this parse and parserServices API mismatch between those two eslint plugins. In the meantime, any way I can still use eslint-plugin-vue, maybe by disabling the import plugin on vue files or smg? |
If it's not a documented API, and nobody's requested it before on eslint-plugin-import, then naturally we'd have no idea about it. Please feel free to file an issue and/or a PR on eslint-plugin-import. Separately, the HTML plugin should not violate semver; it should backport v4 compat to the 2.x line without additional changes. Violating semver will never reduce user confusion. |
I made a workaround for |
Problem with |
Feel free to reopen this issue if you have more questions. |
Hi I am having a different issue now that this one was fixed: I guess that one just means that prettier is unable to go through those template tags. We are using prettier on the whole codebase, I don't know the state of this for now. prettier/prettier#2097 cc @vjeux I guess prettier is unable to format |
@vvo: we're working on printing vue files (both the html part of it and the inline js) but it's not released (only in master) and very early on. You should find a way to only run prettier on js files for now or help out with the printing of vue files. Hopefully in the next few weeks proper vue support should be good to go. I'm pretty excited about it :) |
Fix bug where lists weren't getting converted to comma separated strings before calling API
Hi,
eslint-plugin-html
author here. ESLint released its v4, and I released a v3 of my plugin to support it.I've got some users who are using the
vue
plugin reporting issues because thehtml
plugin version is fixed to v2. Would you mind changing thehtml
plugin version to v3?As I understand, you are planing to move away from the
html
plugin. I don't mind, but I think that in the meantime, users should be allowed to upgrade to ESLint v4.The text was updated successfully, but these errors were encountered: