-
-
Notifications
You must be signed in to change notification settings - Fork 651
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
html-indent causes eslint to fail when fixing only layout issues #765
Comments
Bump |
It seems that the problem is that in eslint/lib/cli-engine.js line 497 this.options.fix = lintResult => {
const rule = this._rulesCache.get(lintResult.ruleId);
// line I added to bail if no rule found
if (!rule) return
const matches = rule.meta && fixTypes.has(rule.meta.type);
return matches && originalFix(lintResult);
} |
After looking at the eslint repo and seaching through their issues, I see that this is actually seems like an issue with the order configs are loaded. They are working on a fix. I have pulled down the branch into the VueCli project and confirmed that this seems to fix the issue. link to issuelink to issue which introduces fix |
Hi. I apologize for my overlooking. As your investigation, The current implementation of We cannot do something in the plugin side... |
No worries. I am just disabling the offending rule when running |
It looks like it's already resolved, so I close this issue. |
I am editing this because I have installed a project with
@vue/cli: 3.5.5
and am still getting issues. Since we are integrating vue into a legacy code base, we cannot just runnpx eslint --fix file.vue
. This command runs and fixes all issues, butnpx eslint --fix --fix-type layout file.vue
should also work. Especially since thevue/html-indent
plugin is specifically marked at layout and fixableTell us about your environment
Please show your full configuration:
What did you do?
What did you expect to happen?
npx eslint --fix --fix-type layout src/App.vue shoud run and fix only items marked at layout
What actually happened?
Eslint fails to run due to meta of undefined. I have tracked the issue down to the
vue/html-indent
rule being present. Removing it allows the linter to run and fix issues.npx eslint --fix src/App.vue
works, but fixes all issues and is not suitable for legacy code bases.vue/html-indent
is marked as fixable and layout, so it should work.The text was updated successfully, but these errors were encountered: