Skip to content
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

format_on_save #55

Open
jerrychen1013 opened this issue Oct 10, 2017 · 3 comments
Open

format_on_save #55

jerrychen1013 opened this issue Oct 10, 2017 · 3 comments

Comments

@jerrychen1013
Copy link

v2.3.1 is installed, after setting config: "format_on_save: true",
it would only pop out Linter warning and not fixed.
But if using hot key, it works perfectly.

My env:
OS: Sierra 10.12
Sublime Text 3

Below is the debug message:

SublimeLinter: eslint: Hello.vue ['/Users/user/pwa/node_modules/.bin/eslint', '--format', 'compact', '--stdin', '--stdin-filename', '@'] 
SublimeLinter: eslint output:
/Users/user/pwa/src/components/Hello.vue: line 5, col 13, Error - Expected indentation of 6 spaces but found 8. (indent)

1 problem 

I still can not find out the reason.
Has any idea?
Thank you

@kevinmpowell
Copy link

@jerrychen1013 I believe you'll need to add the following to your ESLint-Formatter.sublime-settings - User file (accessed by Sublime Text > Preferences > Package Settings > ESLintFormatter > Settings menu)

  "format_on_save": true
  "format_on_save_extensions": [
    "js",
    "jsx",
    "es",
    "es6",
    "babel",
    "vue"
  ]

@geoidesic
Copy link

geoidesic commented Jul 13, 2019

I did this and I can see in the console that EsLint is being run... but my file is not being formatted. It formats standard js files fine.. but not vue single file components.

If I run EsLint on the file from the command line it points out the errors just fine, but EsLint-Formatter doesn't apply the format to fix those issues.

@skeggse
Copy link
Collaborator

skeggse commented May 19, 2020

Could this be due to #71?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants