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

Eslint with .vue extension How to Auto fix it? #6191

Closed
midascodebreaker opened this Issue May 15, 2016 · 3 comments

Comments

Projects
None yet
5 participants
@midascodebreaker

midascodebreaker commented May 15, 2016

I added eslint in atom editor,
and and added my eslintrc.js with eslint --init...
i added html plugin also globally...

yes it linted the error in .vue file but on save it cannot fix it...
do i need additional plugin for this?

coz eslint works by fixing only .js files....

Hope someone can give me clarity about this thanks

@eslintbot eslintbot added the triage label May 15, 2016

@ilyavolodin ilyavolodin added question and removed triage labels May 16, 2016

@ilyavolodin

This comment has been minimized.

Show comment
Hide comment
@ilyavolodin

ilyavolodin May 16, 2016

Member

Autofixing should work with any extension (correct me if I'm wrong). I'm assuming this has something to do with Linter-ESLint. Maybe it's hardcoding autofixing only to js files? You might want to open an issue there.

Member

ilyavolodin commented May 16, 2016

Autofixing should work with any extension (correct me if I'm wrong). I'm assuming this has something to do with Linter-ESLint. Maybe it's hardcoding autofixing only to js files? You might want to open an issue there.

@platinumazure

This comment has been minimized.

Show comment
Hide comment
@platinumazure

platinumazure May 16, 2016

Member

@ilyavolodin Just a note: Auto-fix works fine if it's only the extension that is different and no preprocessing needs to be done on the file. If preprocessing is needed (to extract lint-ready JavaScript), then auto-fix won't work because the locations will be wrong.

@midascodebreaker As mentioned above, you should ask in the linter-eslint repository.

Member

platinumazure commented May 16, 2016

@ilyavolodin Just a note: Auto-fix works fine if it's only the extension that is different and no preprocessing needs to be done on the file. If preprocessing is needed (to extract lint-ready JavaScript), then auto-fix won't work because the locations will be wrong.

@midascodebreaker As mentioned above, you should ask in the linter-eslint repository.

@nzakas

This comment has been minimized.

Show comment
Hide comment
@nzakas

nzakas May 16, 2016

Member

@midascodebreaker as @platinumazure pointed out, we can only autofix regular JavaScript files. Since .vue files are really HTML files, you'd need a preprocessor to get it to work in ESLint, and ESLint doesn't currently support autofixing in preprocessed files.

Member

nzakas commented May 16, 2016

@midascodebreaker as @platinumazure pointed out, we can only autofix regular JavaScript files. Since .vue files are really HTML files, you'd need a preprocessor to get it to work in ESLint, and ESLint doesn't currently support autofixing in preprocessed files.

@nzakas nzakas closed this May 16, 2016

@eslint eslint bot locked and limited conversation to collaborators Feb 6, 2018

@eslint eslint bot added the archived due to age label Feb 6, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.